Skip to content

[9.2] [Synthetics] Perform clean up delete in batches (#245775)#245904

Merged
kibanamachine merged 1 commit intoelastic:9.2from
kibanamachine:backport/9.2/pr-245775
Dec 10, 2025
Merged

[9.2] [Synthetics] Perform clean up delete in batches (#245775)#245904
kibanamachine merged 1 commit intoelastic:9.2from
kibanamachine:backport/9.2/pr-245775

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.2:

Questions ?

Please refer to the Backport tool documentation

## 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)
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@kibanamachine kibanamachine merged commit 03c026c into elastic:9.2 Dec 10, 2025
18 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @shahzad31

shahzad31 added a commit that referenced this pull request Dec 11, 2025
…5926)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[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"],"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":["8.19"],"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,"state":"NOT_CREATED"}]}]
BACKPORT-->
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-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:obs-ux-management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants