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

s2i: s2i rebuild broken #570

Merged
merged 1 commit into from Aug 12, 2016
Merged

Conversation

gabemontero
Copy link
Contributor

Bug 1366475
Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1366475
Detailed explanation
an attempt to pull the builder image to obtain labels was made; the correct thing was
to pull the locally build image we were rebuilding

@bparees @php-coder PTAL

return nil, err
}

r, err := PullImage(config.Tag, d, api.PullNever, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

why not pull if not present? they could have pushed it somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i was making the assumption that it was always local ... if we can't make that assumption, do we repurpose the builder pull policy or previous image pull policy, or do we have to add another field in the config for rebuild pull policy ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and until the deprecated field is remove, i can leverage the ForcePull field as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thinking about it some more, I'll reuse the builder policy ... the tester for example specified the -p option ... seems natural

@php-coder
Copy link
Contributor

@gabemontero Looks like it was broken long time ago or it's not?

@gabemontero
Copy link
Contributor Author

@php-coder yep, as I mentioned in the bugzilla, no recent changes jumped out as something that would have broke s2i rebuild; thus, I suspect it has been broken for quite a while

@gabemontero
Copy link
Contributor Author

responses to comments pushed

@@ -97,7 +98,8 @@ func describeBuilderImage(config *api.Config, image string, out io.Writer) {
Tag: config.Tag,
IncrementalAuthentication: config.IncrementalAuthentication,
}
build.GenerateConfigFromLabels(c)
pr, _ := docker.GetBuilderImage(c)
Copy link
Contributor

Choose a reason for hiding this comment

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

why aren't you checking this error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The error was ignored before. Assumption I took was to describe as much as
possible. I was inclined to not change that.

On Friday, August 12, 2016, Ben Parees notifications@github.com wrote:

In pkg/api/describe/describer.go
#570 (comment)
:

@@ -97,7 +98,8 @@ func describeBuilderImage(config *api.Config, image string, out io.Writer) {
Tag: config.Tag,
IncrementalAuthentication: config.IncrementalAuthentication,
}

  • build.GenerateConfigFromLabels(c)
  • pr, _ := docker.GetBuilderImage(c)

why aren't you checking this error?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/openshift/source-to-image/pull/570/files/adcdd6aa20b77e9c9ec5dce3b524cf20b22042ca#r74624778,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADbadIK2fgbY9YEDd5Fg96RVaYb9zLaqks5qfKcIgaJpZM4JjLrA
.

Copy link
Contributor

Choose a reason for hiding this comment

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

but now pr could be nil, in which case GenerateConfigFromLabels is going to error anyway, seems better to report the error as early as possible, otherwise it's going to get wrapped/lost (before the error from the pull got bubbled up as is)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK ... pushed update that does not ignore the err

On Fri, Aug 12, 2016 at 1:49 PM, Ben Parees notifications@github.com
wrote:

In pkg/api/describe/describer.go
#570 (comment)
:

@@ -97,7 +98,8 @@ func describeBuilderImage(config *api.Config, image string, out io.Writer) {
Tag: config.Tag,
IncrementalAuthentication: config.IncrementalAuthentication,
}

  • build.GenerateConfigFromLabels(c)
  • pr, _ := docker.GetBuilderImage(c)

but now pr could be nil, in which case GenerateConfigFromLabels is going
to error anyway, seems better to report the error as early as possible,
otherwise it's going to get wrapped/lost (before the error from the pull
got bubbled up as is)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/openshift/source-to-image/pull/570/files/adcdd6aa20b77e9c9ec5dce3b524cf20b22042ca#r74631929,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADbadDMZo_UdRKnFwa6WQRAsw1MDL31Rks5qfLIdgaJpZM4JjLrA
.

@php-coder
Copy link
Contributor

LGTM. Thank you!

Bug 1366475
Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1366475
Detailed explanation
an attempt to pull the builder image to obtain labels was made; the correct thing was
to pull the locally build image we were rebuilding
@bparees
Copy link
Contributor

bparees commented Aug 12, 2016

lgtm
[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Aug 12, 2016

Source To Image Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_sti/189/)

@openshift-bot
Copy link
Contributor

Evaluated for source to image merge up to 8c24edb

@openshift-bot openshift-bot merged commit 89b9668 into openshift:master Aug 12, 2016
@gabemontero gabemontero deleted the bug1366475 branch August 12, 2016 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants