fix(scalers): remove scalers upon notification #375
Merged
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.
Feature or Problem
This PR reorders the order of operations during cleanup to ensure that we remove the scalers from the list that will be reconciling/handling events immediately before refreshing data & publishing cleanup commands. This should help us avoid race conditions in tests and make the scalers do a better job at cleaning up.
Related Issues
Fixes #317
Release Information
Consumer Impact
Testing
Unit Test(s)
Acceptance or Integration
Manual Verification
Added a temporary commit that I'll remove that just runs the e2e tests 10 times and should serve as a good indicator if we have the issue still.As you can see by https://github.com/wasmCloud/wadm/actions/runs/10271223819, 10x runs of the integration tests didn't hit the condition after this