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

when switching from "Existing Hosts" to "New Hosts" UX doesn't reflect this #172798

Closed
maxcold opened this issue Dec 7, 2023 · 3 comments · Fixed by #176729
Closed

when switching from "Existing Hosts" to "New Hosts" UX doesn't reflect this #172798

maxcold opened this issue Dec 7, 2023 · 3 comments · Fixed by #176729
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team Team:Integrations Team Label for Observability Integrations team

Comments

@maxcold
Copy link
Contributor

maxcold commented Dec 7, 2023

Kibana version:
8.11

Describe the bug:
When adding an integration, and switching from "Existing Hosts" to "New Hosts" in the "Where to add this integration?" step, the policy_id of an existing policy persists in the "Preview API request". Also, the UX stays in the state as if the Existing Host is still selected. Eg. the is a popup "This action will update N agents", even though the new policy is actually being created

Steps to reproduce:

  1. Add one agent policy to the stack
  2. Go to any integration and navigate to add integration page
  3. Switch to Existing hosts and select and existing policy
  4. Switch back to New hosts
  5. Open Preview API request
  6. observe the policy_id of an existing integration in the POST kbn:/api/fleet/package_policies which is incorrect.

Expected behavior:
it should be "policy_id": "<agent_policy_id>" to notify users that a new policy id will be used, like on the initial page load

Screenshots (if relevant):

screencast-mail.google.com-2023.12.07-11_53_39.webm

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

@maxcold maxcold added the bug Fixes for quality problems that affect the customer experience label Dec 7, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Dec 7, 2023
@jsanz jsanz added the Team:Integrations Team Label for Observability Integrations team label Dec 12, 2023
@botelastic botelastic bot removed the needs-team Issues missing a team label label Dec 12, 2023
@maxcold
Copy link
Contributor Author

maxcold commented Dec 19, 2023

It seems like the issue not only affects the Preview API but also the UX of adding the integration itself. When you choose an Existing host but then go back to the New Host and try to save the integration, you will see the alert that the agent will updated even though you intend to add the integration on a new host. Which is very confusing.
Screenshot 2023-12-19 at 14 18 17

@maxcold maxcold changed the title policy_id is incorrect in the "Preview API Request" when switching from "Existing Hosts" to "New Hosts" when switching from "Existing Hosts" to "New Hosts" UX doesn't reflect this Jan 29, 2024
@kpollich kpollich added the Team:Fleet Team label for Observability Data Collection Fleet team label Jan 29, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@criamico
Copy link
Contributor

It seems like the issue not only affects the Preview API but also the UX of adding the integration itself. When you choose an Existing host but then go back to the New Host and try to save the integration, you will see the alert that the agent will updated even though you intend to add the integration on a new host.

Tested it on 8.13 snapshot and I couldn't reproduce this part of the bug. The rest should be fixed with #176729

criamico added a commit that referenced this issue Feb 13, 2024
Fixes #172798

## Summary
Small bug fix: when adding a new integration, the `policy_id` in dev
tools flyout request was not correct

Steps to reproduce:

- Add one agent policy to the stack
- Go to any integration and navigate to `add integration` page
- Switch to `Existing hosts` and select an existing policy. 
- Open `Preview API request`. The policy id in the preview should be the
one from the selected policy
- Switch back to `New hosts`
- Open `Preview API request`. The policy id should be
`<agent_policy_id>` again (not the one from the previously selected
policy)

![Screenshot 2024-02-12 at 17 56
45](https://github.com/elastic/kibana/assets/16084106/6f2e5085-7418-4fef-ac4e-79b57d551722)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Feb 13, 2024
Fixes elastic#172798

## Summary
Small bug fix: when adding a new integration, the `policy_id` in dev
tools flyout request was not correct

Steps to reproduce:

- Add one agent policy to the stack
- Go to any integration and navigate to `add integration` page
- Switch to `Existing hosts` and select an existing policy.
- Open `Preview API request`. The policy id in the preview should be the
one from the selected policy
- Switch back to `New hosts`
- Open `Preview API request`. The policy id should be
`<agent_policy_id>` again (not the one from the previously selected
policy)

![Screenshot 2024-02-12 at 17 56
45](https://github.com/elastic/kibana/assets/16084106/6f2e5085-7418-4fef-ac4e-79b57d551722)

(cherry picked from commit 466a05a)
kibanamachine referenced this issue Feb 13, 2024
…) (#176800)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Fleet] Fix wrong policy_id in dev tools flyout request
(#176729)](#176729)

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

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

<!--BACKPORT [{"author":{"name":"Cristina
Amico","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-02-13T10:02:20Z","message":"[Fleet]
Fix wrong policy_id in dev tools flyout request (#176729)\n\nFixes
https://github.com/elastic/kibana/issues/172798\r\n\r\n##
Summary\r\nSmall bug fix: when adding a new integration, the `policy_id`
in dev\r\ntools flyout request was not correct\r\n\r\nSteps to
reproduce:\r\n\r\n- Add one agent policy to the stack\r\n- Go to any
integration and navigate to `add integration` page\r\n- Switch to
`Existing hosts` and select an existing policy. \r\n- Open `Preview API
request`. The policy id in the preview should be the\r\none from the
selected policy\r\n- Switch back to `New hosts`\r\n- Open `Preview API
request`. The policy id should be\r\n`<agent_policy_id>` again (not the
one from the previously selected\r\npolicy)\r\n\r\n![Screenshot
2024-02-12 at 17
56\r\n45](https://github.com/elastic/kibana/assets/16084106/6f2e5085-7418-4fef-ac4e-79b57d551722)","sha":"466a05ae843f3aeefaa035121dbb9e642bd0eed6","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v8.13.0"],"title":"[Fleet]
Fix wrong policy_id in dev tools flyout
request","number":176729,"url":"https://github.com/elastic/kibana/pull/176729","mergeCommit":{"message":"[Fleet]
Fix wrong policy_id in dev tools flyout request (#176729)\n\nFixes
https://github.com/elastic/kibana/issues/172798\r\n\r\n##
Summary\r\nSmall bug fix: when adding a new integration, the `policy_id`
in dev\r\ntools flyout request was not correct\r\n\r\nSteps to
reproduce:\r\n\r\n- Add one agent policy to the stack\r\n- Go to any
integration and navigate to `add integration` page\r\n- Switch to
`Existing hosts` and select an existing policy. \r\n- Open `Preview API
request`. The policy id in the preview should be the\r\none from the
selected policy\r\n- Switch back to `New hosts`\r\n- Open `Preview API
request`. The policy id should be\r\n`<agent_policy_id>` again (not the
one from the previously selected\r\npolicy)\r\n\r\n![Screenshot
2024-02-12 at 17
56\r\n45](https://github.com/elastic/kibana/assets/16084106/6f2e5085-7418-4fef-ac4e-79b57d551722)","sha":"466a05ae843f3aeefaa035121dbb9e642bd0eed6"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176729","number":176729,"mergeCommit":{"message":"[Fleet]
Fix wrong policy_id in dev tools flyout request (#176729)\n\nFixes
https://github.com/elastic/kibana/issues/172798\r\n\r\n##
Summary\r\nSmall bug fix: when adding a new integration, the `policy_id`
in dev\r\ntools flyout request was not correct\r\n\r\nSteps to
reproduce:\r\n\r\n- Add one agent policy to the stack\r\n- Go to any
integration and navigate to `add integration` page\r\n- Switch to
`Existing hosts` and select an existing policy. \r\n- Open `Preview API
request`. The policy id in the preview should be the\r\none from the
selected policy\r\n- Switch back to `New hosts`\r\n- Open `Preview API
request`. The policy id should be\r\n`<agent_policy_id>` again (not the
one from the previously selected\r\npolicy)\r\n\r\n![Screenshot
2024-02-12 at 17
56\r\n45](https://github.com/elastic/kibana/assets/16084106/6f2e5085-7418-4fef-ac4e-79b57d551722)","sha":"466a05ae843f3aeefaa035121dbb9e642bd0eed6"}}]}]
BACKPORT-->

Co-authored-by: Cristina Amico <[email protected]>
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this issue Feb 15, 2024
Fixes elastic#172798

## Summary
Small bug fix: when adding a new integration, the `policy_id` in dev
tools flyout request was not correct

Steps to reproduce:

- Add one agent policy to the stack
- Go to any integration and navigate to `add integration` page
- Switch to `Existing hosts` and select an existing policy. 
- Open `Preview API request`. The policy id in the preview should be the
one from the selected policy
- Switch back to `New hosts`
- Open `Preview API request`. The policy id should be
`<agent_policy_id>` again (not the one from the previously selected
policy)

![Screenshot 2024-02-12 at 17 56
45](https://github.com/elastic/kibana/assets/16084106/6f2e5085-7418-4fef-ac4e-79b57d551722)
fkanout pushed a commit to fkanout/kibana that referenced this issue Mar 4, 2024
Fixes elastic#172798

## Summary
Small bug fix: when adding a new integration, the `policy_id` in dev
tools flyout request was not correct

Steps to reproduce:

- Add one agent policy to the stack
- Go to any integration and navigate to `add integration` page
- Switch to `Existing hosts` and select an existing policy. 
- Open `Preview API request`. The policy id in the preview should be the
one from the selected policy
- Switch back to `New hosts`
- Open `Preview API request`. The policy id should be
`<agent_policy_id>` again (not the one from the previously selected
policy)

![Screenshot 2024-02-12 at 17 56
45](https://github.com/elastic/kibana/assets/16084106/6f2e5085-7418-4fef-ac4e-79b57d551722)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team Team:Integrations Team Label for Observability Integrations team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants