Skip to content

[8.16](backport #6598) Emit vars even if provider data is empty from the start#6607

Merged
swiatekm merged 1 commit into8.16from
mergify/bp/8.16/pr-6598
Jan 27, 2025
Merged

[8.16](backport #6598) Emit vars even if provider data is empty from the start#6607
swiatekm merged 1 commit into8.16from
mergify/bp/8.16/pr-6598

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Jan 27, 2025

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

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • 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

Related issues


This is an automatic backport of pull request #6598 done by [Mergify](https://mergify.com).

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)
@mergify mergify bot requested a review from a team as a code owner January 27, 2025 11:19
@mergify mergify bot added the backport label Jan 27, 2025
@mergify mergify bot requested review from kaanyalti and pchila and removed request for a team January 27, 2025 11:19
@elastic-sonarqube
Copy link
Copy Markdown

@swiatekm swiatekm enabled auto-merge (squash) January 27, 2025 13:44
@swiatekm swiatekm merged commit 9068b83 into 8.16 Jan 27, 2025
@swiatekm swiatekm deleted the mergify/bp/8.16/pr-6598 branch January 27, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant