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

fix(model): ensure Secret.get_content returns a copy of the dict #1000

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

benhoyt
Copy link
Collaborator

@benhoyt benhoyt commented Aug 29, 2023

This avoids the caller modifying the Secret instance's dict.

Fixes #999

This avoids the caller modifying the Secret instance's dict.

Fixes canonical#999
Copy link
Member

@jameinel jameinel left a comment

Choose a reason for hiding this comment

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

Can we add a test at a high level that we either cannot have nested content, or that we are doing a deep copy?

ops/model.py Show resolved Hide resolved
@benhoyt benhoyt merged commit f86a054 into canonical:main Aug 29, 2023
17 checks passed
@benhoyt benhoyt deleted the secret-get_content-copy branch August 29, 2023 23:46
@hpidcock
Copy link
Member

#1000 🎉

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

Successfully merging this pull request may close these issues.

secret.get_content() un-intuitively cached locally
3 participants