-
Notifications
You must be signed in to change notification settings - Fork 4.7k
build controller: use a buildconfig queue to track which buildconfigs to kick #16117
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
build controller: use a buildconfig queue to track which buildconfigs to kick #16117
Conversation
@openshift/devex |
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.
one nit and one thought.
} | ||
} | ||
|
||
// buildConfigWork gets the next build from the buildQueue and invokes handleBuild on it |
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.
gets the next buildconfig from the buildconfig queue and invokes handleBuildConfig on it.
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.
fixed
bc.enqueueBuildConfig(build.Namespace, bcName) | ||
if err := common.HandleBuildPruning(bcName, build.Namespace, bc.buildLister, bc.buildConfigGetter, bc.buildDeleter); err != nil { | ||
utilruntime.HandleError(fmt.Errorf("failed to prune old builds %s/%s: %v", build.Namespace, build.Name, err)) | ||
} |
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.
seems like this could also run inside handleBuildConfig. Not sure if there's an advantage to moving it though.
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.
leaving as is given that in handleBuildConfig it could potentially be called multiple times which could be wasteful.
and gofmt needed apparently.
|
5c2fb6a
to
bff1d6f
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, csrwng The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Installation failed on tests that require an installed OpenShift |
Flake #16143 |
@csrwng: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Automatic merge from submit-queue (batch tested with PRs 16142, 16100, 16109, 16113, 16117) |
Reverts to using the cache lister to determine which builds to run next.
Adds a new queue to the build controller to keep track of which build configs to poke when a build has completed.
Removes the OnComplete handler for policy, given that they all end up calling the same code.
Removes code that updates an annotation on a build to add to the queue and instead adds the build(s) directly to the queue.
Fixes #16081