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] Test first-time onboarding flows in new space awareness model #182736

Closed
kpollich opened this issue May 6, 2024 · 1 comment · Fixed by #194350
Closed

[Fleet] Test first-time onboarding flows in new space awareness model #182736

kpollich opened this issue May 6, 2024 · 1 comment · Fixed by #194350
Assignees
Labels
QA:Needs Validation Issue needs to be validated by QA Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@kpollich
Copy link
Member

kpollich commented May 6, 2024

When Fleet is operating across spaces, we should ensure the first-time agent onboarding experience (e.g. multi-page integration installation, etc) honor the current space. If there are no agents enrolled in the current space, we should direct a user in that space to the first-time onboarding flow.

@kpollich kpollich added the Team:Fleet Team label for Observability Data Collection Fleet team label May 6, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kpollich kpollich assigned jen-huang and unassigned nchaulet Sep 3, 2024
jen-huang added a commit to jen-huang/kibana that referenced this issue Sep 30, 2024
jen-huang added a commit to jen-huang/kibana that referenced this issue Oct 1, 2024
jen-huang added a commit to jen-huang/kibana that referenced this issue Oct 2, 2024
jen-huang added a commit to jen-huang/kibana that referenced this issue Oct 3, 2024
@jen-huang jen-huang added the QA:Needs Validation Issue needs to be validated by QA label Oct 3, 2024
jen-huang added a commit that referenced this issue Oct 3, 2024
…4350)

## Summary

Resolves #182736. This PR fixes the first time Elastic Agent user
onboarding flow (only shown on Cloud) by prefixing the user's current
space ID to the default agent policy that is created behind the scenes
if the user has opted into using Fleet's space awareness.

This makes it so that Fleet correctly identifies whether there are any
agents enrolled in the current space, and directs the user to the
multi-step onboarding flow for adding integrations if there are no
agents enrolled in the current space's scoped agent policies.

An example policy ID created this way may look like
`second-space:fleet-first-agent-policy`. If the current space is the
`default` space, the ID remains as `fleet-first-agent-policy`.

Due to prefixing using a `:`, I also had to put policy ID in quotes
where ever it appears in kueries for filtering, i.e. `policy_id:"<some
id>"`. This change comprises most of the changed files in this PR.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 3, 2024
…stic#194350)

## Summary

Resolves elastic#182736. This PR fixes the first time Elastic Agent user
onboarding flow (only shown on Cloud) by prefixing the user's current
space ID to the default agent policy that is created behind the scenes
if the user has opted into using Fleet's space awareness.

This makes it so that Fleet correctly identifies whether there are any
agents enrolled in the current space, and directs the user to the
multi-step onboarding flow for adding integrations if there are no
agents enrolled in the current space's scoped agent policies.

An example policy ID created this way may look like
`second-space:fleet-first-agent-policy`. If the current space is the
`default` space, the ID remains as `fleet-first-agent-policy`.

Due to prefixing using a `:`, I also had to put policy ID in quotes
where ever it appears in kueries for filtering, i.e. `policy_id:"<some
id>"`. This change comprises most of the changed files in this PR.

