Skip to content

UPSTREAM: 30162: return err on oc run --image with invalid value#10250

Merged
openshift-bot merged 2 commits into
openshift:masterfrom
juanvallejo:jvallejo_err-oc-run-on-invalid-image
Aug 12, 2016
Merged

UPSTREAM: 30162: return err on oc run --image with invalid value#10250
openshift-bot merged 2 commits into
openshift:masterfrom
juanvallejo:jvallejo_err-oc-run-on-invalid-image

Conversation

@juanvallejo
Copy link
Copy Markdown
Contributor

@juanvallejo juanvallejo commented Aug 5, 2016

Related BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1258354
UPSTREAM: kubernetes/kubernetes#30162

When running oc run <buildconfigname> --image="Invalid$$%ImageValue%%__", a deploymentconfig is successfully created with an image name that is not a valid value for an image reference.

This patch validates that the image name is a valid image reference, and returns an error before creating a deployment config if an invalid value is passed.

$ oc run test --image="Invalid__%imagename"

error: Invalid image name "Invalid__%imagename": invalid reference format

cc @fabianofranz

Comment thread test/cmd/run.sh Outdated
os::log::stacktrace::install
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

only add this if you need it

@juanvallejo
Copy link
Copy Markdown
Contributor Author

[test]

@juanvallejo juanvallejo force-pushed the jvallejo_err-oc-run-on-invalid-image branch from 5de2606 to e072f55 Compare August 5, 2016 19:36
@juanvallejo juanvallejo changed the title return err on oc run --image with invalid value return err on oc run --image with invalid value Aug 5, 2016
@juanvallejo juanvallejo force-pushed the jvallejo_err-oc-run-on-invalid-image branch from e072f55 to e5a882f Compare August 5, 2016 20:41
@fabianofranz
Copy link
Copy Markdown
Contributor

@ncdc PTAL

@ncdc ncdc changed the title return err on oc run --image with invalid value [do not merge] return err on oc run --image with invalid value Aug 5, 2016
@ncdc
Copy link
Copy Markdown
Contributor

ncdc commented Aug 5, 2016

Do not merge until the upstream has merged

@juanvallejo juanvallejo force-pushed the jvallejo_err-oc-run-on-invalid-image branch 2 times, most recently from b5de697 to 2c30345 Compare August 9, 2016 19:11
@juanvallejo
Copy link
Copy Markdown
Contributor Author

flake re[test]

1 similar comment
@juanvallejo
Copy link
Copy Markdown
Contributor Author

flake re[test]

@ncdc ncdc changed the title [do not merge] return err on oc run --image with invalid value [do not merge] UPSTREAM: 30162: return err on oc run --image with invalid value Aug 10, 2016
@juanvallejo juanvallejo force-pushed the jvallejo_err-oc-run-on-invalid-image branch from 2c30345 to be9e8ea Compare August 10, 2016 13:24
@juanvallejo
Copy link
Copy Markdown
Contributor Author

@openshift-bot, the last build failed from the following flakes:

re[test]

@openshift-bot
Copy link
Copy Markdown
Contributor

Evaluated for origin test up to be9e8ea

@openshift-bot
Copy link
Copy Markdown
Contributor

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

@juanvallejo
Copy link
Copy Markdown
Contributor Author

@ncdc

Do not merge until the upstream has merged

Done! kubernetes/kubernetes#30162

@ncdc ncdc changed the title [do not merge] UPSTREAM: 30162: return err on oc run --image with invalid value UPSTREAM: 30162: return err on oc run --image with invalid value Aug 12, 2016
@ncdc
Copy link
Copy Markdown
Contributor

ncdc commented Aug 12, 2016

[merge]

@openshift-bot
Copy link
Copy Markdown
Contributor

openshift-bot commented Aug 12, 2016

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

@openshift-bot
Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to be9e8ea

@openshift-bot openshift-bot merged commit c7de01e into openshift:master Aug 12, 2016
@juanvallejo juanvallejo deleted the jvallejo_err-oc-run-on-invalid-image branch August 12, 2016 13:34
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.

5 participants