-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Improve validation message on build spec update #9164
Conversation
Should help to diagnose openshift/jenkins-sync-plugin#70 |
14db1d9
to
f544564
Compare
if err != nil { | ||
return "", fmt.Errorf("error converting newer to versioned: %v", err) | ||
} | ||
patch, err := strategicpatch.CreateTwoWayMergePatch(olderJSON, newerJSON, versioned) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can versioned
just be an empty build? I'm pretty sure it just uses it navigate metadata for strategic merge patches.
I think we may want to refactor it more generally, but this is a good start. |
f544564
to
c0a3cce
Compare
comment addressed |
}, | ||
}, | ||
}, | ||
expected: `{"Spec":{"Source":{"ContextDir":"context-dir"}}}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you shouldn't be getting caps. Convert to external first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which external? I didn't want to assume 'v1' is that ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which external? I didn't want to assume 'v1' is that ok?
Yeah, v1 is closer than anything else right now.
c0a3cce
to
8592893
Compare
using v1 now |
btw, I'd considered using v1 before, but wasn't sure that it was proper to reference a specific version directly. |
It's not really latest. Validation currently chooses an API version that its reported tags (the paths) are going to match. You should probably match whatever that is. |
lgtm [merge] |
[Test]ing while waiting on the merge queue |
Evaluated for origin test up to 8592893 |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4439/) |
[merge] |
2 similar comments
[merge] |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4543/) (Image: devenv-rhel7_4325) |
[merge] |
Evaluated for origin merge up to 8592893 |
Includes a diff of the build specs (old/new) in the error message details.