[8.19] [Synthetics] Perform clean up delete in batches (#245775)#245926
Merged
shahzad31 merged 3 commits intoelastic:8.19from Dec 11, 2025
Merged
[8.19] [Synthetics] Perform clean up delete in batches (#245775)#245926shahzad31 merged 3 commits intoelastic:8.19from
shahzad31 merged 3 commits intoelastic:8.19from
Conversation
## Summary
Refactor code to Perform clean up delete in batches, unit tests have
been added for the changes.
Instead of calling on all found package policies to delete, do a for
loop in batches
```
await fleet.packagePolicyService.delete(soClient, esClient, batch, {
force: true,
spaceIds: ['*'],
});
```
(cherry picked from commit 287b929)
# Conflicts:
# x-pack/solutions/observability/plugins/synthetics/server/tasks/clean_up_duplicate_policies.ts
Contributor
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
shahzad31
commented
Dec 11, 2025
.../solutions/observability/plugins/synthetics/server/tasks/clean_up_duplicate_policies.test.ts
Outdated
Show resolved
Hide resolved
…/clean_up_duplicate_policies.test.ts
shahzad31
commented
Dec 11, 2025
.../solutions/observability/plugins/synthetics/server/tasks/clean_up_duplicate_policies.test.ts
Outdated
Show resolved
Hide resolved
shahzad31
commented
Dec 11, 2025
.../solutions/observability/plugins/synthetics/server/tasks/clean_up_duplicate_policies.test.ts
Outdated
Show resolved
Hide resolved
shahzad31
commented
Dec 11, 2025
.../solutions/observability/plugins/synthetics/server/tasks/clean_up_duplicate_policies.test.ts
Outdated
Show resolved
Hide resolved
cesco-f
approved these changes
Dec 11, 2025
Contributor
💚 Build Succeeded
Metrics [docs]
History
|
shahzad31
added a commit
that referenced
this pull request
Jan 12, 2026
) # Backport This will backport the following commits from `main` to `9.1`: - [[Synthetics] Perform clean up delete in batches (#245775)](#245775) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2025-12-10T18:40:46Z","message":"[Synthetics] Perform clean up delete in batches (#245775)\n\n## Summary\n\nRefactor code to Perform clean up delete in batches, unit tests have\nbeen added for the changes.\n\nInstead of calling on all found package policies to delete, do a for\nloop in batches\n```\n await fleet.packagePolicyService.delete(soClient, esClient, batch, {\n force: true,\n spaceIds: ['*'],\n });\n```","sha":"287b929c42199a35c23fece3300d1eddc89bb913","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.3.0","author:actionable-obs","Team:obs-ux-management","v9.2.3","v8.19.9","v9.1.10"],"title":"[Synthetics] Perform clean up delete in batches","number":245775,"url":"https://github.com/elastic/kibana/pull/245775","mergeCommit":{"message":"[Synthetics] Perform clean up delete in batches (#245775)\n\n## Summary\n\nRefactor code to Perform clean up delete in batches, unit tests have\nbeen added for the changes.\n\nInstead of calling on all found package policies to delete, do a for\nloop in batches\n```\n await fleet.packagePolicyService.delete(soClient, esClient, batch, {\n force: true,\n spaceIds: ['*'],\n });\n```","sha":"287b929c42199a35c23fece3300d1eddc89bb913"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/245775","number":245775,"mergeCommit":{"message":"[Synthetics] Perform clean up delete in batches (#245775)\n\n## Summary\n\nRefactor code to Perform clean up delete in batches, unit tests have\nbeen added for the changes.\n\nInstead of calling on all found package policies to delete, do a for\nloop in batches\n```\n await fleet.packagePolicyService.delete(soClient, esClient, batch, {\n force: true,\n spaceIds: ['*'],\n });\n```","sha":"287b929c42199a35c23fece3300d1eddc89bb913"}},{"branch":"9.2","label":"v9.2.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/245904","number":245904,"state":"MERGED","mergeCommit":{"sha":"03c026c2876802f5fe175db71bd791b4fe589abe","message":"[9.2] [Synthetics] Perform clean up delete in batches (#245775) (#245904)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.2`:\n- [[Synthetics] Perform clean up delete in batches\n(#245775)](https://github.com/elastic/kibana/pull/245775)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Shahzad <shahzad31comp@gmail.com>"}},{"branch":"8.19","label":"v8.19.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/245926","number":245926,"state":"MERGED","mergeCommit":{"sha":"e8062fff81c26b6be11c5ba2cdb27169821fee78","message":"[8.19] [Synthetics] Perform clean up delete in batches (#245775) (#245926)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.19`:\n- [[Synthetics] Perform clean up delete in batches\n(#245775)](https://github.com/elastic/kibana/pull/245775)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"9.1","label":"v9.1.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.19:Questions ?
Please refer to the Backport tool documentation