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

[CLI] Kamel run does not check source file exists #1911

Closed
squakez opened this issue Jan 14, 2021 · 4 comments · Fixed by #1913
Closed

[CLI] Kamel run does not check source file exists #1911

squakez opened this issue Jan 14, 2021 · 4 comments · Fixed by #1913
Labels
area/cli Kamel CLI
Milestone

Comments

@squakez
Copy link
Contributor

squakez commented Jan 14, 2021

I wonder if this is a desired behavior. When running any integration which is missing the source file (ie kamel run xyz where xyz file does not exists), the CLI does not check if the file exists, creating an empty integration. I wonder if this is a bug and we should verify that the file exists and returning an error instead.

@squakez
Copy link
Contributor Author

squakez commented Jan 14, 2021

I can work on this if it's confirmed to be a bug.

@nicolaferraro
Copy link
Member

I can work on this if it's confirmed to be a bug.

It may be a regression, it used to be the case

@nicolaferraro nicolaferraro added this to the 1.3.1 milestone Jan 14, 2021
@astefanutti astefanutti added the area/cli Kamel CLI label Jan 14, 2021
squakez added a commit to squakez/camel-k that referenced this issue Jan 15, 2021
* Changed the name of run.isLocal func to run.isLocalAndExists as the function does both things
* Added a default switch case to report either the file doesn't exist or the URI scheme cannot be parsed
* Added some unit test to verify error messages expected

Fixes apache#1911
nicolaferraro pushed a commit that referenced this issue Jan 15, 2021
* Changed the name of run.isLocal func to run.isLocalAndExists as the function does both things
* Added a default switch case to report either the file doesn't exist or the URI scheme cannot be parsed
* Added some unit test to verify error messages expected

Fixes #1911
@apupier
Copy link
Contributor

apupier commented Jan 21, 2021

this issue has milestone 1.3.1 set but it is no tpart of 1.3.x branch

if isLocal(s) {
https://github.com/apache/camel-k/commits/release-1.3.x

Is it planned to backport it? (if it is a regression sounds a good idea) or the milestone needs to be updated?

@squakez
Copy link
Contributor Author

squakez commented Jan 21, 2021

Yeah, I will take care of backporting to 1.3 too.

squakez added a commit to squakez/camel-k that referenced this issue Jan 21, 2021
* Changed the name of run.isLocal func to run.isLocalAndExists as the function does both things
* Added a default switch case to report either the file doesn't exist or the URI scheme cannot be parsed
* Added some unit test to verify error messages expected

Fixes apache#1911
astefanutti pushed a commit that referenced this issue Jan 22, 2021
* Changed the name of run.isLocal func to run.isLocalAndExists as the function does both things
* Added a default switch case to report either the file doesn't exist or the URI scheme cannot be parsed
* Added some unit test to verify error messages expected

Fixes #1911
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Kamel CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants