Skip to content

Add file path to sops decryption errors#706

Merged
stefanprodan merged 1 commit intomainfrom
improve-sops-error-log
Aug 9, 2022
Merged

Add file path to sops decryption errors#706
stefanprodan merged 1 commit intomainfrom
improve-sops-error-log

Conversation

@stefanprodan
Copy link
Copy Markdown
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
Copy Markdown
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