(cherry picked from commit 6f213cf)
kibanamachine added a commit that referenced this issue Oct 4, 2024
#194350) (#194882)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[UII] Fix first time integration flow when using multiple spaces
(#194350)](#194350)

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

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

<!--BACKPORT [{"author":{"name":"Jen
Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-03T23:07:04Z","message":"[UII]
Fix first time integration flow when using multiple spaces
(#194350)\n\n## Summary\r\n\r\nResolves #182736. This PR fixes the first
time Elastic Agent user\r\nonboarding flow (only shown on Cloud) by
prefixing the user's current\r\nspace ID to the default agent policy
that is created behind the scenes\r\nif the user has opted into using
Fleet's space awareness.\r\n\r\nThis makes it so that Fleet correctly
identifies whether there are any\r\nagents enrolled in the current
space, and directs the user to the\r\nmulti-step onboarding flow for
adding integrations if there are no\r\nagents enrolled in the current
space's scoped agent policies.\r\n\r\nAn example policy ID created this
way may look like\r\n`second-space:fleet-first-agent-policy`. If the
current space is the\r\n`default` space, the ID remains as
`fleet-first-agent-policy`.\r\n\r\nDue to prefixing using a `:`, I also
had to put policy ID in quotes\r\nwhere ever it appears in kueries for
filtering, i.e. `policy_id:\"<some\r\nid>\"`. This change comprises most
of the changed files in this
PR.","sha":"6f213cfb1cf548785271b89dd8199e13d09fd578","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor","ci:cloud-deploy"],"title":"[UII]
Fix first time integration flow when using multiple
spaces","number":194350,"url":"https://github.com/elastic/kibana/pull/194350","mergeCommit":{"message":"[UII]
Fix first time integration flow when using multiple spaces
(#194350)\n\n## Summary\r\n\r\nResolves #182736. This PR fixes the first
time Elastic Agent user\r\nonboarding flow (only shown on Cloud) by
prefixing the user's current\r\nspace ID to the default agent policy
that is created behind the scenes\r\nif the user has opted into using
Fleet's space awareness.\r\n\r\nThis makes it so that Fleet correctly
identifies whether there are any\r\nagents enrolled in the current
space, and directs the user to the\r\nmulti-step onboarding flow for
adding integrations if there are no\r\nagents enrolled in the current
space's scoped agent policies.\r\n\r\nAn example policy ID created this
way may look like\r\n`second-space:fleet-first-agent-policy`. If the
current space is the\r\n`default` space, the ID remains as
`fleet-first-agent-policy`.\r\n\r\nDue to prefixing using a `:`, I also
had to put policy ID in quotes\r\nwhere ever it appears in kueries for
filtering, i.e. `policy_id:\"<some\r\nid>\"`. This change comprises most
of the changed files in this
PR.","sha":"6f213cfb1cf548785271b89dd8199e13d09fd578"}},"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/194350","number":194350,"mergeCommit":{"message":"[UII]
Fix first time integration flow when using multiple spaces
(#194350)\n\n## Summary\r\n\r\nResolves #182736. This PR fixes the first
time Elastic Agent user\r\nonboarding flow (only shown on Cloud) by
prefixing the user's current\r\nspace ID to the default agent policy
that is created behind the scenes\r\nif the user has opted into using
Fleet's space awareness.\r\n\r\nThis makes it so that Fleet correctly
identifies whether there are any\r\nagents enrolled in the current
space, and directs the user to the\r\nmulti-step onboarding flow for
adding integrations if there are no\r\nagents enrolled in the current
space's scoped agent policies.\r\n\r\nAn example policy ID created this
way may look like\r\n`second-space:fleet-first-agent-policy`. If the
current space is the\r\n`default` space, the ID remains as
`fleet-first-agent-policy`.\r\n\r\nDue to prefixing using a `:`, I also
had to put policy ID in quotes\r\nwhere ever it appears in kueries for
filtering, i.e. `policy_id:\"<some\r\nid>\"`. This change comprises most
of the changed files in this
PR.","sha":"6f213cfb1cf548785271b89dd8199e13d09fd578"}}]}] BACKPORT-->

Co-authored-by: Jen Huang <[email protected]>
tiansivive pushed a commit to tiansivive/kibana that referenced this issue Oct 7, 2024
…stic#194350)

## Summary

Resolves elastic#182736. This PR fixes the first time Elastic Agent user
onboarding flow (only shown on Cloud) by prefixing the user's current
space ID to the default agent policy that is created behind the scenes
if the user has opted into using Fleet's space awareness.

This makes it so that Fleet correctly identifies whether there are any
agents enrolled in the current space, and directs the user to the
multi-step onboarding flow for adding integrations if there are no
agents enrolled in the current space's scoped agent policies.

An example policy ID created this way may look like
`second-space:fleet-first-agent-policy`. If the current space is the
`default` space, the ID remains as `fleet-first-agent-policy`.

Due to prefixing using a `:`, I also had to put policy ID in quotes
where ever it appears in kueries for filtering, i.e. `policy_id:"<some
id>"`. This change comprises most of the changed files in this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA:Needs Validation Issue needs to be validated by QA Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants