Skip to content
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: fix start of serial builds on cancellation/deletion #17498

Merged
merged 1 commit into from
Dec 14, 2017

Conversation

csrwng
Copy link
Contributor

@csrwng csrwng commented Nov 28, 2017

Current code will only retry a buildconfig if there's a running build and there's no pending builds waiting to be started. The conditions should be independent (ored). If there's no pending builds it may be that the cache hasn't caught up.

This fix separates the conditions and logs different messages for each.

When an active build is deleted, we should also poke the buildconfig to start the next build.

Fixes #17353

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 28, 2017
@csrwng
Copy link
Contributor Author

csrwng commented Nov 28, 2017

@openshift/sig-developer-experience

glog.V(4).Infof("Build config %s/%s has running builds, will retry", bcNamespace, bcName)
return fmt.Errorf("build config %s/%s has running builds and cannot run more builds", bcNamespace, bcName)
}
if len(nextBuilds) == 0 {
glog.V(4).Infof("Build config %s/%s has no builds to run next, will retry", bcNamespace, bcName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will retry? doesn't this mean we could potentially end up spinning forever on a buildconfig that has no builds?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We give up after 15 retries

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, ok.

@bparees
Copy link
Contributor

bparees commented Nov 28, 2017

/lgtm
/hold
(for build test pass)

@openshift-ci-robot openshift-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Nov 28, 2017
@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2017

var deleteTime, deleteTime2 time.Time
for {
event := <-buildWatch.ResultChan()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap this in a select timeout like the other TCs do, so we don't want forever if we don't get the next event.

@bparees
Copy link
Contributor

bparees commented Nov 28, 2017

/lgtm cancel

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2017
@openshift-merge-robot openshift-merge-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2017
@csrwng csrwng force-pushed the fix_build_controller branch from 4189afd to 18623da Compare November 28, 2017 19:45
@csrwng
Copy link
Contributor Author

csrwng commented Nov 28, 2017

updated

@bparees
Copy link
Contributor

bparees commented Nov 28, 2017

/lgtm
(continue to wait for passing build tests)

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2017
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2017
@csrwng csrwng force-pushed the fix_build_controller branch from 18623da to bf128b3 Compare November 28, 2017 21:18
@openshift-merge-robot openshift-merge-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2017
@csrwng
Copy link
Contributor Author

csrwng commented Nov 28, 2017

fixed extended test (missing resource type in oc delete call)

@bparees
Copy link
Contributor

bparees commented Nov 28, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2017
@csrwng csrwng force-pushed the fix_build_controller branch from bf128b3 to ccfa1b6 Compare November 28, 2017 21:55
@openshift-merge-robot openshift-merge-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2017
@csrwng
Copy link
Contributor Author

csrwng commented Nov 28, 2017

last push was by mistake, nothing changed

@bparees
Copy link
Contributor

bparees commented Nov 28, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2017
@csrwng
Copy link
Contributor Author

csrwng commented Nov 29, 2017

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@csrwng
Copy link
Contributor Author

csrwng commented Dec 1, 2017

Flake #17330
/retest

@csrwng
Copy link
Contributor Author

csrwng commented Dec 1, 2017

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

15 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@bparees
Copy link
Contributor

bparees commented Dec 11, 2017

/retest

1 similar comment
@csrwng
Copy link
Contributor Author

csrwng commented Dec 11, 2017

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 13, 2017

@csrwng: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins/extended_conformance_install_update 95b3459 link /test extended_conformance_install_update

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.

@bparees
Copy link
Contributor

bparees commented Dec 13, 2017

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit d3cdfec into openshift:master Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

builds extended test: next build should have started less than 20s after canceled build
6 participants