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

Add file path to sops decryption errors #706

Merged
merged 1 commit into from
Aug 9, 2022
Merged

Conversation

stefanprodan
Copy link
Member

If one of the kustomization.yaml files can't be unmarshal by the SOPS decryptor, users can't tell from the error message which file was at fault e.g.

error decrypting env sources: failed to unmarshal kustomization file: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go struct field Kustomization.patches of type types.Patch

This PR adds the file path to the error message.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan added the area/sops SOPS related issues and pull requests label Aug 9, 2022
Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

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

LGTM!

@stefanprodan stefanprodan merged commit e383818 into main Aug 9, 2022
@stefanprodan stefanprodan deleted the improve-sops-error-log branch August 9, 2022 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sops SOPS related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants