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

oc new-app: do not fail when file exists with same name as image #11918

Merged
merged 1 commit into from Nov 17, 2016

Conversation

mmilata
Copy link
Contributor

@mmilata mmilata commented Nov 15, 2016

When "oc new-app foo/bar" was run in a directory with regular file named "foo" it failed with:

error: unable to load template file "foo/bar": the path "foo/bar" cannot be accessed: stat foo/bar: not a directory

Fixes bug 1393003.


The fix feels a bit wrong, any hints how to fix this better appreciated.

@bparees or @fabianofranz PTAL?

When "oc new-app foo/bar" was run in a directory with regular file named
"foo" it failed with:

  error: unable to load template file "foo/bar": the path "foo/bar"
  cannot be accessed: stat foo/bar: not a directory

Fixes bug 1393003.
@bparees
Copy link
Contributor

bparees commented Nov 15, 2016

it seems like we are handling the failure from the TemplateFileSearcher incorrectly.. a failure from the searcher should not fail the whole operation, as long as there are other Searchers we can try and one of them yields a successful result.

At best i'd expect us to print these as warnings.

@bparees
Copy link
Contributor

bparees commented Nov 15, 2016

that said, what you've done aligns w/ how the non-existent path case was being handled, so perhaps reworking all this logic is not appropriate to fix this.

@bparees bparees added this to the 1.5.0 milestone Nov 15, 2016
@bparees
Copy link
Contributor

bparees commented Nov 15, 2016

i'm going to call it lgtm for post 3.4.

@bparees bparees self-assigned this Nov 15, 2016
@bparees
Copy link
Contributor

bparees commented Nov 16, 2016

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to b94313c

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to b94313c

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11513/) (Base Commit: a4b7101)

@openshift-bot
Copy link
Contributor

openshift-bot commented Nov 17, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11520/) (Base Commit: 9a21f9b) (Image: devenv-rhel7_5373)

@openshift-bot openshift-bot merged commit 2450c32 into openshift:master Nov 17, 2016
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.

None yet

3 participants