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

[WIP] resolve buildconfig output references when constructing the build #5814

Closed
wants to merge 1 commit into from

Conversation

bparees
Copy link
Contributor

@bparees bparees commented Nov 9, 2015

fixes #4518

@bparees bparees changed the title resolve buildconfig output references when constructing the build [WIP] resolve buildconfig output references when constructing the build Nov 9, 2015
@bparees bparees added this to the 1.1.1 milestone Nov 9, 2015
@bparees
Copy link
Contributor Author

bparees commented Nov 9, 2015

Needs test case updates still.

@smarterclayton need to know how you feel about this.. with this change you'll get an immediate error if your buildconfig's outputstream cannot be resolved, rather than us creating a build and then retrying the imagestream resolution for 30 minutes before failing the build (if you don't create the imagestream in time).

I know this sort of goes against the "eventually consistent" model, but it also gives much more immediate feedback in what i suspect is the much more typical case of "oh, i forgot to create my output target".

the risk might be the race condition cases where you're creating the BuildConfig and the ImageStream at the same time, and then the BuildConfig is going to immediately create a Build due to a config change trigger. In that scenario if the ImageStream is being created last, the Build creation could fail because it couldn't resolve the imagestream.

Even assuming that is a concern, i'd like to think about whether there's another approach we could take to solve that(such as delaying the creation of the first build only, by a couple seconds), because i think this behavior is much more user friendly, and also simpler to reason about from a code perspective.

@bparees
Copy link
Contributor Author

bparees commented Nov 9, 2015

sample output:

$ oc start-build ruby-sample-build
Error from server: the referenced output image stream test/origin-rby-sample does not exist

@bparees
Copy link
Contributor Author

bparees commented Nov 9, 2015

[test][extended:core]

@smarterclayton
Copy link
Contributor

I know this sort of goes against the "eventually consistent" model, but it also gives much more immediate feedback in what i suspect is the much more typical case of "oh, i forgot to create my output target".

the risk might be the race condition cases where you're creating the BuildConfig and the ImageStream at the same time, and then the BuildConfig is going to immediately create a Build due to a config change trigger. In that scenario if the ImageStream is being created last, the Build creation could fail because it couldn't resolve the imagestream.

That's a significant problem. We do not require ordering in our create
flows, so this would break that.

Even assuming that is a concern, i'd like to think about whether there's another approach we could take to solve that(such as delaying the creation of the first build only, by a couple seconds), because i think this behavior is much more user friendly, and also simpler to reason about from a code perspective.

Technically we support or we're going to support "create image stream repo on push" (although I haven't tried it in a while @ncdc) which means we might be fixing the wrong problem. I'd rather be able to create IStags completely on the fly, than get an error here.

@bparees
Copy link
Contributor Author

bparees commented Nov 10, 2015

Needs test case updates still.

@smarterclayton i was looking for feedback from you on whether you consider this to be acceptable behavior before i invested the effort in creating the TCs.

@bparees
Copy link
Contributor Author

bparees commented Nov 13, 2015

@smarterclayton so is this acceptable behavior? (fail immediately instead of retrying for 30mins)? keeping in mind the race condition caveat that isn't yet solved.

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to b4e7703

@bparees
Copy link
Contributor Author

bparees commented Nov 16, 2015

I'd rather be able to create IStags completely on the fly, than get an error here.

i'd be ok with doing that, if that's the approach we want to take.

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/7169/) (Extended Tests: core)

@openshift-bot
Copy link
Contributor

Origin Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 18, 2015
@bparees bparees closed this Nov 21, 2015
@bparees bparees deleted the build_output branch July 7, 2018 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
3 participants