-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-68780] Blocked upstream projects in the queue block downstream projects #6675
Conversation
… correctly blocked by blocked upstream projects
This first commit only includes a test case. This test case is a translation of the ticket's text into code. I expect only my new test to fail. |
…eturned by getBuildingUpstream()
As expected only the new test failed. I pushed a commit that fixes the failing test, but I am not sure if other tests are negatively affected. We will see... |
I am currently confused by the results of ci.jenkins.io. I am waiting for more runs to complete because right now I am not sure if the problems are caused by my PR or are by a problem of ci.jenkins.io itself. |
…ded new test "downstreamProjectsInQueueBlock"
… returned by getBuildingDownstream()
Your code is fine. The system is just unstable. 😢 |
Thanks for the feedback :) I will soon push a new commit that further simplifies the test case, a new test case for the reverse situation (downstream projects block upstream projects), and a fix for the reverse situation. |
@res0nance: Thanks for the approval, but I think it was premature: After adding the two latest commits an old test started to fail and it is quite likely that this due to my changes. This failure was probably hidden because ci.jenkins.io was unstable. I will look into the issue. |
The core of the problem is that two contradictory requirements exist. A simplified example:
(I am not sure, if this example actually triggers the problem or if a more complex example is needed. But due to its simplicity, it makes the core of the problem easier to understand) The current behavior of jenkins is that the circular dependency of projectB and projectC is detected and the cycle is broken and one of the projects starts to build. This is in contrast to the described behavior of "Block build when upstream project is building". When this behavior was altered in a meaningful way for the last time, the committer also mentions this. I quote:
See: 4f4a64a This clashes with my requirement that the options work as described. Whereas the current behavior reduces the chances of deadlocks occurring I am fine with deadlocks occurring. I propose the following solution: I am a little bit unsure if my proposed solution will be merged since it has effects on the UI. Will my solution be merged after I have finished it? |
Circular dependent projects do not cause deadlocks if "Block build when upstream project is building" or "Block build when downstream project is building" is enabled.
I just pushed a new commit. |
…downstream project is building"
…m of breaking circular dependencies in the queue
Ci.Jenkins.io looks good. I just pushed updated help texts. |
Can I support the review process in any way? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback. Please see the merge process documentation for more information about the merge process. Thanks! |
The labels aren't changed, so I would expect some (many) users to be surprised about the new behavior. Is this change worth it? What is the motivation for this change other than it doesn't work like the documentation says? Do we believe it should behave as documented rather than as implemented? Otherwise, changing the documentation would be the potentially less harmful choice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The labels aren't changed, so I would expect some (many) users to be surprised about the new behaviour. Is this change worth it? What is the motivation for this change other than it doesn't work like the documentation says? Do we believe it should behave as documented rather than as implemented? Otherwise, changing the documentation would be the potentially less harmful choice.
Probably needs to be answered, however the code change looks good (pending javadoc tweaks) and if it breaks installations we could revert it in future.
Of note - if I understand this correctly you should be able to reproduce the reported issue without any external plugins blocking builds. If a build is blocked because all nodes with a given label have no spare executors (yes most agents would come from some plugin but the blockage is defined in Jenkins core not the agent/cloud plugin.)
And given that - I think it makes sense that up/downstreams are blocked whilst a up/downstream is waiting for an agent.
I checked the bug tracker and found multiple longstanding critical bugs that very likely occur because of the current behavior of the blocking option. These are the issues: Because of these issues I am strongly in favor of merging my PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The motivation is clear to me; thank you for fixing this long-standing issue!
FYI: I will be on vacation for the next two weeks. I won't respond to any change requests during this time. |
On July 13, @daniel-beck removed the |
If feedback becomes obsolete, feel free to update the PR accordingly. This is no different from a stale review that should be dismissed. |
Thanks Daniel! At this point all design feedback has been addressed, and all implementation feedback has also been addressed, so I think it is appropriate to restart the integration timer. This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback. Please see the merge process documentation for more information about the merge process. Thanks! |
See JENKINS-68780.
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgrade@Restricted
or have@since TODO
Javadoc, as appropriate.Desired reviewers
@res0nance
@basil
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are accurate, human-readable, and in the imperative moodupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).