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

Improve validation message on build spec update #9164

Merged
merged 1 commit into from
Jun 7, 2016

Conversation

csrwng
Copy link
Contributor

@csrwng csrwng commented Jun 3, 2016

Includes a diff of the build specs (old/new) in the error message details.

@csrwng
Copy link
Contributor Author

csrwng commented Jun 3, 2016

Should help to diagnose openshift/jenkins-sync-plugin#70
@deads2k ptal

cc @jimmidyson @spadgett

@csrwng csrwng force-pushed the build_put_validation branch 3 times, most recently from 14db1d9 to f544564 Compare June 3, 2016 17:23
if err != nil {
return "", fmt.Errorf("error converting newer to versioned: %v", err)
}
patch, err := strategicpatch.CreateTwoWayMergePatch(olderJSON, newerJSON, versioned)
Copy link
Contributor

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.

@deads2k
Copy link
Contributor

deads2k commented Jun 3, 2016

I think we may want to refactor it more generally, but this is a good start.

@csrwng csrwng force-pushed the build_put_validation branch from f544564 to c0a3cce Compare June 3, 2016 17:35
@csrwng
Copy link
Contributor Author

csrwng commented Jun 3, 2016

comment addressed

},
},
},
expected: `{"Spec":{"Source":{"ContextDir":"context-dir"}}}`,
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@csrwng csrwng force-pushed the build_put_validation branch from c0a3cce to 8592893 Compare June 3, 2016 17:46
@csrwng
Copy link
Contributor Author

csrwng commented Jun 3, 2016

using v1 now

@csrwng
Copy link
Contributor Author

csrwng commented Jun 3, 2016

btw, I'd considered using v1 before, but wasn't sure that it was proper to reference a specific version directly.
maybe we need a build/api/latest ?

@deads2k
Copy link
Contributor

deads2k commented Jun 3, 2016

maybe we need a build/api/latest ?

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.

@deads2k
Copy link
Contributor

deads2k commented Jun 3, 2016

lgtm [merge]

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 8592893

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4439/)

@csrwng
Copy link
Contributor Author

csrwng commented Jun 6, 2016

[merge]

2 similar comments
@csrwng
Copy link
Contributor Author

csrwng commented Jun 6, 2016

[merge]

@deads2k
Copy link
Contributor

deads2k commented Jun 7, 2016

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 7, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4543/) (Image: devenv-rhel7_4325)

@csrwng
Copy link
Contributor Author

csrwng commented Jun 7, 2016

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 8592893

@openshift-bot openshift-bot merged commit c5bd429 into openshift:master Jun 7, 2016
@csrwng csrwng deleted the build_put_validation branch July 19, 2016 15:33
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.

3 participants