Skip to content

[Fleet] Add Copy integration policy feature#249592

Merged
nchaulet merged 10 commits intomainfrom
feature-fleet-copy-integration
Jan 21, 2026
Merged

[Fleet] Add Copy integration policy feature#249592
nchaulet merged 10 commits intomainfrom
feature-fleet-copy-integration

Conversation

@nchaulet
Copy link
Copy Markdown
Member

@nchaulet nchaulet commented Jan 19, 2026

Summary

Resolve #228840

Allow to copy an integration policy, that feature is available for all integration except "endpoint" as there are some limitations when creating the endpoint policy (need to be done in two step first create the policy, than update it).

UI Changes

Add a new item to package policy action menu

Screenshot 2026-01-19 at 1 37 46 PM

Add a new page copy-integration that open a prefiled package policy editor

Screenshot 2026-01-19 at 1 37 59 PM

Todo

  • Tests
  • Exclude endpoint

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Fleet Team label for Observability Data Collection Fleet team labels Jan 19, 2026
@nchaulet nchaulet self-assigned this Jan 19, 2026
@nchaulet nchaulet marked this pull request as ready for review January 19, 2026 20:29
@nchaulet nchaulet requested a review from a team as a code owner January 19, 2026 20:29
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

<EuiContextMenuItem
disabled={
!canWriteIntegrationPolicies ||
EXCLUDED_FROM_PACKAGE_POLICY_COPY_PACKAGES.includes(packagePolicy.package?.name || '')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: we could add a tooltip or document that it's not supported to copy endpoint integration

@juliaElastic
Copy link
Copy Markdown
Contributor

juliaElastic commented Jan 20, 2026

Tested locally and looks good.
One question, shouldn't we make the breadcrumb/Cancel navigation consistent with the Edit integration flow?

E.g. When starting from an Agent policy, clicking Cancel from Edit integration goes back to the Agent policy, while clicking Cancel from Copy integration goes to Integrations.

When starting from Integrations, the Edit integration shows a breadcrumb from Integrations, while Copy integrations show a breadcrumb from Fleet.

image image image After clicking Cancel image

@nchaulet
Copy link
Copy Markdown
Member Author

Tested locally and looks good.
One question, shouldn't we make the breadcrumb/Cancel navigation consistent with the Edit integration flow?

Yes that a good point, I will update the PR accordingly

@nchaulet nchaulet requested a review from juliaElastic January 20, 2026 14:54
@nchaulet nchaulet requested a review from juliaElastic January 20, 2026 15:46
@juliaElastic
Copy link
Copy Markdown
Contributor

juliaElastic commented Jan 20, 2026

Tested locally and looks good.
One question, shouldn't we make the breadcrumb/Cancel navigation consistent with the Edit integration flow?

Yes that a good point, I will update the PR accordingly

Something still seems off, when starting from Integrations, the breadcrumb shows Fleet > Agent policy , and Cancel goes to Integrations Overview page.

When starting from an Agent policy, the breadcrumb looks good but Cancel still goes back to Integrations Overview.

image image image

@nchaulet
Copy link
Copy Markdown
Member Author

Something still seems off, when starting from Integrations, the breadcrumb shows Fleet > Agent policy , and Cancel goes to Integrations Overview page.

Just updated the PR to fix that

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 1387 1388 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1583 1588 +5

Async chunks

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

id before after diff
fleet 2.1MB 2.1MB +5.4KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 180.7KB 181.5KB +801.0B
Unknown metric groups

API count

id before after diff
fleet 1717 1723 +6

History

cc @nchaulet

Copy link
Copy Markdown
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM

@nchaulet nchaulet merged commit e98e99b into main Jan 21, 2026
17 checks passed
@nchaulet nchaulet deleted the feature-fleet-copy-integration branch January 21, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet] Support "create from existing" action for integration policies

4 participants