-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add onchange configuration for script engine #62868
Add onchange configuration for script engine #62868
Conversation
d40d5a6
to
ede9794
Compare
ede9794
to
448b5f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to not use this function if we don't need to. I understand why you are doing that and ping @waynew for any ideas here.
Looks good to me. @waynew can you also review please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I thought that was just a comment but apparently GitHub decided posting on the comment page should open up a review 🤦
@lkubb so on today's Test Clinic I went ahead and added a fixture and a couple of tests. #62910 is my PR that adds the fixture, and you can find the tests I started on over here: https://github.com/saltstack/salt/compare/master...waynew:salt:engine-scripts-tests?expand=1 I think the timer approach is probably a reasonable way to go for this. |
@garethgreenaway I saw them, just waiting for his timeout fixture PR to be merged to revert my last commit and base off it. |
4354a49
to
637c404
Compare
* Sometimes, the timeout fails * Ensure that there are enough values in side_effect for small variations
I noticed more commits. Is this ready for review/merge now? or are you still waiting on #62910 ? |
I would consider this ready for review/merging now since I implemented a basic version of the timeout fixture @waynew proposed myself and reverted all the testing-related refactoring of the script engine. I'm not 100% certain the timeout fixture can be relied on though, in my testing it sometimes did not trigger. This PR contains a workaround for that issue specific to the script engine. |
thanks, just want @waynew to re-review here |
What does this PR do?
Adds configuration for the script engine to only fire an event if the event tag-specific data changes compared to the last run (see the linked issue).
What issues does this PR fix or reference?
Fixes: #62867
Previous Behavior
Fires an event every time the script is run.
New Behavior
Can be configured to watch for changes between runs.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes