-
Notifications
You must be signed in to change notification settings - Fork 153
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
Refactor action policy change handler #4563
Refactor action policy change handler #4563
Conversation
This pull request does not have a backport label. Could you fix it @pchila? 🙏
NOTE: |
ec6a05b
to
23507f5
Compare
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
internal/pkg/agent/application/actions/handlers/handler_action_policy_change.go
Show resolved
Hide resolved
internal/pkg/agent/application/actions/handlers/handler_action_policy_change.go
Show resolved
Hide resolved
internal/pkg/agent/application/actions/handlers/handler_action_policy_change.go
Show resolved
Hide resolved
0fff76a
to
237bc4a
Compare
Fixed bug that caused Fleet APIKey to be removed from fleet.enc store https://buildkite.com/elastic/elastic-agent/builds/8306#018ed0f1-7e0d-4bbc-b906-28be625f219e Fix in 237bc4a |
Is there a unit test that could have caught this? |
Quality Gate passedThe SonarQube Quality Gate passed, but some issues were introduced. 1 New issue |
Not one that we have right now because the changes in memory actually worked correctly. The only way to detect this would be to write the config in the store and then either assert the contents of the store (probably the preferred option) or make the agent reload the config from file and attempt to contact fleet server |
What does this PR do?
Refactor action policy handler splitting validation, persistence and runtime update of the new configuration
Why is it important?
This is a prerequisite for implementing #2851
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature works[ ] I have added an entry in./changelog/fragments
using the changelog tool[ ] I have added an integration test or an E2E testAuthor's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
Questions to ask yourself