-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
SKA: Relocate Script v7 #205732
SKA: Relocate Script v7 #205732
Conversation
Pinging @elastic/kibana-core (Team:Core) |
@@ -19,7 +19,6 @@ import { | |||
KIBANA_FOLDER, | |||
NO_GREP, | |||
SCRIPT_ERRORS, | |||
TARGET_FOLDERS, |
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 constant is stale now and can be safely removed.
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.
Great job! LGTM 👍
38d49a0
to
3e18e9d
Compare
Starting backport for target branches: 8.x |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
|
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Addresses the following: * Simplify `isInTargetFolder`, and leverage existing `calculateModuleTargetFolder`. It solves a bug with "current" location being incorrectly determined, as we were using the `group` and `visibility` inferred from path, rather than those in the manifest. * Move the `pre-relocation` hook to BEFORE calculating the list of modules. This allows to update a manifest to re-relocate a module (e.g. when changing its group or visibility). * Fix a bug that caused modules under `src/core/packages` to not be considered in the "correct location". * Fix a bug in the replace logic specific to `pipeline.ts`. We were updating paths that we shouldn't have updated. (cherry picked from commit ca42d93) # Conflicts: # packages/kbn-relocate/utils/relocate.ts
# Backport This will backport the following commits from `main` to `8.x`: - [SKA: Relocate Script v7 (#205732)](#205732) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Gerard Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-07T19:27:36Z","message":"SKA: Relocate Script v7 (#205732)\n\n## Summary\r\n\r\nAddresses the following:\r\n* Simplify `isInTargetFolder`, and leverage existing\r\n`calculateModuleTargetFolder`. It solves a bug with \"current\" location\r\nbeing incorrectly determined, as we were using the `group` and\r\n`visibility` inferred from path, rather than those in the manifest.\r\n* Move the `pre-relocation` hook to BEFORE calculating the list of\r\nmodules. This allows to update a manifest to re-relocate a module (e.g.\r\nwhen changing its group or visibility).\r\n* Fix a bug that caused modules under `src/core/packages` to not be\r\nconsidered in the \"correct location\".\r\n* Fix a bug in the replace logic specific to `pipeline.ts`. We were\r\nupdating paths that we shouldn't have updated.","sha":"ca42d93bd46a2e8f46825626f3c45ded80b2da13","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:prev-minor"],"number":205732,"url":"https://github.com/elastic/kibana/pull/205732","mergeCommit":{"message":"SKA: Relocate Script v7 (#205732)\n\n## Summary\r\n\r\nAddresses the following:\r\n* Simplify `isInTargetFolder`, and leverage existing\r\n`calculateModuleTargetFolder`. It solves a bug with \"current\" location\r\nbeing incorrectly determined, as we were using the `group` and\r\n`visibility` inferred from path, rather than those in the manifest.\r\n* Move the `pre-relocation` hook to BEFORE calculating the list of\r\nmodules. This allows to update a manifest to re-relocate a module (e.g.\r\nwhen changing its group or visibility).\r\n* Fix a bug that caused modules under `src/core/packages` to not be\r\nconsidered in the \"correct location\".\r\n* Fix a bug in the replace logic specific to `pipeline.ts`. We were\r\nupdating paths that we shouldn't have updated.","sha":"ca42d93bd46a2e8f46825626f3c45ded80b2da13"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205732","number":205732,"mergeCommit":{"message":"SKA: Relocate Script v7 (#205732)\n\n## Summary\r\n\r\nAddresses the following:\r\n* Simplify `isInTargetFolder`, and leverage existing\r\n`calculateModuleTargetFolder`. It solves a bug with \"current\" location\r\nbeing incorrectly determined, as we were using the `group` and\r\n`visibility` inferred from path, rather than those in the manifest.\r\n* Move the `pre-relocation` hook to BEFORE calculating the list of\r\nmodules. This allows to update a manifest to re-relocate a module (e.g.\r\nwhen changing its group or visibility).\r\n* Fix a bug that caused modules under `src/core/packages` to not be\r\nconsidered in the \"correct location\".\r\n* Fix a bug in the replace logic specific to `pipeline.ts`. We were\r\nupdating paths that we shouldn't have updated.","sha":"ca42d93bd46a2e8f46825626f3c45ded80b2da13"}}]}] BACKPORT-->
## Summary Addresses the following: * Simplify `isInTargetFolder`, and leverage existing `calculateModuleTargetFolder`. It solves a bug with "current" location being incorrectly determined, as we were using the `group` and `visibility` inferred from path, rather than those in the manifest. * Move the `pre-relocation` hook to BEFORE calculating the list of modules. This allows to update a manifest to re-relocate a module (e.g. when changing its group or visibility). * Fix a bug that caused modules under `src/core/packages` to not be considered in the "correct location". * Fix a bug in the replace logic specific to `pipeline.ts`. We were updating paths that we shouldn't have updated.
## Summary Addresses the following: * Simplify `isInTargetFolder`, and leverage existing `calculateModuleTargetFolder`. It solves a bug with "current" location being incorrectly determined, as we were using the `group` and `visibility` inferred from path, rather than those in the manifest. * Move the `pre-relocation` hook to BEFORE calculating the list of modules. This allows to update a manifest to re-relocate a module (e.g. when changing its group or visibility). * Fix a bug that caused modules under `src/core/packages` to not be considered in the "correct location". * Fix a bug in the replace logic specific to `pipeline.ts`. We were updating paths that we shouldn't have updated.
Summary
Addresses the following:
isInTargetFolder
, and leverage existingcalculateModuleTargetFolder
. It solves a bug with "current" location being incorrectly determined, as we were using thegroup
andvisibility
inferred from path, rather than those in the manifest.pre-relocation
hook to BEFORE calculating the list of modules. This allows to update a manifest to re-relocate a module (e.g. when changing its group or visibility).src/core/packages
to not be considered in the "correct location".pipeline.ts
. We were updating paths that we shouldn't have updated.--list all
flag to allow listing packages according to their SKA status.