-
Notifications
You must be signed in to change notification settings - Fork 84
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
missing details in error log #202
Comments
🤖 Thank you for bringing this to our attention. I agree that forwarding the SOPS error details to stderr would provide more helpful information for troubleshooting. Currently, the KSOPS error handling for SOPS decryption failures is implemented in the func decryptFile(file string) ([]byte, error) {
b, err := ioutil.ReadFile(file)
if err != nil {
return nil, fmt.Errorf("error reading %q: %w", file, err)
}
format := formats.FormatForPath(file)
data, err := decrypt.DataWithFormat(b, format)
if err != nil {
return nil, fmt.Errorf("trouble decrypting file: %w", err)
}
return data, nil
} To enhance the error logging, we could modify the error handling in the I will create a pull request to implement this enhancement. Once it's reviewed and merged, this feature will be available in the next release of KSOPS. I'll update this issue when the pull request is ready for review. Thank you for your valuable feedback and for helping us improve KSOPS! SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Hi @aarnaud, thanks for creating an issue! Dosu's suggestion looks great, although it can't create PRs (yet 😁). If you're up for it, contributions are welcome! Otherwise, I'll make a PR in the next week or so |
Hi @devstein I just try, but it's maybe more complicate, because the details seems to be in https://github.com/getsops/sops/blob/main/usererrors.go#L23 |
Thanks for investigating. We should be able to check if the error implements If it is, we can call |
@dosu-bot Can you update the fix to |
🤖 Thank you for bringing this issue to our attention. It's great to see your interest in improving KSOPS! To address the problem you mentioned, it does seem like updating the I encourage you to go ahead and create a pull request with your proposed fix. The maintainers will review your changes and determine if they should be merged into the KSOPS codebase. Your contribution will be greatly appreciated by the KSOPS community! If you have any further questions or need any assistance during the process of creating the pull request, feel free to ask. Happy contributing! This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
during a debug, I discovered that
ksops
error wasn't helpful, butsops
error helped me to resolve my issue.Is it possible to forward sops error to stderr ?
ksops
sops:
The text was updated successfully, but these errors were encountered: