Skip to content

[Fleet] Single agent migration UI#222111

Merged
Supplementing merged 19 commits intoelastic:mainfrom
Supplementing:feature-single-agent-migration-ui
Jun 4, 2025
Merged

[Fleet] Single agent migration UI#222111
Supplementing merged 19 commits intoelastic:mainfrom
Supplementing:feature-single-agent-migration-ui

Conversation

@Supplementing
Copy link
Contributor

@Supplementing Supplementing commented May 30, 2025

Summary

Closes #217616

Adds UI elements to support migrating a single agent to another cluster as a follow up to this PR

  • Allows a user to choose an agent to migrate from the actions menu and requires an enrollment token and remote cluster url
  • Leverages the new migrate endpoint to create the action
  • Tamper protected and fleet-agents are not allowed to be migrated at this time, and the option will not exist in the menu
Screen.Recording.2025-06-02.at.2.55.09.PM.mov

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, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests 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
  • 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 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

Identify risks

N/A

Release Note

  • Added the ability to migrate a single agent to another cluster via the actions menu in Fleet. Users can enter a remote cluster URL and enrollment token, as well as customize additional parameters in order to migrate an agent.
@Supplementing Supplementing requested review from a team and michalpristas May 30, 2025 19:28
@Supplementing Supplementing requested a review from a team as a code owner May 30, 2025 19:28
@Supplementing Supplementing added backport:skip This PR does not require backporting Team:Fleet Team label for Observability Data Collection Fleet team release_note:feature Makes this part of the condensed release notes labels May 30, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@Supplementing
Copy link
Contributor Author

@elasticmachine merge upstream

@Supplementing
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@MichelLosier MichelLosier left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few things to consider, blockers are the items on the proxyUrlLabel i18n id, and url validation.

Copy link
Contributor

@MichelLosier MichelLosier left a comment

Choose a reason for hiding this comment

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

Thanks for the updates! Getting close, just need to remove the console log, and maybe double check the client side guard against fleet-server migrations.

@colleenmcginnis colleenmcginnis requested review from colleenmcginnis and karenzone and removed request for a team June 3, 2025 16:40
Copy link
Contributor

@MichelLosier MichelLosier left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, LGTM!

Copy link
Contributor

@karenzone karenzone left a comment

Choose a reason for hiding this comment

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

New UI text LGTM!

@Supplementing
Copy link
Contributor Author

@elasticmachine merge upstream

@Supplementing Supplementing enabled auto-merge (squash) June 4, 2025 16:59
@Supplementing Supplementing merged commit f8f669d into elastic:main Jun 4, 2025
10 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #80 / EQL execution logic API @ess @serverless @serverlessQA EQL type rules uses the provided timestamp_field

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 1181 1183 +2

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 1421 1423 +2

Async chunks

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

id before after diff
fleet 1.7MB 1.8MB +11.6KB

Page load bundle

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

id before after diff
fleet 165.5KB 165.8KB +324.0B
Unknown metric groups

API count

id before after diff
fleet 1550 1552 +2

History

nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Jun 12, 2025
## Summary

Closes elastic#217616 

Adds UI elements to support migrating a single agent to another cluster
as a follow up to [this
PR](elastic#220601)

- Allows a user to choose an agent to migrate from the actions menu and
requires an `enrollment token` and `remote cluster url`
- Leverages the new migrate endpoint to create the action
- Tamper protected and fleet-agents are not allowed to be migrated at
this time, and the option will not exist in the menu



https://github.com/user-attachments/assets/19064b2d-8e1c-465e-af10-e7ba242188ec





### 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

N/A


## Release Note

- Added the ability to migrate a single agent to another cluster via the
actions menu in Fleet. Users can enter a remote cluster URL and
enrollment token, as well as customize additional parameters in order to
migrate an agent.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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:feature Makes this part of the condensed release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.1.0

6 participants