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]: User is navigated to Home page on editing integration added to multiple agent policies. #187336

Closed
Tracked by #75867
amolnater-qasource opened this issue Jul 2, 2024 · 9 comments · Fixed by #187463 or #189165
Assignees
Labels
bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@amolnater-qasource
Copy link

Kibana Build details:

VERSION: 8.15.0 SNAPSHOT
BUILD: 75845
COMMIT: 3ab56f5e4eb60ee0898be1964c815a5327016287

Preconditions:

  1. 8.15.0-SNAPSHOT Kibana cloud environment should be available.
  2. Integration should be added to multiple policies.

Steps to reproduce:

  1. Navigate to Integrations>Integration policies tab.
  2. Edit integration and update description for the agent policy.
  3. Save the changes and observe user is navigated to Home page.

Expected Result:
User should be navigated back to Integration policies page on editing integration added to multiple agent policies.

Note:

  • The issue is consistently reproducible.

Screen Recording:

Installed.integrations.-.Integrations.-.Elastic.-.Google.Chrome.2024-07-02.15-35-20.mp4

Feature:
#75867

@amolnater-qasource amolnater-qasource added bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Fleet Team label for Observability Data Collection Fleet team labels Jul 2, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@amolnater-qasource
Copy link
Author

@manishgupta-qasource Please review.

@manishgupta-qasource
Copy link

Secondary Review for this ticket is Done

@amolnater-qasource
Copy link
Author

Hi Team,

We have revalidated this issue on latest 8.15.0 BC3 kibana cloud environment and found it still reproducible.

Observations:

  • User is navigated to Home page on editing integration added to multiple agent policies.

Screen Recording:

Nginx.-.Integrations.-.Elastic.-.Google.Chrome.2024-07-24.13-36-58.mp4

Build details:
VERSION: 8.15.0 BC3
BUILD: 76206
COMMIT: 674b3ab

Hence, we are reopening this issue.

Thanks!

juliaElastic added a commit to juliaElastic/kibana that referenced this issue Jul 24, 2024
## Summary

Closes elastic#187336

Fix navigating back to Integration policies list after
Cancelling/Submitting the Edit integration policy page.

See steps to verify in the linked issue.

<img width="1119" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/f89028a6-ef71-4b25-aabc-4f80cb36214b">
<img width="1123" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/e844344c-caff-45ee-9ce7-772ba672e328">
@juliaElastic
Copy link
Contributor

I checked and it seems the fix somehow missed the 8.15 branch, even though 8.15 label was on it (it was merged before the 8.15 was cut if I remember correctly).
Created the backport now, it should fix the issue: #189042

@jen-huang
Copy link
Contributor

@juliaElastic I am seeing this issue even on main, I checked and it looks like clicking the integration policy name does not add any parameters, but clicking Edit integration from the actions menu adds ?from=fleet-policy-list.

I don't see fleet-policy-list on this type, even though it appears in multiple areas of the code. Maybe we need to enforce the typings in those usages more?
image

It's also not part of this code path which is why the redirection goes to /. We could probably also have the failure case redirect to Fleet as a "safer" option than the Kibana home page:
image

@juliaElastic
Copy link
Contributor

Which issue do you mean in main?
When navigating from Integrations to Edit integration, the url doesn't have any from parameters when going from actions, this issue was to fix the navigation when starting from Integrations.
image

When navigating from Fleet policies, I agree there seems to be an issue when going from actions. I think we should add the agent policy id to the url to be able to navigate back correctly when coming from actions.
image

The fleet-policy-list is not part of the type because it is only used in the url, but the from value is different based on it:
https://github.com/search?q=repo%3Aelastic%2Fkibana%20fromQs%20%3D%3D%3D%20%27fleet-policy-list%27&type=code

It's also not part of this code path which is why the redirection goes to /. We could probably also have the failure case redirect to Fleet as a "safer" option than the Kibana home page:

This is a good point, I'll change it to default to Fleet.

juliaElastic added a commit that referenced this issue Jul 25, 2024
## Summary

Closes #187336

Fix navigating back from Agent policies and use Fleet url as a fallback
when no specific url is defined fro navigation.
To verify:
- Go to an Agent policy Integrations list
- Click on Edit integration action
- Cancel/Submit the form
- Verify that the page goes back to Agent policy Integrations list

<img width="1479" alt="image"
src="https://github.com/user-attachments/assets/daa6b0e2-0298-48fd-8c1c-c818d26a2585">
<img width="1476" alt="image"
src="https://github.com/user-attachments/assets/84a7a61e-9329-44ec-96c2-e6891f7627dc">
<img width="1475" alt="image"
src="https://github.com/user-attachments/assets/3504d934-6944-42b5-bb10-a212cd340784">



### Checklist

- [x] [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
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jul 25, 2024
…#189165)

## Summary

Closes elastic#187336

Fix navigating back from Agent policies and use Fleet url as a fallback
when no specific url is defined fro navigation.
To verify:
- Go to an Agent policy Integrations list
- Click on Edit integration action
- Cancel/Submit the form
- Verify that the page goes back to Agent policy Integrations list

<img width="1479" alt="image"
src="https://github.com/user-attachments/assets/daa6b0e2-0298-48fd-8c1c-c818d26a2585">
<img width="1476" alt="image"
src="https://github.com/user-attachments/assets/84a7a61e-9329-44ec-96c2-e6891f7627dc">
<img width="1475" alt="image"
src="https://github.com/user-attachments/assets/3504d934-6944-42b5-bb10-a212cd340784">

### Checklist

- [x] [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

(cherry picked from commit 66401c6)
@jen-huang
Copy link
Contributor

When navigating from Integrations to Edit integration, the url doesn't have any from parameters when going from actions, this issue was to fix the navigation when starting from Integrations.

Ah, I missed that in the original issue about the starting point. Regardless, thanks for fixing it here too :)

kibanamachine referenced this issue Jul 25, 2024
…189165) (#189194)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Fleet] fix navigating back to Agent policy integration list
(#189165)](#189165)

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

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

<!--BACKPORT [{"author":{"name":"Julia
Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-25T14:36:58Z","message":"[Fleet]
fix navigating back to Agent policy integration list (#189165)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/187336\r\n\r\nFix navigating
back from Agent policies and use Fleet url as a fallback\r\nwhen no
specific url is defined fro navigation.\r\nTo verify:\r\n- Go to an
Agent policy Integrations list\r\n- Click on Edit integration
action\r\n- Cancel/Submit the form\r\n- Verify that the page goes back
to Agent policy Integrations list\r\n\r\n<img width=\"1479\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/daa6b0e2-0298-48fd-8c1c-c818d26a2585\">\r\n<img
width=\"1476\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/84a7a61e-9329-44ec-96c2-e6891f7627dc\">\r\n<img
width=\"1475\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/3504d934-6944-42b5-bb10-a212cd340784\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"66401c6440cc48c209b01059deca8a2eb90b24f7","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","v8.16.0"],"title":"[Fleet]
fix navigating back to Agent policy integration
list","number":189165,"url":"https://github.com/elastic/kibana/pull/189165","mergeCommit":{"message":"[Fleet]
fix navigating back to Agent policy integration list (#189165)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/187336\r\n\r\nFix navigating
back from Agent policies and use Fleet url as a fallback\r\nwhen no
specific url is defined fro navigation.\r\nTo verify:\r\n- Go to an
Agent policy Integrations list\r\n- Click on Edit integration
action\r\n- Cancel/Submit the form\r\n- Verify that the page goes back
to Agent policy Integrations list\r\n\r\n<img width=\"1479\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/daa6b0e2-0298-48fd-8c1c-c818d26a2585\">\r\n<img
width=\"1476\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/84a7a61e-9329-44ec-96c2-e6891f7627dc\">\r\n<img
width=\"1475\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/3504d934-6944-42b5-bb10-a212cd340784\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"66401c6440cc48c209b01059deca8a2eb90b24f7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189165","number":189165,"mergeCommit":{"message":"[Fleet]
fix navigating back to Agent policy integration list (#189165)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/187336\r\n\r\nFix navigating
back from Agent policies and use Fleet url as a fallback\r\nwhen no
specific url is defined fro navigation.\r\nTo verify:\r\n- Go to an
Agent policy Integrations list\r\n- Click on Edit integration
action\r\n- Cancel/Submit the form\r\n- Verify that the page goes back
to Agent policy Integrations list\r\n\r\n<img width=\"1479\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/daa6b0e2-0298-48fd-8c1c-c818d26a2585\">\r\n<img
width=\"1476\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/84a7a61e-9329-44ec-96c2-e6891f7627dc\">\r\n<img
width=\"1475\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/3504d934-6944-42b5-bb10-a212cd340784\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"66401c6440cc48c209b01059deca8a2eb90b24f7"}}]}]
BACKPORT-->

Co-authored-by: Julia Bardi <[email protected]>
@amolnater-qasource
Copy link
Author

Hi Team,

We have revalidated this issue on latest 8.15.0 BC5 kibana cloud environment and found it fixed now.

Observations:

  • User is navigated back to Integration policies page on editing integration added to multiple agent policies.

Screen Recording:

Nginx.-.Integrations.-.Elastic.-.Google.Chrome.2024-08-05.16-00-38.mp4

Build details:
VERSION: 8.15.0 BC5
BUILD: 76335
COMMIT: 393e3c4

Hence, we are marking this issue as QA:Validated.

Thanks!

@amolnater-qasource amolnater-qasource added QA:Validated Issue has been validated by QA and removed QA:Ready for Testing Code is merged and ready for QA to validate labels Aug 5, 2024
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 impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
5 participants