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

indicate builds that can't push #3316

Merged

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Jun 18, 2015

Fixes #3243

This adds a target *ImageStreamNode into the ImagePipeline. It does this by creating an edge between an ImageStreamTagNode and an associated ImageStreamNode. When the graph is traversed to build the ImagePipeline, the edge is chased and resolved.

Output looks like this if the build won't be able to push:

In project foo

docker-nfs-server deploys docker-nfs-server:latest <- docker build of https://github.com/deads2k/docker-nfs-server 
  build 1 new for 14 minutes (can't push to image)
  #1 deployed 14 minutes ago - 1 pod

Warning: Some of your builds are pointing to image streams, but the administrator has not configured the integrated Docker registry (oadm registry).
To see more information about a Service or DeploymentConfig, use 'oc describe service <name>' or 'oc describe dc <name>'.
You can use 'oc get all' to see lists of each of the types described above.

@smarterclayton sidebar: why do we have veneers over the map traversals? "Math is hard"?

Image ImageTagLocation
Build *BuildConfigNode
Image ImageTagLocation
ImageStream *ImageStreamNode
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd really prefer this to be under ImageTagLocation, such that you can ask the imagetaglocation if it is resolved as being valid.

Copy link
Contributor

Choose a reason for hiding this comment

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

That obviates the need for tracking the image stream separately - it's just a check on whether an outbound edge exists when you create the pipeline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So would I, but that means that you end up with a method on a shared interface that's only sometimes valid. That's your preference?

Also, why do we have the veneer on the graph. Straight graph traversal would make this point moot.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking more behavior oriented - Resolved() true/false or Exists() true/false

----- Original Message -----

@@ -21,8 +21,9 @@ type DeploymentPipelineMap
map[*DeploymentConfigNode][]ImagePipeline
// ImagePipeline represents a build, its output, and any inputs. The input
// to a build may be another ImagePipeline.
type ImagePipeline struct {

  • Image ImageTagLocation
  • Build *BuildConfigNode
  • Image ImageTagLocation
  • ImageStream *ImageStreamNode

So would I, but that means that you end up with a method on a shared
interface that's only sometimes valid. That's your preference?

Also, why do we have the veneer on the graph. Straight graph traversal would
make this point moot.


Reply to this email directly or view it on GitHub:
https://github.com/openshift/origin/pull/3316/files#r32769193

@deads2k deads2k force-pushed the status-for-missing-registry branch from 9318df5 to 839290d Compare June 18, 2015 20:07
@deads2k
Copy link
Contributor Author

deads2k commented Jun 18, 2015

initial refactor done, looking at adding the overall check now.

@deads2k deads2k force-pushed the status-for-missing-registry branch from 839290d to 07b9272 Compare June 18, 2015 20:17
@deads2k
Copy link
Contributor Author

deads2k commented Jun 18, 2015

Updated text in description.

@deads2k
Copy link
Contributor Author

deads2k commented Jun 19, 2015

I'd like to get #3334 and then rebase this. That will fix the imagepruning test.

@deads2k deads2k force-pushed the status-for-missing-registry branch from 07b9272 to 7e432c2 Compare July 6, 2015 19:21
@deads2k
Copy link
Contributor Author

deads2k commented Jul 6, 2015

@ncdc builds on #3404 (in merge queue), so only second commit is interesting.

@ncdc
Copy link
Contributor

ncdc commented Jul 7, 2015

Rebase pls?

@deads2k deads2k force-pushed the status-for-missing-registry branch from 7e432c2 to c3c4721 Compare July 7, 2015 15:01
@deads2k
Copy link
Contributor Author

deads2k commented Jul 7, 2015

rebased

imageStreamFailure := ""
// if we're using an image stream and that image stream is the internal registry and that registry doesn't exist
if (build.Parameters.Output.To != nil) && !pushTargetResolved {
imageStreamFailure = fmt.Sprintf(" (can't push to image)")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you plan to add any varargs or should this just be a plain string?

@deads2k
Copy link
Contributor Author

deads2k commented Jul 7, 2015

comments addressed and one bug fixed.

@ncdc
Copy link
Contributor

ncdc commented Jul 7, 2015

I don't think I have any additional comments. Ready to test in Jenkins?

@deads2k
Copy link
Contributor Author

deads2k commented Jul 7, 2015

I don't think I have any additional comments. Ready to test in Jenkins?

Sure, though the merge task does the same.

@deads2k deads2k force-pushed the status-for-missing-registry branch from 3cb55aa to 207d2d2 Compare July 7, 2015 17:47
@deads2k
Copy link
Contributor Author

deads2k commented Jul 7, 2015

[test]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/3562/)

@deads2k
Copy link
Contributor Author

deads2k commented Jul 7, 2015

delete all flake re[test]

@ncdc
Copy link
Contributor

ncdc commented Jul 7, 2015

Unhappy jenkins [test]

@ncdc
Copy link
Contributor

ncdc commented Jul 7, 2015

Hub flake [test]

@deads2k
Copy link
Contributor Author

deads2k commented Jul 8, 2015

green!

@deads2k deads2k force-pushed the status-for-missing-registry branch from 207d2d2 to 0f7089d Compare July 8, 2015 12:26
IsFound bool
}

func (n ImageStreamNode) Found() bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't (yet) used anywhere, is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't (yet) used anywhere, is it?

Not yet. The missing resource status check requires it.

@ncdc
Copy link
Contributor

ncdc commented Jul 8, 2015

[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/2687/) (Image: devenv-fedora_1954)

@openshift-bot
Copy link
Contributor

Evaluated for origin up to 0f7089d

openshift-bot pushed a commit that referenced this pull request Jul 8, 2015
@openshift-bot openshift-bot merged commit e66e8f2 into openshift:master Jul 8, 2015
@deads2k deads2k deleted the status-for-missing-registry branch July 31, 2015 18:31
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.

oc status should tell me that my build pipeline won't work
4 participants