-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Ops] Refactor env loading & fix agent-targeting rewrite #178320
Conversation
/ci |
/ci |
1 similar comment
/ci |
/ci |
Pinging @elastic/kibana-operations (Team:Operations) |
) ## Summary This PR refactors a bit of the pre-command env setup, separating parts, so they can be individually skipped. Then it removes the setup-avoidance based on agent types, as this won't be useful after the migration. Also, it fixes a missed bit in the agent-targeting rewrite used for the migration, where the `provider: 'gcp'` was missing, and adds an optional targeting for the script. - add gcp as provider to all rewritten agent targeting rules - add option to target specific pipelines - refactor env-var loading to a separated file - refactor node installs so it can be switched by a flag - skip node installing in (some) jobs that don't require it (cherry picked from commit a89fb9b) # Conflicts: # .buildkite/scripts/lifecycle/pre_command.sh
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
) ## Summary This PR refactors a bit of the pre-command env setup, separating parts, so they can be individually skipped. Then it removes the setup-avoidance based on agent types, as this won't be useful after the migration. Also, it fixes a missed bit in the agent-targeting rewrite used for the migration, where the `provider: 'gcp'` was missing, and adds an optional targeting for the script. - add gcp as provider to all rewritten agent targeting rules - add option to target specific pipelines - refactor env-var loading to a separated file - refactor node installs so it can be switched by a flag - skip node installing in (some) jobs that don't require it
) (#178533) # Backport This will backport the following commits from `main` to `8.13`: - [[Ops] Refactor env loading & fix agent-targeting rewrite (#178320)](#178320) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alex Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2024-03-12T15:31:26Z","message":"[Ops] Refactor env loading & fix agent-targeting rewrite (#178320)\n\n## Summary\r\nThis PR refactors a bit of the pre-command env setup, separating parts,\r\nso they can be individually skipped. Then it removes the setup-avoidance\r\nbased on agent types, as this won't be useful after the migration.\r\n\r\nAlso, it fixes a missed bit in the agent-targeting rewrite used for the\r\nmigration, where the `provider: 'gcp'` was missing, and adds an optional\r\ntargeting for the script.\r\n\r\n- add gcp as provider to all rewritten agent targeting rules\r\n- add option to target specific pipelines\r\n- refactor env-var loading to a separated file\r\n- refactor node installs so it can be switched by a flag\r\n- skip node installing in (some) jobs that don't require it","sha":"a89fb9b2fbb73742808fa419aaf98486c31d921d","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","v8.14.0","v8.13.1"],"number":178320,"url":"https://github.com/elastic/kibana/pull/178320","mergeCommit":{"message":"[Ops] Refactor env loading & fix agent-targeting rewrite (#178320)\n\n## Summary\r\nThis PR refactors a bit of the pre-command env setup, separating parts,\r\nso they can be individually skipped. Then it removes the setup-avoidance\r\nbased on agent types, as this won't be useful after the migration.\r\n\r\nAlso, it fixes a missed bit in the agent-targeting rewrite used for the\r\nmigration, where the `provider: 'gcp'` was missing, and adds an optional\r\ntargeting for the script.\r\n\r\n- add gcp as provider to all rewritten agent targeting rules\r\n- add option to target specific pipelines\r\n- refactor env-var loading to a separated file\r\n- refactor node installs so it can be switched by a flag\r\n- skip node installing in (some) jobs that don't require it","sha":"a89fb9b2fbb73742808fa419aaf98486c31d921d"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"main","label":"v8.14.0","labelRegex":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/178320","number":178320,"mergeCommit":{"message":"[Ops] Refactor env loading & fix agent-targeting rewrite (#178320)\n\n## Summary\r\nThis PR refactors a bit of the pre-command env setup, separating parts,\r\nso they can be individually skipped. Then it removes the setup-avoidance\r\nbased on agent types, as this won't be useful after the migration.\r\n\r\nAlso, it fixes a missed bit in the agent-targeting rewrite used for the\r\nmigration, where the `provider: 'gcp'` was missing, and adds an optional\r\ntargeting for the script.\r\n\r\n- add gcp as provider to all rewritten agent targeting rules\r\n- add option to target specific pipelines\r\n- refactor env-var loading to a separated file\r\n- refactor node installs so it can be switched by a flag\r\n- skip node installing in (some) jobs that don't require it","sha":"a89fb9b2fbb73742808fa419aaf98486c31d921d"}},{"branch":"8.13","label":"v8.13.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
) (#178959) # Backport This will backport the following commits from `main` to `7.17`: - [[Ops] Refactor env loading & fix agent-targeting rewrite (#178320)](#178320) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alex Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2024-03-12T15:31:26Z","message":"[Ops] Refactor env loading & fix agent-targeting rewrite (#178320)\n\n## Summary\r\nThis PR refactors a bit of the pre-command env setup, separating parts,\r\nso they can be individually skipped. Then it removes the setup-avoidance\r\nbased on agent types, as this won't be useful after the migration.\r\n\r\nAlso, it fixes a missed bit in the agent-targeting rewrite used for the\r\nmigration, where the `provider: 'gcp'` was missing, and adds an optional\r\ntargeting for the script.\r\n\r\n- add gcp as provider to all rewritten agent targeting rules\r\n- add option to target specific pipelines\r\n- refactor env-var loading to a separated file\r\n- refactor node installs so it can be switched by a flag\r\n- skip node installing in (some) jobs that don't require it","sha":"a89fb9b2fbb73742808fa419aaf98486c31d921d","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport missing","v8.14.0","v8.13.1"],"number":178320,"url":"https://github.com/elastic/kibana/pull/178320","mergeCommit":{"message":"[Ops] Refactor env loading & fix agent-targeting rewrite (#178320)\n\n## Summary\r\nThis PR refactors a bit of the pre-command env setup, separating parts,\r\nso they can be individually skipped. Then it removes the setup-avoidance\r\nbased on agent types, as this won't be useful after the migration.\r\n\r\nAlso, it fixes a missed bit in the agent-targeting rewrite used for the\r\nmigration, where the `provider: 'gcp'` was missing, and adds an optional\r\ntargeting for the script.\r\n\r\n- add gcp as provider to all rewritten agent targeting rules\r\n- add option to target specific pipelines\r\n- refactor env-var loading to a separated file\r\n- refactor node installs so it can be switched by a flag\r\n- skip node installing in (some) jobs that don't require it","sha":"a89fb9b2fbb73742808fa419aaf98486c31d921d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.14.0","labelRegex":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/178320","number":178320,"mergeCommit":{"message":"[Ops] Refactor env loading & fix agent-targeting rewrite (#178320)\n\n## Summary\r\nThis PR refactors a bit of the pre-command env setup, separating parts,\r\nso they can be individually skipped. Then it removes the setup-avoidance\r\nbased on agent types, as this won't be useful after the migration.\r\n\r\nAlso, it fixes a missed bit in the agent-targeting rewrite used for the\r\nmigration, where the `provider: 'gcp'` was missing, and adds an optional\r\ntargeting for the script.\r\n\r\n- add gcp as provider to all rewritten agent targeting rules\r\n- add option to target specific pipelines\r\n- refactor env-var loading to a separated file\r\n- refactor node installs so it can be switched by a flag\r\n- skip node installing in (some) jobs that don't require it","sha":"a89fb9b2fbb73742808fa419aaf98486c31d921d"}},{"branch":"8.13","label":"v8.13.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/178533","number":178533,"state":"OPEN"}]}] BACKPORT-->
Summary
This PR refactors a bit of the pre-command env setup, separating parts, so they can be individually skipped. Then it removes the setup-avoidance based on agent types, as this won't be useful after the migration.
Also, it fixes a missed bit in the agent-targeting rewrite used for the migration, where the
provider: 'gcp'
was missing, and adds an optional targeting for the script.