-
Notifications
You must be signed in to change notification settings - Fork 198
Move component working directory management to coordinator #10857
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
Conversation
5ac04a9 to
5230db6
Compare
4794d7e to
c472e05
Compare
c7ed40c to
f7105b6
Compare
|
Did a first pass and this looks good, want to see CI pass before approving and take a second look with fresher eyes tomorrow (some else approving also covers this). There is also the requirement that we don't change the run directory names from what they were before this change, which I double checked manually to confirm it is the same. |
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
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.
This change looks good to me. My only comment is really on the changelog.
changelog/fragments/1761679059-move-component-workdir-coordinator.yaml
Outdated
Show resolved
Hide resolved
💚 Build Succeeded
History
cc @swiatekm |
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.
Thanks for updating the changelog.
* Move component setup and teardown code to the Component struct * Move teardown to coordinator * Integration test to check data re-ingest when switching runtimes * Add integration test for component working dirs * Check workdir creation time in tests * Fix linter warnings * Fix a minor issue in endpoint integration tests * Add changelog entry * Completely remove workdir handling from command runtime * Fix changelog summary * Use fleet in the integration test --------- Co-authored-by: Lee E. Hinman <[email protected]> (cherry picked from commit 41fd24f)
* Move component setup and teardown code to the Component struct * Move teardown to coordinator * Integration test to check data re-ingest when switching runtimes * Add integration test for component working dirs * Check workdir creation time in tests * Fix linter warnings * Fix a minor issue in endpoint integration tests * Add changelog entry * Completely remove workdir handling from command runtime * Fix changelog summary * Use fleet in the integration test --------- Co-authored-by: Lee E. Hinman <[email protected]> (cherry picked from commit 41fd24f)
* Move component setup and teardown code to the Component struct * Move teardown to coordinator * Integration test to check data re-ingest when switching runtimes * Add integration test for component working dirs * Check workdir creation time in tests * Fix linter warnings * Fix a minor issue in endpoint integration tests * Add changelog entry * Completely remove workdir handling from command runtime * Fix changelog summary * Use fleet in the integration test --------- Co-authored-by: Lee E. Hinman <[email protected]> (cherry picked from commit 41fd24f)
…10925) * Move component setup and teardown code to the Component struct * Move teardown to coordinator * Integration test to check data re-ingest when switching runtimes * Add integration test for component working dirs * Check workdir creation time in tests * Fix linter warnings * Fix a minor issue in endpoint integration tests * Add changelog entry * Completely remove workdir handling from command runtime * Fix changelog summary * Use fleet in the integration test --------- (cherry picked from commit 41fd24f) Co-authored-by: Mikołaj Świątek <[email protected]> Co-authored-by: Lee E. Hinman <[email protected]>
…to coordinator (#10924) * Move component working directory management to coordinator (#10857) * Move component setup and teardown code to the Component struct * Move teardown to coordinator * Integration test to check data re-ingest when switching runtimes * Add integration test for component working dirs * Check workdir creation time in tests * Fix linter warnings * Fix a minor issue in endpoint integration tests * Add changelog entry * Completely remove workdir handling from command runtime * Fix changelog summary * Use fleet in the integration test --------- Co-authored-by: Lee E. Hinman <[email protected]> (cherry picked from commit 41fd24f) * Fix imports --------- Co-authored-by: Mikołaj Świątek <[email protected]> Co-authored-by: Lee E. Hinman <[email protected]>
What does this PR do?
It makes the coordinator responsible for creating and removing the working directories of components. Until now, CommandRuntime and ServiceRuntime did this on their own, whereas the OtelManager didn't do it at all. We move the logic for creating and removing the directories into the component module itself, and call it from the Coordinator. The new logic is as follows.
The condition that the component must not be present in the current model fixes an issue where the working directory would be deleted when the component was being moved between runtimes.
Why is it important?
Note that I've included an integration test from #10544, which specifically checks point 2 from above.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files./changelog/fragmentsusing the changelog toolHow to test this PR locally
Related issues