-
-
Notifications
You must be signed in to change notification settings - Fork 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-67237] BuildTrigger waits until the dependency graph has been updated - 2nd attempt #6450
Conversation
…ency graph has been updated (jenkinsci#6101)"" This reverts commit f3a32be.
…red after a restart of the jenkins instance
I created a TC to detect the regression. I expect that only the new TC will fail during the currently running build. I have also prepared a fix for the regression that I will push once the currently running build is done. |
As predicted only the newly added TC failed. I have now pushed a fix for the regression and expect no failing unit tests during this run. |
|
||
synchronized (dependencyGraphLock) { | ||
//Wait for the currently running calculation to finish | ||
if (calculatingFutureDependencyGraph != null) { |
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.
Because of how this works, potentially a call to rebuildDependencyGraphAsync
will block which defeats the original purpose of the function. This needs a rethink
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.
Thanks yet again for your feedback. I just pushed a new commit.
I also noticed another bug: getFutureDependencyGraph does not return the most recent dependency graph if the most recent dependency graph has been calculated synchronously. This is problematic because BuildTrigger.execute assumes that getFutureDependencyGraph will always return the most recent dependency graph. To fix this problem calculatingFutureDependencyGraph is now set to null in scheduleCalculationOfFutureDependencyGraph after the calculation has finished.
…ndencyGraph 1) scheduleCalculationOfFutureDependencyGraph does no longer potentially block rebuildDependencyGraphAsync 2) getFutureDependencyGraph returns the most recent dependency graph calculated by either rebuildDependencyGraphAsync or rebuildDependencyGraph
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
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.
I pushed a minor commit to clean up the formatting. Thanks for taking care of this!
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 |
See JENKINS-67237.
The first PR caused this regression. This PR is the 2nd attempt at solving JENKINS-67237 without causing a regression.
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
@timja
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).