Skip to content
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

Do external package manager check only at startup #6178

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

swiatekm
Copy link
Contributor

@swiatekm swiatekm commented Dec 2, 2024

What does this PR do?

We were doing the check for external package manager use when validating vars for the platform, which happens on every configuration reload. I've made this an attribute of the platform instead, and it's now only checked on startup.

Why is it important?

Reading a bunch of files every time configuration is reloaded is an unnecessary expense.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • 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

@swiatekm swiatekm added enhancement New feature or request backport-8.x Automated backport to the 8.x branch with mergify backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify labels Dec 2, 2024
@swiatekm swiatekm requested a review from a team as a code owner December 2, 2024 09:27
We were doing the check for external package manager use when validating
vars for the platform, which happens on every configuration reload. I've
made this an attribute of the platform instead, and it's now only
checked on startup.
@swiatekm swiatekm force-pushed the fix/dont-check-pkgmgr-on-config-reload branch from a95566c to 204a1a6 Compare December 2, 2024 10:52
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Dec 2, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
@swiatekm swiatekm enabled auto-merge (squash) December 9, 2024 15:59
@swiatekm swiatekm merged commit af175e0 into main Dec 9, 2024
14 checks passed
@swiatekm swiatekm deleted the fix/dont-check-pkgmgr-on-config-reload branch December 9, 2024 18:04
mergify bot pushed a commit that referenced this pull request Dec 9, 2024
* Do external package manager check only at startup

We were doing the check for external package manager use when validating
vars for the platform, which happens on every configuration reload. I've
made this an attribute of the platform instead, and it's now only
checked on startup.

* Update changelog/fragments/1733131399-vars-for-platform.yaml

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>

---------

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit af175e0)
mergify bot pushed a commit that referenced this pull request Dec 9, 2024
* Do external package manager check only at startup

We were doing the check for external package manager use when validating
vars for the platform, which happens on every configuration reload. I've
made this an attribute of the platform instead, and it's now only
checked on startup.

* Update changelog/fragments/1733131399-vars-for-platform.yaml

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>

---------

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit af175e0)
mergify bot pushed a commit that referenced this pull request Dec 9, 2024
* Do external package manager check only at startup

We were doing the check for external package manager use when validating
vars for the platform, which happens on every configuration reload. I've
made this an attribute of the platform instead, and it's now only
checked on startup.

* Update changelog/fragments/1733131399-vars-for-platform.yaml

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>

---------

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit af175e0)
swiatekm added a commit that referenced this pull request Dec 10, 2024
* Do external package manager check only at startup

We were doing the check for external package manager use when validating
vars for the platform, which happens on every configuration reload. I've
made this an attribute of the platform instead, and it's now only
checked on startup.

* Update changelog/fragments/1733131399-vars-for-platform.yaml

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>

---------

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit af175e0)

Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
swiatekm added a commit that referenced this pull request Dec 10, 2024
* Do external package manager check only at startup

We were doing the check for external package manager use when validating
vars for the platform, which happens on every configuration reload. I've
made this an attribute of the platform instead, and it's now only
checked on startup.

* Update changelog/fragments/1733131399-vars-for-platform.yaml

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>

---------

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit af175e0)

Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
ycombinator pushed a commit that referenced this pull request Dec 12, 2024
* Do external package manager check only at startup

We were doing the check for external package manager use when validating
vars for the platform, which happens on every configuration reload. I've
made this an attribute of the platform instead, and it's now only
checked on startup.

* Update changelog/fragments/1733131399-vars-for-platform.yaml

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>

---------

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit af175e0)

Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants