Skip to content

[ML] Removing removeIfExists from sync task scheduler#228783

Merged
jgowdyelastic merged 2 commits intoelastic:mainfrom
jgowdyelastic:removing-removeIfExists-from-sync-task-scheduler
Jul 21, 2025
Merged

[ML] Removing removeIfExists from sync task scheduler#228783
jgowdyelastic merged 2 commits intoelastic:mainfrom
jgowdyelastic:removing-removeIfExists-from-sync-task-scheduler

Conversation

@jgowdyelastic
Copy link
Copy Markdown
Member

@jgowdyelastic jgowdyelastic commented Jul 21, 2025

The call to removeIfExists is not necessary and can result in a possible race condition when the sync task is claimed.
Fixes #226554
Related to #226481

Targeting versions: 9.2.0, 9.1.1, 9.0.5, 8.19.1, 8.18.5

@jgowdyelastic jgowdyelastic marked this pull request as ready for review July 21, 2025 12:58
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner July 21, 2025 12:58
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @jgowdyelastic

Copy link
Copy Markdown
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jgowdyelastic jgowdyelastic merged commit c346834 into elastic:main Jul 21, 2025
13 checks passed
Bluefinger pushed a commit to Bluefinger/kibana that referenced this pull request Jul 22, 2025
The call to `removeIfExists` is not necessary and can result in a
possible race condition when the sync task is claimed.
Fixes elastic#226554
Related to elastic#226481
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jul 23, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 228783 locally
cc: @jgowdyelastic

1 similar comment
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 228783 locally
cc: @jgowdyelastic

kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
The call to `removeIfExists` is not necessary and can result in a
possible race condition when the sync task is claimed.
Fixes elastic#226554
Related to elastic#226481
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 228783 locally
cc: @jgowdyelastic

crespocarlos pushed a commit to crespocarlos/kibana that referenced this pull request Jul 25, 2025
The call to `removeIfExists` is not necessary and can result in a
possible race condition when the sync task is claimed.
Fixes elastic#226554
Related to elastic#226481
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 228783 locally
cc: @jgowdyelastic

@jgowdyelastic jgowdyelastic added v9.0.5 v8.18.5 backport:version Backport to applied version labels and removed backport missing Added to PRs automatically when the are determined to be missing a backport. backport:version Backport to applied version labels labels Jul 28, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.18, 9.0

https://github.com/elastic/kibana/actions/runs/16573959321

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 28, 2025
The call to `removeIfExists` is not necessary and can result in a
possible race condition when the sync task is claimed.
Fixes elastic#226554
Related to elastic#226481

(cherry picked from commit c346834)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 28, 2025
The call to `removeIfExists` is not necessary and can result in a
possible race condition when the sync task is claimed.
Fixes elastic#226554
Related to elastic#226481

