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

[Fleet] Remove duplicate path being pushed to archive #162724

Merged
merged 3 commits into from
Jul 31, 2023

Conversation

juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Jul 28, 2023

Summary

Fix #162639

Found a bug when paths were pushed twice in package archive, this results in an error when trying to reinstall endpoint package, fails with a conflict error when creating transforms.

See more details here: #162639 (comment)

It was introduced with this change, perhaps unintentionally: https://github.com/elastic/kibana/pull/151655/files

I think this bug is also the reason of many issues with package reinstallation. I could reproduce another bug when trying to reinstall system integration, that is also fixed by removing the duplicate paths.

[2023-07-28T17:41:27.116+02:00][ERROR][plugins.fleet] Error: Non-unique import objects detected: [dashboard:system-0d3f2380-fa78-11e6-ae9b-81e5311e8cab,dashboard:system-277876d0-fa2c-11e6-bbd3-29c986c96e5a,dashboard:system-5517a150-f9ce-11e6-8115-a7c18106d86a,dashboard:system-71f720f0-ff18-11e9-8405-516218e3d268,dashboard:system-79ffd6e0-faa0-11e6-947f-177f697178b8,dashboard:system-Logs-syslog-dashboard,dashboard:system-Metrics-system-overview,dashboard:system-Windows-Dashboard,dashboard:system-bae11b00-9bfc-11ea-87e4-49f31ec44891,dashboard:system-bb858830-f412-11e9-8405-516218e3d268,dashboard:system-d401ef40-a7d5-11e9-a422-d144027429da,search:system-06b6b060-7a80-11ea-bc9a-0baf2ca323a3,search:system-324686c0-fefb-11e9-8405-516218e3d268,search:system-62439dc0-f9c9-11e6-a747-6121780e0414,search:system-6f4071a0-7a78-11ea-bc9a-0baf2ca323a3,search:system-757510b0-a87f-11e9-a422-d144027429da,search:system-7e178c80-fee1-11e9-8405-516218e3d268,search:system-8030c1b0-fa77-11e6-ae9b-81e5311e8cab,search:system-9066d5b0-fef2-11e9-8405-516218e3d268,search:system-Syslog-system-logs,search:system-b6f321e0-fa25-11e6-bbd3-29c986c96e5a,search:system-ce71c9a0-a25e-11e9-a422-d144027429da,search:system-eb0039f0-fa7f-11e6-a1df-a78bd7504d38]
    at Function.nonUniqueImportObjects (errors.ts:35:12)

Checklist

@juliaElastic juliaElastic added release_note:fix backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Jul 28, 2023
@juliaElastic juliaElastic self-assigned this Jul 28, 2023
@juliaElastic juliaElastic requested a review from a team as a code owner July 28, 2023 15:34
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Jul 28, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@juliaElastic juliaElastic requested a review from nchaulet July 28, 2023 15:39
Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

good catch 🚀

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Defend Workflows Cypress Tests #1 / Endpoint Policy Response from Endpoint List page should display policy response with errors should display policy response with errors
  • [job] [logs] Defend Workflows Cypress Tests #1 / Endpoint Policy Response from Fleet Agent Details page should display policy response with errors should display policy response with errors

Metrics [docs]

✅ unchanged

History

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

cc @juliaElastic

@juliaElastic juliaElastic merged commit 8749d5f into elastic:main Jul 31, 2023
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.9 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 162724

Questions ?

Please refer to the Backport tool documentation

juliaElastic added a commit to juliaElastic/kibana that referenced this pull request Jul 31, 2023
Fix elastic#162639

Found a bug when paths were pushed twice in package archive, this
results in an error when trying to reinstall endpoint package, fails
with a conflict error when creating transforms.

See more details here:
elastic#162639 (comment)

It was introduced with this change, perhaps unintentionally:
https://github.com/elastic/kibana/pull/151655/files

I think this bug is also the reason of many
[issues](elastic#161804) with package
reinstallation. I could reproduce another bug when trying to reinstall
`system` integration, that is also fixed by removing the duplicate
paths.
```
[2023-07-28T17:41:27.116+02:00][ERROR][plugins.fleet] Error: Non-unique import objects detected: [dashboard:system-0d3f2380-fa78-11e6-ae9b-81e5311e8cab,dashboard:system-277876d0-fa2c-11e6-bbd3-29c986c96e5a,dashboard:system-5517a150-f9ce-11e6-8115-a7c18106d86a,dashboard:system-71f720f0-ff18-11e9-8405-516218e3d268,dashboard:system-79ffd6e0-faa0-11e6-947f-177f697178b8,dashboard:system-Logs-syslog-dashboard,dashboard:system-Metrics-system-overview,dashboard:system-Windows-Dashboard,dashboard:system-bae11b00-9bfc-11ea-87e4-49f31ec44891,dashboard:system-bb858830-f412-11e9-8405-516218e3d268,dashboard:system-d401ef40-a7d5-11e9-a422-d144027429da,search:system-06b6b060-7a80-11ea-bc9a-0baf2ca323a3,search:system-324686c0-fefb-11e9-8405-516218e3d268,search:system-62439dc0-f9c9-11e6-a747-6121780e0414,search:system-6f4071a0-7a78-11ea-bc9a-0baf2ca323a3,search:system-757510b0-a87f-11e9-a422-d144027429da,search:system-7e178c80-fee1-11e9-8405-516218e3d268,search:system-8030c1b0-fa77-11e6-ae9b-81e5311e8cab,search:system-9066d5b0-fef2-11e9-8405-516218e3d268,search:system-Syslog-system-logs,search:system-b6f321e0-fa25-11e6-bbd3-29c986c96e5a,search:system-ce71c9a0-a25e-11e9-a422-d144027429da,search:system-eb0039f0-fa7f-11e6-a1df-a78bd7504d38]
    at Function.nonUniqueImportObjects (errors.ts:35:12)
```

- [ ] [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
ThomThomson pushed a commit to ThomThomson/kibana that referenced this pull request Aug 1, 2023
## Summary

Fix elastic#162639

Found a bug when paths were pushed twice in package archive, this
results in an error when trying to reinstall endpoint package, fails
with a conflict error when creating transforms.

See more details here:
elastic#162639 (comment)

It was introduced with this change, perhaps unintentionally:
https://github.com/elastic/kibana/pull/151655/files

I think this bug is also the reason of many
[issues](elastic#161804) with package
reinstallation. I could reproduce another bug when trying to reinstall
`system` integration, that is also fixed by removing the duplicate
paths.
```
[2023-07-28T17:41:27.116+02:00][ERROR][plugins.fleet] Error: Non-unique import objects detected: [dashboard:system-0d3f2380-fa78-11e6-ae9b-81e5311e8cab,dashboard:system-277876d0-fa2c-11e6-bbd3-29c986c96e5a,dashboard:system-5517a150-f9ce-11e6-8115-a7c18106d86a,dashboard:system-71f720f0-ff18-11e9-8405-516218e3d268,dashboard:system-79ffd6e0-faa0-11e6-947f-177f697178b8,dashboard:system-Logs-syslog-dashboard,dashboard:system-Metrics-system-overview,dashboard:system-Windows-Dashboard,dashboard:system-bae11b00-9bfc-11ea-87e4-49f31ec44891,dashboard:system-bb858830-f412-11e9-8405-516218e3d268,dashboard:system-d401ef40-a7d5-11e9-a422-d144027429da,search:system-06b6b060-7a80-11ea-bc9a-0baf2ca323a3,search:system-324686c0-fefb-11e9-8405-516218e3d268,search:system-62439dc0-f9c9-11e6-a747-6121780e0414,search:system-6f4071a0-7a78-11ea-bc9a-0baf2ca323a3,search:system-757510b0-a87f-11e9-a422-d144027429da,search:system-7e178c80-fee1-11e9-8405-516218e3d268,search:system-8030c1b0-fa77-11e6-ae9b-81e5311e8cab,search:system-9066d5b0-fef2-11e9-8405-516218e3d268,search:system-Syslog-system-logs,search:system-b6f321e0-fa25-11e6-bbd3-29c986c96e5a,search:system-ce71c9a0-a25e-11e9-a422-d144027429da,search:system-eb0039f0-fa7f-11e6-a1df-a78bd7504d38]
    at Function.nonUniqueImportObjects (errors.ts:35:12)
```

### Checklist

- [ ] [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v8.9.1 v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Endpoint security integration tests can fail due to saved object errors
6 participants