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

[BUG] After change url of saved query, new url go to saved query without chages #2126

Open
smakaravets opened this issue Aug 11, 2022 · 10 comments
Assignees
Labels
discover for discover reinvent needs research ux / ui Improvements or additions to user experience, flows, components, UI elements

Comments

@smakaravets
Copy link

Describe the bug

I set up a saved request. After that, I made changes to the filter, I got the expected result. After that, I did a page refresh and returned to the saved request without the changed filters.

URL with saved query: https://opensearch.company.in/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-5m,to:now))&_a=(columns:!(_source),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'2fc77980-ba98-11ec-a90f-abda54a0cc40',key:kubernetes.namespace_name,negate:!f,params:(query:ingress-nginx),type:phrase),query:(match_phrase:(kubernetes.namespace_name:ingress-nginx))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'2fc77980-ba98-11ec-a90f-abda54a0cc40',key:kubernetes.labels.app.kubernetes.io%2Fname,negate:!f,params:(query:ingress-nginx),type:phrase),query:(match_phrase:(kubernetes.labels.app.kubernetes.io%2Fname:ingress-nginx))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'2fc77980-ba98-11ec-a90f-abda54a0cc40',key:MESSAGE,negate:!f,params:(query:error),type:phrase),query:(match_phrase:(MESSAGE:error)))),index:'2fc77980-ba98-11ec-a90f-abda54a0cc40',interval:auto,query:(language:kuery,query:''),savedQuery:ingress-errors,sort:!())

URL with saved query and some changes: https://opensearch.company.in/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-1m,to:now))&_a=(columns:!(_source),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'2fc77980-ba98-11ec-a90f-abda54a0cc40',key:kubernetes.namespace_name,negate:!f,params:(query:ingress-nginx),type:phrase),query:(match_phrase:(kubernetes.namespace_name:ingress-nginx))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'2fc77980-ba98-11ec-a90f-abda54a0cc40',key:kubernetes.labels.app.kubernetes.io%2Fname,negate:!f,params:(query:ingress-nginx),type:phrase),query:(match_phrase:(kubernetes.labels.app.kubernetes.io%2Fname:ingress-nginx)))),index:'2fc77980-ba98-11ec-a90f-abda54a0cc40',interval:auto,query:(language:kuery,query:''),savedQuery:ingress-errors,sort:!())

Second url redirects to first url.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://opensearch.company.in/app/discover
  2. Create query
  3. Save query in saved queries (change period, add filters)
  4. Change query(edit filters, time period or something else)
  5. Refresh the page
  6. You will see saved query, without previous changes

Expected behavior
I want to see page with edited filters in saved query.

OpenSearch Version
2.0.0

Dashboards Version
2.0.1

Plugins

opensearch-alerting 2.0.0.0 opensearch-anomaly-detection 2.0.0.0 opensearch-asynchronous-search 2.0.0.0 opensearch-cross-cluster-replication 2.0.0.0 opensearch-index-management 2.0.0.0 opensearch-job-scheduler 2.0.0.0 opensearch-knn 2.0.0.0 opensearch-ml 2.0.0.0 opensearch-notifications 2.0.0.0 opensearch-notifications-core 2.0.0.0 opensearch-observability 2.0.0.0 opensearch-performance-analyzer 2.0.0.0 opensearch-reports-scheduler 2.0.0.0 opensearch-security 2.0.0.0 opensearch-sql 2.0.0.0

Host/Environment (please complete the following information):

  • k8s - 1.19
  • Chrome Version 103.0.5060.134 (Official Build) (arm64)
@CCongWang
Copy link
Contributor

I can't reproduce the issue on my local, steps I have taken were:

  1. Add sample data Sample eCommerce orders
  2. Go to Discover tab
  3. Create query by adding day_of_week: Saturday filter, the url became http://localhost:5603/vil/app/discover#/?_g=(filters:!(),query:(language:kuery,query:''),refreshInterval:(pause:!f,value:900000),time:(from:now-7d,to:now))&_a=(columns:!(_source),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,key:day_of_week,negate:!f,params:(query:Saturday),type:phrase),query:(match_phrase:(day_of_week:Saturday)))),index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,interval:auto,query:(language:kuery,query:''),sort:!())

