Skip to content

Conversation

@criamico
Copy link
Contributor

Summary

Add license gate around agents automatic upgrades feature:

  • Hide UI elements if license is less than Enterprise - hide Manage auto upgrade button in Agent policy details
  • Add license gate around API to update target versions in agent policy update
  • Add license gate around auto upgrade task

Testing

With a basic license, try to access the agent auto upgrades feature and verify that is not available

Checklist

@criamico criamico self-assigned this Jun 18, 2025
@criamico criamico added v9.1.0 release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team backport:skip This PR does not require backporting labels Jun 18, 2025
@criamico criamico marked this pull request as ready for review June 18, 2025 09:44
@criamico criamico requested a review from a team as a code owner June 18, 2025 09:44
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

const { docLinks } = useStartServices();
const granularPrivilegesCallout = useDismissableTour('GRANULAR_PRIVILEGES');
const { enableAutomaticAgentUpgrades } = ExperimentalFeaturesService.get();
const canEnableAutomaticAgentUpgrades =
Copy link
Contributor

Choose a reason for hiding this comment

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

should we extract canEnableAutomaticAgentUpgrades as a function to reuse, similar to

?


if (!licenseService.isEnterprise()) {
throw new FleetUnauthorizedError(
'Agents auto upgrades feature requires at least Enterprise license'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'Agents auto upgrades feature requires at least Enterprise license'
'Auto-upgrade agents feature requires at least Enterprise license'

@juliaElastic
Copy link
Contributor

Tested locally, looks good.

@criamico criamico requested a review from juliaElastic June 18, 2025 12:43
Copy link
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

@criamico
Copy link
Contributor Author

@elasticmachine merge upstream

@criamico criamico enabled auto-merge (squash) June 18, 2025 13:54
@criamico criamico merged commit 095e891 into elastic:main Jun 18, 2025
10 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Fleet Cypress Tests #2 / View agents list Agent status filter should filter on healthy and unhealthy
  • [job] [logs] Fleet Cypress Tests #2 / View agents list Bulk actions should allow to bulk upgrade agents and cancel that upgrade

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 1178 1179 +1

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.8MB 1.8MB +186.0B

Page load bundle

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

id before after diff
fleet 168.1KB 168.2KB +74.0B

History

cc @criamico

juliaElastic pushed a commit to juliaElastic/kibana that referenced this pull request Jul 29, 2025
…astic#224393)

Add license gate around agents automatic upgrades feature:

- Hide UI elements if license is less than Enterprise - hide Manage auto
upgrade button in Agent policy details
- Add license gate around API to update target versions in agent policy
update
- Add license gate around auto upgrade task

With a basic license, try to access the agent auto upgrades feature and
verify that is not available

- [ ] [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
juliaElastic added a commit that referenced this pull request Jul 29, 2025
…re (#2… (#229752)

Backport #224393 to 8.19

---------

Co-authored-by: Cristina Amico <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
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.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants