Skip to content
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

[Automatic Import] Fix deploy error after editing the pipeline #194203

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

bhapas
Copy link
Contributor

@bhapas bhapas commented Sep 26, 2024

Release Note

Fixes a bug that is causing the deploy step to fail after a pipeline edit/save.

Summary

#190407 introduced a bug that deployment fails when a pipeline is edited and saved in the review step.

The issue is that after the edit pipeline flow is executed the review step's result is overridden and samplesFormat is removed which if not present the useEffect in Deploy step fails.

This PR fixes the issue by saving the samplesFormat that is present in the original result before the edit pipeline flow is executed there by having samplesFormat in the result.

@bhapas bhapas added bug Fixes for quality problems that affect the customer experience release_note:fix backport:prev-major Backport to (8.x, 8.16, 8.15) the previous major branch and all later branches still in development Team:Security-Scalability Team label for Security Integrations Scalability Team Feature:AutomaticImport labels Sep 26, 2024
@bhapas bhapas self-assigned this Sep 26, 2024
@bhapas bhapas requested a review from a team as a code owner September 26, 2024 17:22
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-scalability (Team:Security-Scalability)

@bhapas bhapas requested a review from semd September 26, 2024 17:22
@bhapas bhapas force-pushed the automatic_import_fix_edit_deploy branch from ff96ad3 to e8c3282 Compare September 26, 2024 17:23
Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@kgeller kgeller left a comment

Choose a reason for hiding this comment

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

Could we also add a unit test for this? So we don't inadvertently break it again in the future

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #3 / migration actions reindex & waitForReindexTask resolves left wait_for_task_completion_timeout when the task does not finish within the timeout

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
integrationAssistant 948.8KB 948.8KB +36.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @bhapas

@bhapas bhapas merged commit 6366dc3 into elastic:main Sep 26, 2024
21 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.15, 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 26, 2024
…ic#194203)

## Release Note

Fixes a bug that is causing the deploy step to fail after a pipeline
edit/save.

## Summary

elastic#190407 introduced a bug that deployment fails when a pipeline is edited
and saved in the review step.

The issue is that after the edit pipeline flow is executed the review
step's result is overridden and `samplesFormat` is removed which if not
present [the `useEffect` in Deploy
step](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)
fails.

This PR fixes the issue by saving the `samplesFormat` that is present in
the original result before the edit pipeline flow is executed there by
having samplesFormat in the result.

(cherry picked from commit 6366dc3)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 26, 2024
…ic#194203)

## Release Note

Fixes a bug that is causing the deploy step to fail after a pipeline
edit/save.

## Summary

elastic#190407 introduced a bug that deployment fails when a pipeline is edited
and saved in the review step.

The issue is that after the edit pipeline flow is executed the review
step's result is overridden and `samplesFormat` is removed which if not
present [the `useEffect` in Deploy
step](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)
fails.

This PR fixes the issue by saving the `samplesFormat` that is present in
the original result before the edit pipeline flow is executed there by
having samplesFormat in the result.

(cherry picked from commit 6366dc3)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.15
8.x

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 Sep 26, 2024
…194203) (#194217)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Automatic Import] Fix deploy error after editing the pipeline
(#194203)](#194203)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Bharat
Pasupula","email":"123897612+bhapas@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-26T19:09:38Z","message":"[Automatic
Import] Fix deploy error after editing the pipeline (#194203)\n\n##
Release Note\r\n\r\nFixes a bug that is causing the deploy step to fail
after a pipeline\r\nedit/save.\r\n\r\n## Summary\r\n\r\n#190407
introduced a bug that deployment fails when a pipeline is edited\r\nand
saved in the review step.\r\n\r\nThe issue is that after the edit
pipeline flow is executed the review\r\nstep's result is overridden and
`samplesFormat` is removed which if not\r\npresent [the `useEffect` in
Deploy\r\nstep](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)\r\nfails.\r\n\r\nThis
PR fixes the issue by saving the `samplesFormat` that is present
in\r\nthe original result before the edit pipeline flow is executed
there by\r\nhaving samplesFormat in the
result.","sha":"6366dc344a239a24c65f8c6c829a43353e0243d6","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Fix deploy error after editing the
pipeline","number":194203,"url":"https://github.com/elastic/kibana/pull/194203","mergeCommit":{"message":"[Automatic
Import] Fix deploy error after editing the pipeline (#194203)\n\n##
Release Note\r\n\r\nFixes a bug that is causing the deploy step to fail
after a pipeline\r\nedit/save.\r\n\r\n## Summary\r\n\r\n#190407
introduced a bug that deployment fails when a pipeline is edited\r\nand
saved in the review step.\r\n\r\nThe issue is that after the edit
pipeline flow is executed the review\r\nstep's result is overridden and
`samplesFormat` is removed which if not\r\npresent [the `useEffect` in
Deploy\r\nstep](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)\r\nfails.\r\n\r\nThis
PR fixes the issue by saving the `samplesFormat` that is present
in\r\nthe original result before the edit pipeline flow is executed
there by\r\nhaving samplesFormat in the
result.","sha":"6366dc344a239a24c65f8c6c829a43353e0243d6"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194203","number":194203,"mergeCommit":{"message":"[Automatic
Import] Fix deploy error after editing the pipeline (#194203)\n\n##
Release Note\r\n\r\nFixes a bug that is causing the deploy step to fail
after a pipeline\r\nedit/save.\r\n\r\n## Summary\r\n\r\n#190407
introduced a bug that deployment fails when a pipeline is edited\r\nand
saved in the review step.\r\n\r\nThe issue is that after the edit
pipeline flow is executed the review\r\nstep's result is overridden and
`samplesFormat` is removed which if not\r\npresent [the `useEffect` in
Deploy\r\nstep](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)\r\nfails.\r\n\r\nThis
PR fixes the issue by saving the `samplesFormat` that is present
in\r\nthe original result before the edit pipeline flow is executed
there by\r\nhaving samplesFormat in the
result.","sha":"6366dc344a239a24c65f8c6c829a43353e0243d6"}}]}]
BACKPORT-->

Co-authored-by: Bharat Pasupula <123897612+bhapas@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Sep 26, 2024
…#194203) (#194216)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Automatic Import] Fix deploy error after editing the pipeline
(#194203)](#194203)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Bharat
Pasupula","email":"123897612+bhapas@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-26T19:09:38Z","message":"[Automatic
Import] Fix deploy error after editing the pipeline (#194203)\n\n##
Release Note\r\n\r\nFixes a bug that is causing the deploy step to fail
after a pipeline\r\nedit/save.\r\n\r\n## Summary\r\n\r\n#190407
introduced a bug that deployment fails when a pipeline is edited\r\nand
saved in the review step.\r\n\r\nThe issue is that after the edit
pipeline flow is executed the review\r\nstep's result is overridden and
`samplesFormat` is removed which if not\r\npresent [the `useEffect` in
Deploy\r\nstep](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)\r\nfails.\r\n\r\nThis
PR fixes the issue by saving the `samplesFormat` that is present
in\r\nthe original result before the edit pipeline flow is executed
there by\r\nhaving samplesFormat in the
result.","sha":"6366dc344a239a24c65f8c6c829a43353e0243d6","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Fix deploy error after editing the
pipeline","number":194203,"url":"https://github.com/elastic/kibana/pull/194203","mergeCommit":{"message":"[Automatic
Import] Fix deploy error after editing the pipeline (#194203)\n\n##
Release Note\r\n\r\nFixes a bug that is causing the deploy step to fail
after a pipeline\r\nedit/save.\r\n\r\n## Summary\r\n\r\n#190407
introduced a bug that deployment fails when a pipeline is edited\r\nand
saved in the review step.\r\n\r\nThe issue is that after the edit
pipeline flow is executed the review\r\nstep's result is overridden and
`samplesFormat` is removed which if not\r\npresent [the `useEffect` in
Deploy\r\nstep](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)\r\nfails.\r\n\r\nThis
PR fixes the issue by saving the `samplesFormat` that is present
in\r\nthe original result before the edit pipeline flow is executed
there by\r\nhaving samplesFormat in the
result.","sha":"6366dc344a239a24c65f8c6c829a43353e0243d6"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194203","number":194203,"mergeCommit":{"message":"[Automatic
Import] Fix deploy error after editing the pipeline (#194203)\n\n##
Release Note\r\n\r\nFixes a bug that is causing the deploy step to fail
after a pipeline\r\nedit/save.\r\n\r\n## Summary\r\n\r\n#190407
introduced a bug that deployment fails when a pipeline is edited\r\nand
saved in the review step.\r\n\r\nThe issue is that after the edit
pipeline flow is executed the review\r\nstep's result is overridden and
`samplesFormat` is removed which if not\r\npresent [the `useEffect` in
Deploy\r\nstep](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)\r\nfails.\r\n\r\nThis
PR fixes the issue by saving the `samplesFormat` that is present
in\r\nthe original result before the edit pipeline flow is executed
there by\r\nhaving samplesFormat in the
result.","sha":"6366dc344a239a24c65f8c6c829a43353e0243d6"}}]}]
BACKPORT-->

Co-authored-by: Bharat Pasupula <123897612+bhapas@users.noreply.github.com>
@bhapas bhapas added v8.15.3 and removed v8.15.2 labels Sep 27, 2024
angorayc pushed a commit to angorayc/kibana that referenced this pull request Oct 1, 2024
…ic#194203)

## Release Note

Fixes a bug that is causing the deploy step to fail after a pipeline
edit/save.

## Summary

elastic#190407 introduced a bug that deployment fails when a pipeline is edited
and saved in the review step.

The issue is that after the edit pipeline flow is executed the review
step's result is overridden and `samplesFormat` is removed which if not
present [the `useEffect` in Deploy
step](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)
fails.

This PR fixes the issue by saving the `samplesFormat` that is present in
the original result before the edit pipeline flow is executed there by
having samplesFormat in the result.
neptunian pushed a commit to neptunian/kibana that referenced this pull request Oct 1, 2024
…lastic#194203) (elastic#194217)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Automatic Import] Fix deploy error after editing the pipeline
(elastic#194203)](elastic#194203)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Bharat
Pasupula","email":"123897612+bhapas@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-26T19:09:38Z","message":"[Automatic
Import] Fix deploy error after editing the pipeline (elastic#194203)\n\n##
Release Note\r\n\r\nFixes a bug that is causing the deploy step to fail
after a pipeline\r\nedit/save.\r\n\r\n## Summary\r\n\r\n#190407
introduced a bug that deployment fails when a pipeline is edited\r\nand
saved in the review step.\r\n\r\nThe issue is that after the edit
pipeline flow is executed the review\r\nstep's result is overridden and
`samplesFormat` is removed which if not\r\npresent [the `useEffect` in
Deploy\r\nstep](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)\r\nfails.\r\n\r\nThis
PR fixes the issue by saving the `samplesFormat` that is present
in\r\nthe original result before the edit pipeline flow is executed
there by\r\nhaving samplesFormat in the
result.","sha":"6366dc344a239a24c65f8c6c829a43353e0243d6","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Fix deploy error after editing the
pipeline","number":194203,"url":"https://github.com/elastic/kibana/pull/194203","mergeCommit":{"message":"[Automatic
Import] Fix deploy error after editing the pipeline (elastic#194203)\n\n##
Release Note\r\n\r\nFixes a bug that is causing the deploy step to fail
after a pipeline\r\nedit/save.\r\n\r\n## Summary\r\n\r\n#190407
introduced a bug that deployment fails when a pipeline is edited\r\nand
saved in the review step.\r\n\r\nThe issue is that after the edit
pipeline flow is executed the review\r\nstep's result is overridden and
`samplesFormat` is removed which if not\r\npresent [the `useEffect` in
Deploy\r\nstep](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)\r\nfails.\r\n\r\nThis
PR fixes the issue by saving the `samplesFormat` that is present
in\r\nthe original result before the edit pipeline flow is executed
there by\r\nhaving samplesFormat in the
result.","sha":"6366dc344a239a24c65f8c6c829a43353e0243d6"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194203","number":194203,"mergeCommit":{"message":"[Automatic
Import] Fix deploy error after editing the pipeline (elastic#194203)\n\n##
Release Note\r\n\r\nFixes a bug that is causing the deploy step to fail
after a pipeline\r\nedit/save.\r\n\r\n## Summary\r\n\r\n#190407
introduced a bug that deployment fails when a pipeline is edited\r\nand
saved in the review step.\r\n\r\nThe issue is that after the edit
pipeline flow is executed the review\r\nstep's result is overridden and
`samplesFormat` is removed which if not\r\npresent [the `useEffect` in
Deploy\r\nstep](https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/deploy_step/use_deploy_integration.ts#L41)\r\nfails.\r\n\r\nThis
PR fixes the issue by saving the `samplesFormat` that is present
in\r\nthe original result before the edit pipeline flow is executed
there by\r\nhaving samplesFormat in the
result.","sha":"6366dc344a239a24c65f8c6c829a43353e0243d6"}}]}]
BACKPORT-->

Co-authored-by: Bharat Pasupula <123897612+bhapas@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.16, 8.15) the previous major branch and all later branches still in development bug Fixes for quality problems that affect the customer experience Feature:AutomaticImport release_note:fix Team:Security-Scalability Team label for Security Integrations Scalability Team v8.15.3 v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants