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

playbooks/library/kpt.py: does not fail on fatal error from kpt #33

Open
johnbelamaric opened this issue May 27, 2023 · 2 comments
Open
Assignees

Comments

@johnbelamaric
Copy link
Member

While testing out the e2e scripts, I was seeing a problem where some packages were not getting applied. It turns out I had a typo in my "version":

    - {pkg: configsync, version: config-sync/v1, namespaces: [config-management-monitoring, config-management-system, resource-group-system]}

The tag config-sync/v1 does not exist; the correct tag is configsync/v1. When running kpt pkg get manually, I get this:

jbelamaric@nephio-r1-e2e:~$ /usr/local/bin/kpt pkg get https://github.com/nephio-project/nephio-example-packages.git/configsync@config-sync/v1 /tmp/jj
Package "jj":
Fetching https://github.com/nephio-project/nephio-example-packages@config-sync/v1
Error: Unknown ref "config-sync/v1". Please verify that the reference exists in upstream repo "https://github.com/nephio-project/nephio-example-packages".

Details:
fatal: ambiguous argument 'config-sync/v1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
 
jbelamaric@nephio-r1-e2e:~$ echo $?
1

With a correct tag, the return value is 0.

I think the kpt.py should fail on a non-zero return value from kpt.

@johnbelamaric
Copy link
Member Author

/assign @electrocucaracha @vjayaramrh

@electrocucaracha
Copy link
Member

We need to improve the error handling in Ansible Module and remove all the errors ignored in its ansible role

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants