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

Remove object.__setattr__ frozen bypasses in Scenario #1423

Open
tonyandrewmeyer opened this issue Oct 10, 2024 · 0 comments
Open

Remove object.__setattr__ frozen bypasses in Scenario #1423

tonyandrewmeyer opened this issue Oct 10, 2024 · 0 comments
Labels
testing Related to ops.testing

Comments

@tonyandrewmeyer
Copy link
Contributor

I think we're all agreed that it would be nice if we didn't have to have a bunch of object.__setattr__(self, "attribute", new_value) in the state (while still keeping the immutability that the frozen dataclasses provide).

A few of these are in __post_init__ and probably need to stay as they are. The majority are handling components of the state being changed during the event - new secret content, opening/closing ports, setting the unit/app status, etc. It would be nice to keep the immutability but avoid the object.__setattr__ for those.

Moved from canonical/ops-scenario#170

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

No branches or pull requests

2 participants