-
Notifications
You must be signed in to change notification settings - Fork 125
feat: run deferred events with fresh charm instances #1631
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
Merged
tonyandrewmeyer
merged 34 commits into
canonical:main
from
tonyandrewmeyer:defer-new-charm-object
Apr 27, 2025
Merged
Changes from 6 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
48d2c33
_run doesn't use self, so make it explicitly a static method. log_spl…
tonyandrewmeyer 4926451
Allow reemit'ing a single event path.
tonyandrewmeyer 6b54dd6
feat: emit deferred events with a fresh charm instance
tonyandrewmeyer 79245bb
Merge origin/main.
tonyandrewmeyer 40b20e1
Fix merge.
tonyandrewmeyer 1256e64
Close each event so that the Scenario state is updated. unregister th…
tonyandrewmeyer 8e25005
Merge origin/main
tonyandrewmeyer 632fb96
Adjust after merge.
tonyandrewmeyer 9936a27
Add test to make sure that we get all the logs even though the backen…
tonyandrewmeyer ae0191a
Resolve TODO via a comment.
tonyandrewmeyer 2940a85
Remove unused argument and make static checker less sad.
tonyandrewmeyer 2b3baec
Ensure the event being deferred is actually observed.
tonyandrewmeyer 1c123bd
We must observe the event in order to have had it deferred.
tonyandrewmeyer 56feef0
Minor tweaks.
tonyandrewmeyer c4a7bd5
Don't bother testing the length when the content is tested right after.
tonyandrewmeyer a501a38
Make changes private.
tonyandrewmeyer 769d4f6
Use the new method to defer, so that it's clear when we are deferring…
tonyandrewmeyer 5440855
Use private methods.
tonyandrewmeyer 4db2223
import ops, ops.x
tonyandrewmeyer c3325f7
Adjust capturing.
tonyandrewmeyer ad739e3
Fix capturing events.
tonyandrewmeyer 41580eb
Add test to make sure that charm instances are not reused (except for…
tonyandrewmeyer 8a1baaa
Improve docstring, add comment.
tonyandrewmeyer 2824fe7
import pathlib, not from pathlib import.
tonyandrewmeyer 1fef404
Remove unnecessary change.
tonyandrewmeyer 0e8ceff
Minor docstring fix.
tonyandrewmeyer c56333d
Remove unnnecessary parentheses.
tonyandrewmeyer eda6599
Simplify the undefining, per review.
tonyandrewmeyer bbca999
Merge origin/main.
tonyandrewmeyer 741298a
post-merge tweaks.
tonyandrewmeyer ba745c7
post-merge fixes.
tonyandrewmeyer cb5856b
Add comment, per review.
tonyandrewmeyer 38aa725
Update ops/framework.py
tonyandrewmeyer 2445c14
Tweaks per review.
tonyandrewmeyer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.