-
Notifications
You must be signed in to change notification settings - Fork 149
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
Emit vars even if provider data is empty from the start #6598
Conversation
We only signal from providers if the emitted data is different from the current state. This caused a bug where the data wasn't ever emitted if it was empty. The provider controller now distinguishes between no data (yet) and empty data. As a result, it's again possible to effectively disable all providers by using a local provider with no data. This is a regression caused by #6114. It doesn't apply to the main and 8.x branches due to #6169 refactoring provider initialisation in those.
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
Quality Gate passedIssues Measures |
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.
Nice catch. Looks good.
On a related note, should we make it possible to run agent with all providers disabled? I think #6169 effectively achieves that, but I'm not sure if intentionally or not. |
We only signal from providers if the emitted data is different from the current state. This caused a bug where the data wasn't ever emitted if it was empty. The provider controller now distinguishes between no data (yet) and empty data. As a result, it's again possible to effectively disable all providers by using a local provider with no data. This is a regression caused by #6114. It doesn't apply to the main and 8.x branches due to #6169 refactoring provider initialisation in those. (cherry picked from commit 8ea9439)
@swiatekm it was intentional, a requirement of not having any variables. |
We only signal from providers if the emitted data is different from the current state. This caused a bug where the data wasn't ever emitted if it was empty. The provider controller now distinguishes between no data (yet) and empty data. As a result, it's again possible to effectively disable all providers by using a local provider with no data. This is a regression caused by #6114. It doesn't apply to the main and 8.x branches due to #6169 refactoring provider initialisation in those. (cherry picked from commit 8ea9439) Co-authored-by: Mikołaj Świątek <[email protected]>
What does this PR do?
We only signal from providers if the emitted data is different from the current state. This caused a bug where the data wasn't ever emitted if it was empty. The provider controller now distinguishes between no data (yet) and empty data. As a result, it's again possible to effectively disable all providers by using a local provider with no data.
This is a regression caused by #6114. It doesn't apply to the main and 8.x branches due to #6169 refactoring provider initialization in those.
Why is it important?
Fixes a regression where agent wouldn't generate any configuration if the only enabled context providers only emitted empty data. This is something users do if they want to effectively disable providers.
Checklist
./changelog/fragments
using the changelog toolRelated issues