openshift / origin

Conformance test suite for OpenShift
http://www.openshift.org
Apache License 2.0
8.49k stars 4.7k forks source link

Build.Status doesn't contain sha style pull spec URL #4199

Closed deads2k closed 8 years ago

deads2k commented 9 years ago

I'm trying to do a kubectl run using the image built two builds ago. I know which build I'm interested in, but I can't easily go from there to knowing the image URL. Build.Status already contains fields that could only have been known after the build finished. Can we the exactly image?

@bparees

bparees commented 9 years ago

the imageid is only known by the build pod. build.status doesn't contain any information like that. the build pod would have to call back to the api to update the status with such information (this is the same reason it doesn't currently contain the exact commit id that got cloned/built, for example).

that said, oc build-logs should be showing you the image that was pushed, no?

deads2k commented 9 years ago

Given that the build pod will run with a known service account, should we simply give that service account rights to update the field?

bparees commented 9 years ago

i feel like this has been discussed elsewhere...do we have that level of granularity available?

deads2k commented 9 years ago

i feel like this has been discussed elsewhere...do we have that level of granularity available?

We could grant rights to update builds. It doesn't seem unreasonable for a build controller identity to have those permissions.

liggitt commented 9 years ago

could we update build/status instead, to avoid interference from admission checks intended to guard docker/source/custom build types?

bparees commented 9 years ago

related discussion: https://trello.com/c/3GzMxKzg/656-ability-to-truly-rerun-a-build

smarterclayton commented 9 years ago

There was another issue for this.

bparees commented 9 years ago

related (probably the issue @smarterclayton is referring to?): https://github.com/openshift/origin/issues/615

soltysh commented 9 years ago

There's also something similar but regarding push spec in #2982

smarterclayton commented 8 years ago

This was requested again recently

bparees commented 8 years ago

since we now update the build status with the commit id we built, we are probably have most of the pieces in place that we'd need to do this for the imageid that resulted from the build as well.

bparees commented 8 years ago

trello'd https://trello.com/c/SAvLJLLl