Skip to content

[Fleet] Change uninstall tokens space when changing agent policies spaces#199536

Merged
nchaulet merged 3 commits intoelastic:mainfrom
nchaulet:fix-change-space-uninstall-token
Nov 12, 2024
Merged

[Fleet] Change uninstall tokens space when changing agent policies spaces#199536
nchaulet merged 3 commits intoelastic:mainfrom
nchaulet:fix-change-space-uninstall-token

Conversation

@nchaulet
Copy link
Copy Markdown
Member

@nchaulet nchaulet commented Nov 8, 2024

Description

Resolve #192560

When changing an agent policy spaces we should also change the space of the related uninstall tokens, that PR does that.

Screenshot 2024-11-08 at 1 41 13 PM Screenshot 2024-11-08 at 1 41 21 PM Screenshot 2024-11-08 at 1 41 37 PM

Tests

I added API integration test, testing token are moved to the new spaces

You can manually test the feature by, enabling space awareness (feature flag + API call)m create an agent policy and move the policy to different space and check tokens are following.

@nchaulet nchaulet requested a review from a team as a code owner November 8, 2024 18:42
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Nov 8, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet nchaulet self-assigned this Nov 8, 2024
@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor labels Nov 8, 2024
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

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @nchaulet

@nchaulet nchaulet merged commit f9e8aa0 into elastic:main Nov 12, 2024
@nchaulet nchaulet deleted the fix-change-space-uninstall-token branch November 12, 2024 13:29
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 13, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

1 similar comment
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

2 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

5 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

6 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

kibanamachine added a commit that referenced this pull request Dec 10, 2024
…ies spaces (#199536) (#199793)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Fleet] Change uninstall tokens space when changing agent policies
spaces (#199536)](#199536)

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

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

<!--BACKPORT [{"author":{"name":"Nicolas
Chaulet","email":"nicolas.chaulet@elastic.co"},"sourceCommit":{"committedDate":"2024-11-12T13:28:54Z","message":"[Fleet]
Change uninstall tokens space when changing agent policies spaces
(#199536)","sha":"f9e8aa07b79e6d81d691a4f166c04f74335fdf7f","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor"],"title":"[Fleet]
Change uninstall tokens space when changing agent policies
spaces","number":199536,"url":"https://github.com/elastic/kibana/pull/199536","mergeCommit":{"message":"[Fleet]
Change uninstall tokens space when changing agent policies spaces
(#199536)","sha":"f9e8aa07b79e6d81d691a4f166c04f74335fdf7f"}},"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/199536","number":199536,"mergeCommit":{"message":"[Fleet]
Change uninstall tokens space when changing agent policies spaces
(#199536)","sha":"f9e8aa07b79e6d81d691a4f166c04f74335fdf7f"}}]}]
BACKPORT-->

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kibanamachine kibanamachine added v8.18.0 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet]: Uninstall token missing in new space for all policy assigned to that space

4 participants