Screen Shot 2022-08-23 at 11 49 11 AM

  1. Change the filter to be day_of_week: Monday, the url became http://localhost:5603/vil/app/discover#/?_g=(filters:!(),query:(language:kuery,query:''),refreshInterval:(pause:!f,value:900000),time:(from:now-7d,to:now))&_a=(columns:!(_source),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,key:day_of_week,negate:!f,params:(query:Monday),type:phrase),query:(match_phrase:(day_of_week:Monday)))),index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,interval:auto,query:(language:kuery,query:''),sort:!())

Screen Shot 2022-08-23 at 11 51 43 AM

  1. Refresh the page, the url is still the updated url, and the query is still the updated query http://localhost:5603/vil/app/discover#/?_g=(filters:!(),query:(language:kuery,query:''),refreshInterval:(pause:!f,value:900000),time:(from:now-7d,to:now))&_a=(columns:!(_source),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,key:day_of_week,negate:!f,params:(query:Monday),type:phrase),query:(match_phrase:(day_of_week:Monday)))),index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,interval:auto,query:(language:kuery,query:''),sort:!())

OpenSearch Version
2.0.0

Dashboards Version
2.0.1

@smakaravets
Copy link
Author

smakaravets commented Aug 23, 2022

@CCongWang Did you saved query after 3rd step? It's necessary, to reproduce this bug.

Also reproduce this bug on: OpenSearch/Dashboards 2.2.0

@CCongWang
Copy link
Contributor

CCongWang commented Aug 23, 2022

@smakaravets got it, I think you might need to save the new change to actually update saved query, please see attached screen recording.

  1. Add filter day_of_week: Saturday, save the query to be Saturday
  2. Update the filter to be day_of_week: Monday, save the change
  3. Refresh the page, see updated query
saved_query_720.mov

@smakaravets
Copy link
Author

@CCongWang but if I don't want to save newest query. I want to share my query with some changes. Is it possible without saving changes and just share url?

@smakaravets
Copy link
Author

@CCongWang any updates about this bug?

@joshuarrrr
Copy link
Member

@abbyhu2000 Do you mind taking a look at this? I think your recent investigation means you can either provide an explanation or suggested fix.

@joshuarrrr joshuarrrr assigned abbyhu2000 and unassigned CCongWang Nov 21, 2022
@joshuarrrr joshuarrrr added the discover for discover reinvent label Nov 21, 2022
@abbyhu2000
Copy link
Member

@smakaravets Hi, sorry for the wait and i was able to understand and reproduce your issue. However, after investigation, i think this is the intended functionality because if there is a saved query applied, the saved query is gonna take precedent over the other unsaved changes. If you want to share your changes with the saved query, you can either clear your saved query or updated the saved query with those new changes.

@abbyhu2000 abbyhu2000 added the ux / ui Improvements or additions to user experience, flows, components, UI elements label Dec 2, 2022
@abbyhu2000
Copy link
Member

@KrooshalUX @ahopp Should we consider adding this feature?

@abbyhu2000 abbyhu2000 removed the bug Something isn't working label Dec 2, 2022
@kristenTian
Copy link
Contributor

also FYI @vagimeli to follow up with @rednaksi91 on including this type of feature request in doc roadmap

@tarmacmonsterg
Copy link

@abbyhu2000 The main problem is that while working, I can create a basic template and then use it as a starting point when working. If I want to share the results, I will have to save new requests each time, although they will be interesting only at the current moment. It also makes it harder to share search results between team members during an active investigation. I think it would be quite a logical function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discover for discover reinvent needs research ux / ui Improvements or additions to user experience, flows, components, UI elements
Projects
None yet
Development

No branches or pull requests

8 participants