-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix early exit upon Helm exit code 1 #376
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aims to avoid issues with pydantic
raminqaf
reviewed
Oct 23, 2023
disrupted
reviewed
Oct 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep consistent capitalisation in PR title, i.e. Helm
sujuka99
changed the title
Fix early exit upon helm exit code 1
Fix early exit upon Helm exit code 1
Oct 23, 2023
disrupted
approved these changes
Oct 23, 2023
raminqaf
approved these changes
Oct 23, 2023
disrupted
pushed a commit
that referenced
this pull request
Oct 25, 2023
fixes #373 > I am getting this error when I try to use dry-run: subprocess.CalledProcessError: Command '['helm', 'get', 'manifest', 'account-producer', '--namespace', 'my-namespace']' returned non-zero exit status 1. why? does he launch it first in dry-run ? when I do that in my commandline I get To learn more, consult https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke Error: release: not found The [problem came from](2.0.9...2.0.10#diff-1ca7465daf9238dfe221304df636d96704ebf4935288b854a5c4c6b3ea9e3162R215) setting `subproces.run(..., check = True)` without handling the raised exception. I took some imports out of `TYPE_CHECKING` blocks to avoid problems with `pydantic` as it uses type hints at runtime Updated to the latest (`0.1.1`) version. Now all fixes deemed unsafe will not be automatically carried out even if it is possible to do so. The user can choose to enable the unsafe autofixes with the `--unsafe-fixes` flag While testing I noticed that we could use the namespace env var in some places in the example, so I did it and had to adjust the tests.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #373
Fix
The problem came from setting
subproces.run(..., check = True)
without handling the raised exception.Preventive measures
I took some imports out of
TYPE_CHECKING
blocks to avoid problems withpydantic
as it uses type hints at runtimeRuff
Updated to the latest (
0.1.1
) version. Now all fixes deemed unsafe will not be automatically carried out even if it is possible to do so. The user can choose to enable the unsafe autofixes with the--unsafe-fixes
flagExample
While testing I noticed that we could use the namespace env var in some places in the example, so I did it and had to adjust the tests.