(cherry picked from commit c346834)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.18
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 28, 2025
#229684)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[ML] Removing removeIfExists from sync task scheduler
(#228783)](#228783)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2025-07-21T15:33:36Z","message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport
pending",":ml","backport:version","v9.2.0","v9.0.5","v8.18.5"],"title":"[ML]
Removing removeIfExists from sync task
scheduler","number":228783,"url":"https://github.com/elastic/kibana/pull/228783","mergeCommit":{"message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228783","number":228783,"mergeCommit":{"message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <jgowdy@elastic.co>
kibanamachine added a commit that referenced this pull request Jul 29, 2025
…#229686)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[ML] Removing removeIfExists from sync task scheduler
(#228783)](#228783)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2025-07-21T15:33:36Z","message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport
pending",":ml","backport:version","v9.2.0","v9.0.5","v8.18.5"],"title":"[ML]
Removing removeIfExists from sync task
scheduler","number":228783,"url":"https://github.com/elastic/kibana/pull/228783","mergeCommit":{"message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228783","number":228783,"mergeCommit":{"message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <jgowdy@elastic.co>
@jgowdyelastic jgowdyelastic added v9.1.1 v8.19.1 backport:version Backport to applied version labels and removed backport pending backport:version Backport to applied version labels labels Jul 30, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.18, 8.19, 9.0, 9.1

https://github.com/elastic/kibana/actions/runs/16616617814

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 30, 2025
The call to `removeIfExists` is not necessary and can result in a
possible race condition when the sync task is claimed.
Fixes elastic#226554
Related to elastic#226481

(cherry picked from commit c346834)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 30, 2025
The call to `removeIfExists` is not necessary and can result in a
possible race condition when the sync task is claimed.
Fixes elastic#226554
Related to elastic#226481

(cherry picked from commit c346834)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Cherrypick failed because the selected commit (c346834) is empty. It looks like the commit was already backported in #229684
8.19
9.0 Cherrypick failed because the selected commit (c346834) is empty. It looks like the commit was already backported in #229686
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 228783

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 30, 2025
#229916)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ML] Removing removeIfExists from sync task scheduler
(#228783)](#228783)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2025-07-21T15:33:36Z","message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[ML]
Removing removeIfExists from sync task
scheduler","number":228783,"url":"https://github.com/elastic/kibana/pull/228783","mergeCommit":{"message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228783","number":228783,"mergeCommit":{"message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/229686","number":229686,"state":"MERGED","mergeCommit":{"sha":"cdd1d7dd1c9e8f0e816d6133b5bf62db164efecf","message":"[9.0]
[ML] Removing removeIfExists from sync task scheduler (#228783)
(#229686)\n\n# Backport\n\nThis will backport the following commits from
`main` to `9.0`:\n- [[ML] Removing removeIfExists from sync task
scheduler\n(#228783)](https://github.com/elastic/kibana/pull/228783)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
James Gowdy
<jgowdy@elastic.co>"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/229684","number":229684,"state":"MERGED","mergeCommit":{"sha":"e8dd72e7489f6b2f7dad4d3a6a93b7b0601bdb35","message":"[8.18]
[ML] Removing removeIfExists from sync task scheduler (#228783)
(#229684)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.18`:\n- [[ML] Removing removeIfExists from sync task
scheduler\n(#228783)](https://github.com/elastic/kibana/pull/228783)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
James Gowdy
<jgowdy@elastic.co>"}},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <jgowdy@elastic.co>
kibanamachine added a commit that referenced this pull request Jul 30, 2025
…#229917)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[ML] Removing removeIfExists from sync task scheduler
(#228783)](#228783)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2025-07-21T15:33:36Z","message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[ML]
Removing removeIfExists from sync task
scheduler","number":228783,"url":"https://github.com/elastic/kibana/pull/228783","mergeCommit":{"message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228783","number":228783,"mergeCommit":{"message":"[ML]
Removing removeIfExists from sync task scheduler (#228783)\n\nThe call
to `removeIfExists` is not necessary and can result in a\npossible race
condition when the sync task is claimed.\nFixes
https://github.com/elastic/kibana/issues/226554\nRelated to
https://github.com/elastic/kibana/pull/226481","sha":"c346834223f93a62f377d3d245b60a0390c5ed3e"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/229686","number":229686,"state":"MERGED","mergeCommit":{"sha":"cdd1d7dd1c9e8f0e816d6133b5bf62db164efecf","message":"[9.0]
[ML] Removing removeIfExists from sync task scheduler (#228783)
(#229686)\n\n# Backport\n\nThis will backport the following commits from
`main` to `9.0`:\n- [[ML] Removing removeIfExists from sync task
scheduler\n(#228783)](https://github.com/elastic/kibana/pull/228783)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
James Gowdy
<jgowdy@elastic.co>"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/229684","number":229684,"state":"MERGED","mergeCommit":{"sha":"e8dd72e7489f6b2f7dad4d3a6a93b7b0601bdb35","message":"[8.18]
[ML] Removing removeIfExists from sync task scheduler (#228783)
(#229684)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.18`:\n- [[ML] Removing removeIfExists from sync task
scheduler\n(#228783)](https://github.com/elastic/kibana/pull/228783)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
James Gowdy
<jgowdy@elastic.co>"}},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <jgowdy@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment