-
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
[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing #210217
Conversation
Pinging @elastic/ml-ui (:ml) |
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge upstream |
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.
Code changes LGTM
Hi folks, is anything else needed for this PR to merge? Thanks again for the swift work! |
).then((results) => results.flat()); | ||
); | ||
|
||
authorizedTransforms = await Promise.all(transformsPromises).then((results) => results.flat()); |
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.
Probably worth putting this in a pMap
and limit the concurrency, to avoid to may concurrent requests
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.
@nchaulet Updated here 08c2c35
(#210217)
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.
LGTM 🚀
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
cc @qn895 |
Starting backport for target branches: 8.16, 8.17, 8.18, 8.x, 9.0 |
…ically restarting after reauthorizing (elastic#210217) ## Summary This PR partially addresses an issue with elastic/integrations#12486 where the transform doesn't "restart" immediately after reauthorizing. This is because for unattended transform, calling `_start` will come back with 409 transform already started error. So this PR tracks if the transform has `settings.unattended: true`, if yes, stop the transform first before starting. Without this step, the transform will retry again and become healthy again anyway but it takes longer for that retry to happen, so this PR speeds up the process of retrying. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit e710f09)
💔 Some backports could not be createdNote: 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 |
…utomatically restarting after reauthorizing (#210217) (#210950) # Backport This will backport the following commits from `main` to `9.0`: - [[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing (#210217)](#210217) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Quynh Nguyen (Quinn)","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-13T05:49:58Z","message":"[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing (#210217)\n\n## Summary\n\nThis PR partially addresses an issue with\nhttps://github.com/elastic/integrations/issues/12486 where the transform\ndoesn't \"restart\" immediately after reauthorizing. This is because for\nunattended transform, calling `_start` will come back with 409 transform\nalready started error. So this PR tracks if the transform has\n`settings.unattended: true`, if yes, stop the transform first before\nstarting.\n\nWithout this step, the transform will retry again and become healthy\nagain anyway but it takes longer for that retry to happen, so this PR\nspeeds up the process of retrying.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Elastic Machine <[email protected]>","sha":"e710f09d0c1159a9018ff6b9dfbac151509213f9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Team:Fleet","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0","v8.17.3","v8.16.5"],"title":"[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing","number":210217,"url":"https://github.com/elastic/kibana/pull/210217","mergeCommit":{"message":"[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing (#210217)\n\n## Summary\n\nThis PR partially addresses an issue with\nhttps://github.com/elastic/integrations/issues/12486 where the transform\ndoesn't \"restart\" immediately after reauthorizing. This is because for\nunattended transform, calling `_start` will come back with 409 transform\nalready started error. So this PR tracks if the transform has\n`settings.unattended: true`, if yes, stop the transform first before\nstarting.\n\nWithout this step, the transform will retry again and become healthy\nagain anyway but it takes longer for that retry to happen, so this PR\nspeeds up the process of retrying.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Elastic Machine <[email protected]>","sha":"e710f09d0c1159a9018ff6b9dfbac151509213f9"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x","8.17","8.16"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210217","number":210217,"mergeCommit":{"message":"[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing (#210217)\n\n## Summary\n\nThis PR partially addresses an issue with\nhttps://github.com/elastic/integrations/issues/12486 where the transform\ndoesn't \"restart\" immediately after reauthorizing. This is because for\nunattended transform, calling `_start` will come back with 409 transform\nalready started error. So this PR tracks if the transform has\n`settings.unattended: true`, if yes, stop the transform first before\nstarting.\n\nWithout this step, the transform will retry again and become healthy\nagain anyway but it takes longer for that retry to happen, so this PR\nspeeds up the process of retrying.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Elastic Machine <[email protected]>","sha":"e710f09d0c1159a9018ff6b9dfbac151509213f9"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Quynh Nguyen (Quinn) <[email protected]>
Hi, we're trying this out the PR #210217 but unable to conduct the following: Cloud: Local, using SNAPSHOTS: [Update: 8.18.0 -> 9.0.0 works, not to be confused with 8.16.1 -> 8.18.0 (unhealthy) -> 9.0.0] I saw that the backport hasn't been able to complete? |
Sorry @susan-shu-c I missed the conflicts in the backports. Working on backporting now 👍 |
Thanks @qn895 ! Thankfully it's not blocking 9.0 as we found that 8.18 -> 9.0 did work, but since the overall test plan requires the 8.x -> 8.x testing, we still need to complete it at some point. Just confirming that the urgency is lower than any other 9.0 fixes, though still related. Appreciate it! |
…utomatically restarting after reauthorizing (#210217) (#211316) # Backport This will backport the following commits from `main` to `8.x`: - [[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing (#210217)](#210217) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Quynh Nguyen (Quinn)","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-13T05:49:58Z","message":"[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing (#210217)\n\n## Summary\n\nThis PR partially addresses an issue with\nhttps://github.com/elastic/integrations/issues/12486 where the transform\ndoesn't \"restart\" immediately after reauthorizing. This is because for\nunattended transform, calling `_start` will come back with 409 transform\nalready started error. So this PR tracks if the transform has\n`settings.unattended: true`, if yes, stop the transform first before\nstarting.\n\nWithout this step, the transform will retry again and become healthy\nagain anyway but it takes longer for that retry to happen, so this PR\nspeeds up the process of retrying.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Elastic Machine <[email protected]>","sha":"e710f09d0c1159a9018ff6b9dfbac151509213f9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Team:Fleet","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0","v8.17.3","v8.16.5"],"title":"[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing","number":210217,"url":"https://github.com/elastic/kibana/pull/210217","mergeCommit":{"message":"[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing (#210217)\n\n## Summary\n\nThis PR partially addresses an issue with\nhttps://github.com/elastic/integrations/issues/12486 where the transform\ndoesn't \"restart\" immediately after reauthorizing. This is because for\nunattended transform, calling `_start` will come back with 409 transform\nalready started error. So this PR tracks if the transform has\n`settings.unattended: true`, if yes, stop the transform first before\nstarting.\n\nWithout this step, the transform will retry again and become healthy\nagain anyway but it takes longer for that retry to happen, so this PR\nspeeds up the process of retrying.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Elastic Machine <[email protected]>","sha":"e710f09d0c1159a9018ff6b9dfbac151509213f9"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.x","8.17","8.16"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/210950","number":210950,"state":"MERGED","mergeCommit":{"sha":"a8d9319cdd70a1ead8228d0da858c71bd709efe6","message":"[9.0] [Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing (#210217) (#210950)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.0`:\n- [[Fleet] Fix unattended Transforms in integration packages not\nautomatically restarting after reauthorizing\n(#210217)](https://github.com/elastic/kibana/pull/210217)\n\n<!--- Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT [{\"author\":{\"name\":\"Quynh Nguyen\n(Quinn)\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2025-02-13T05:49:58Z\",\"message\":\"[Fleet]\nFix unattended Transforms in integration packages not automatically\nrestarting after reauthorizing (#210217)\\n\\n## Summary\\n\\nThis PR\npartially addresses an issue\nwith\\nhttps://github.com/elastic/integrations/issues/12486 where the\ntransform\\ndoesn't \\\"restart\\\" immediately after reauthorizing. This is\nbecause for\\nunattended transform, calling `_start` will come back with\n409 transform\\nalready started error. So this PR tracks if the transform\nhas\\n`settings.unattended: true`, if yes, stop the transform first\nbefore\\nstarting.\\n\\nWithout this step, the transform will retry again\nand become healthy\\nagain anyway but it takes longer for that retry to\nhappen, so this PR\\nspeeds up the process of retrying.\\n\\n\\n###\nChecklist\\n\\nCheck the PR satisfies following conditions. \\n\\nReviewers\nshould verify this PR satisfies this list as well.\\n\\n- [ ] Any text\nadded follows [EUI's\nwriting\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\nsentence case text and includes\n[i18n\\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\\n-\n[\n]\\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\\nwas\nadded for features that require explanation or tutorials\\n- [ ] [Unit or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated or added to match the most common scenarios\\n- [ ] If a plugin\nconfiguration key changed, check if it needs to be\\nallowlisted in the\ncloud and added to the\n[docker\\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\\n-\n[ ] This was checked for breaking HTTP API changes, and any\nbreaking\\nchanges have been approved by the breaking-change committee.\nThe\\n`release_note:breaking` label should be applied in these\nsituations.\\n- [ ] [Flaky\nTest\\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)\nwas\\nused on any tests changed\\n- [ ] The PR description includes the\nappropriate Release Notes section,\\nand the correct `release_note:*`\nlabel is applied per\nthe\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\n\\n###\nIdentify risks\\n\\nDoes this PR introduce any risks? For example,\nconsider risks like hard\\nto test bugs, performance regression,\npotential of data loss.\\n\\nDescribe the risk, its severity, and\nmitigation for each identified\\nrisk. Invite stakeholders and evaluate\nhow to proceed before merging.\\n\\n- [ ] [See some\nrisk\\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\\n-\n[ ] ...\\n\\n---------\\n\\nCo-authored-by: Elastic Machine\n<[email protected]>\",\"sha\":\"e710f09d0c1159a9018ff6b9dfbac151509213f9\",\"branchLabelMapping\":{\"^v9.1.0$\":\"main\",\"^v8.19.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:fix\",\":ml\",\"Team:Fleet\",\"v9.0.0\",\"backport:version\",\"v8.18.0\",\"v9.1.0\",\"v8.19.0\",\"v8.17.3\",\"v8.16.5\"],\"title\":\"[Fleet]\nFix unattended Transforms in integration packages not automatically\nrestarting after\nreauthorizing\",\"number\":210217,\"url\":\"https://github.com/elastic/kibana/pull/210217\",\"mergeCommit\":{\"message\":\"[Fleet]\nFix unattended Transforms in integration packages not automatically\nrestarting after reauthorizing (#210217)\\n\\n## Summary\\n\\nThis PR\npartially addresses an issue\nwith\\nhttps://github.com/elastic/integrations/issues/12486 where the\ntransform\\ndoesn't \\\"restart\\\" immediately after reauthorizing. This is\nbecause for\\nunattended transform, calling `_start` will come back with\n409 transform\\nalready started error. So this PR tracks if the transform\nhas\\n`settings.unattended: true`, if yes, stop the transform first\nbefore\\nstarting.\\n\\nWithout this step, the transform will retry again\nand become healthy\\nagain anyway but it takes longer for that retry to\nhappen, so this PR\\nspeeds up the process of retrying.\\n\\n\\n###\nChecklist\\n\\nCheck the PR satisfies following conditions. \\n\\nReviewers\nshould verify this PR satisfies this list as well.\\n\\n- [ ] Any text\nadded follows [EUI's\nwriting\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\nsentence case text and includes\n[i18n\\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\\n-\n[\n]\\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\\nwas\nadded for features that require explanation or tutorials\\n- [ ] [Unit or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated or added to match the most common scenarios\\n- [ ] If a plugin\nconfiguration key changed, check if it needs to be\\nallowlisted in the\ncloud and added to the\n[docker\\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\\n-\n[ ] This was checked for breaking HTTP API changes, and any\nbreaking\\nchanges have been approved by the breaking-change committee.\nThe\\n`release_note:breaking` label should be applied in these\nsituations.\\n- [ ] [Flaky\nTest\\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)\nwas\\nused on any tests changed\\n- [ ] The PR description includes the\nappropriate Release Notes section,\\nand the correct `release_note:*`\nlabel is applied per\nthe\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\n\\n###\nIdentify risks\\n\\nDoes this PR introduce any risks? For example,\nconsider risks like hard\\nto test bugs, performance regression,\npotential of data loss.\\n\\nDescribe the risk, its severity, and\nmitigation for each identified\\nrisk. Invite stakeholders and evaluate\nhow to proceed before merging.\\n\\n- [ ] [See some\nrisk\\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\\n-\n[ ] ...\\n\\n---------\\n\\nCo-authored-by: Elastic Machine\n<[email protected]>\",\"sha\":\"e710f09d0c1159a9018ff6b9dfbac151509213f9\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"9.0\",\"8.18\",\"8.x\",\"8.17\",\"8.16\"],\"targetPullRequestStates\":[{\"branch\":\"9.0\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.18\",\"label\":\"v8.18.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"main\",\"label\":\"v9.1.0\",\"branchLabelMappingKey\":\"^v9.1.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/210217\",\"number\":210217,\"mergeCommit\":{\"message\":\"[Fleet]\nFix unattended Transforms in integration packages not automatically\nrestarting after reauthorizing (#210217)\\n\\n## Summary\\n\\nThis PR\npartially addresses an issue\nwith\\nhttps://github.com/elastic/integrations/issues/12486 where the\ntransform\\ndoesn't \\\"restart\\\" immediately after reauthorizing. This is\nbecause for\\nunattended transform, calling `_start` will come back with\n409 transform\\nalready started error. So this PR tracks if the transform\nhas\\n`settings.unattended: true`, if yes, stop the transform first\nbefore\\nstarting.\\n\\nWithout this step, the transform will retry again\nand become healthy\\nagain anyway but it takes longer for that retry to\nhappen, so this PR\\nspeeds up the process of retrying.\\n\\n\\n###\nChecklist\\n\\nCheck the PR satisfies following conditions. \\n\\nReviewers\nshould verify this PR satisfies this list as well.\\n\\n- [ ] Any text\nadded follows [EUI's\nwriting\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\nsentence case text and includes\n[i18n\\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\\n-\n[\n]\\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\\nwas\nadded for features that require explanation or tutorials\\n- [ ] [Unit or\nfunctional\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\nwere\nupdated or added to match the most common scenarios\\n- [ ] If a plugin\nconfiguration key changed, check if it needs to be\\nallowlisted in the\ncloud and added to the\n[docker\\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\\n-\n[ ] This was checked for breaking HTTP API changes, and any\nbreaking\\nchanges have been approved by the breaking-change committee.\nThe\\n`release_note:breaking` label should be applied in these\nsituations.\\n- [ ] [Flaky\nTest\\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)\nwas\\nused on any tests changed\\n- [ ] The PR description includes the\nappropriate Release Notes section,\\nand the correct `release_note:*`\nlabel is applied per\nthe\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\n\\n###\nIdentify risks\\n\\nDoes this PR introduce any risks? For example,\nconsider risks like hard\\nto test bugs, performance regression,\npotential of data loss.\\n\\nDescribe the risk, its severity, and\nmitigation for each identified\\nrisk. Invite stakeholders and evaluate\nhow to proceed before merging.\\n\\n- [ ] [See some\nrisk\\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\\n-\n[ ] ...\\n\\n---------\\n\\nCo-authored-by: Elastic Machine\n<[email protected]>\",\"sha\":\"e710f09d0c1159a9018ff6b9dfbac151509213f9\"}},{\"branch\":\"8.x\",\"label\":\"v8.19.0\",\"branchLabelMappingKey\":\"^v8.19.0$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.17\",\"label\":\"v8.17.3\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.16\",\"label\":\"v8.16.5\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by: Quynh Nguyen (Quinn) <[email protected]>"}},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210217","number":210217,"mergeCommit":{"message":"[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing (#210217)\n\n## Summary\n\nThis PR partially addresses an issue with\nhttps://github.com/elastic/integrations/issues/12486 where the transform\ndoesn't \"restart\" immediately after reauthorizing. This is because for\nunattended transform, calling `_start` will come back with 409 transform\nalready started error. So this PR tracks if the transform has\n`settings.unattended: true`, if yes, stop the transform first before\nstarting.\n\nWithout this step, the transform will retry again and become healthy\nagain anyway but it takes longer for that retry to happen, so this PR\nspeeds up the process of retrying.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Elastic Machine <[email protected]>","sha":"e710f09d0c1159a9018ff6b9dfbac151509213f9"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Elastic Machine <[email protected]>
Summary
This PR partially addresses an issue with elastic/integrations#12486 where the transform doesn't "restart" immediately after reauthorizing. This is because for unattended transform, calling
_start
will come back with 409 transform already started error. So this PR tracks if the transform hassettings.unattended: true
, if yes, stop the transform first before starting.Without this step, the transform will retry again and become healthy again anyway but it takes longer for that retry to happen, so this PR speeds up the process of retrying.
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breaking
label should be applied in these situations.release_note:*
label is applied per the guidelinesIdentify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.