Introduce manually entered queries in UI
Description
Previously the only way to enter a query was to make a JSON file, and skip the reference Answer, or sample via UBI.
This lets you just enter a set of queries. It's built around the "My boss sent me a list of problem queries, and I want to make a query set" out of it use case.
This is a replacement for https://github.com/opensearch-project/dashboards-search-relevance/pull/548 that adds in unit testing, and matches the new structure for the query set UI code.
Issues Resolved
n/a
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Current UI:
New UI with manual queries support:
After flipping on the manual queries support:
@bzhangam how do those screenshots look?
@fen-qin can I get a review on this? I'd really like to get it in on Monday.....
When I took a look on existing OSD, usually, the data will be imported and a schema validation will be enforced.
- here is a screenshot for importing saved objects
Can you provide more details on the need for this manual entered queries feature ? Otherwise, I think imported files should be good enough for the users.
I believe both importing files and manual input have their advantages. Importing files is helpful when sharing data between users, while manual input is convenient for simple testing or experimenting with the feature.
I believe both importing files and manual input have their advantages. Importing files is helpful when sharing data between users, while manual input is convenient for simple testing or experimenting with the feature.
Exactly. Teams that are working relevancy problems are constantly coming up with small sets of queries, say 7 to 20... that they then are evaluation. Managers and bosses constantly show up with "Why isn't my query I just typed in working?" and you want to bring up SRW and do a bit of quick triage and understanding the scope of the problem.
I ran out of energy yesterday, and will try and get to this today. If it doesn't go, it doesn't go, we didn't have this a key feature on our 3.2 list.
Okay, I think we are there! I would love to get this in before the second blog post on SRW goes out next week, it has slightly awkward text about creating and uploading a file when we could use this feature to create the five queries used in the demo.
There are TWO build checks failing, however I don't think they are related to this PR, they are related to the overall state of our build for this repo.
Test and Build Dashboards is failing on code coverage being < 80%, it's currently 79.4%. I tried bumping it, but felt like I was writing garbage tests, so would like to just submit a seperate PR that is focused on improving coverage for areas (like apparently Experiments) that are low!
FTR E2E is failing for all PRs on some sort of timeout, and I opened #635 to track that.
cc @heemin32 @fen-qin @martin-gaievski
I wanted to follow up on this? Could I get a review? Hoping to close out some of these tickets that came up in prep for OpenSearch Con.
Could you increase the test coverage and fix the build failure? I think the fix is better to be added in this pr instead of separate pr.
Could you increase the test coverage and fix the build failure? I think the fix is better to be added in this pr instead of separate pr.
You are referring to the test coverage build failur? I probably need some help if it's the E2E SW Workbench...
Okay, I've upped the test coverage so we pass the 80% goal. The FTR E2E failure, I think I need some pairing or other expert build advice if this has to be fixed as part of this PR...
Okay, I am running out of steam on this.. I can run the cypress tests, and they basically report that the OSD isn't starting up. Locally, it does work...
@heemin32 could we move the fixing of the end to end tests to a seperate piece of work? I noticed that both dashboards-reports and dashboards-observability have failing Cypress tests. Since they are what I am modeling trying to fix ours, and if they are failing, then that doesn't give me much hope of it passing. I've spent most of the day on this, so I need to take a break, do you have some suggestions on where to look? Maybe another dashboard project where the cypress tests ARE running? Or, let this one get merged, and I'll open a seperate PR focused on fixing the test?
I tried to check the E2E workbench test results
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✖ plugins/search-relevance-dashboards 01:00 1 - 1 - - │
│ /1_query_compare.spec.js │
├────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ✔ plugins/search-relevance-dashboards 1ms - - - - - │
│ /2_search_card.spec.js │
├────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ✖ plugins/search-relevance-dashboards 01:06 5 - 1 - 4 │
│ /3_query_set_creation.spec.js │
├────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ✖ plugins/search-relevance-dashboards 01:05 4 - 1 - 3 │
│ /4_search_configuration_creation.sp │
│ ec.js │
├────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ✖ plugins/search-relevance-dashboards 01:05 4 - 1 - 3 │
│ /5_judgment_creation.spec.js │
├────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ✖ plugins/search-relevance-dashboards 01:05 6 - 1 - 5 │
│ /6_experiment_creation.spec.js │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
✖ 5 of 6 failed (83%) 05:23 20 - 5 - 15
And here is one of the video recordings for the query set creation. Seems like the it failed to load baseUrl.
https://github.com/user-attachments/assets/dac77947-6916-4d97-855f-b4207e48ee9b
Thanks @fen-qin!.
@epugh until we know for sure that the failure is not related with this PR, I think it is always better not to merge it. Also, could you fix the DCO check failure?
I merged in @fen-qin fix (thank you!) and backed out my attempts at a fix. We got green!
hello, @epugh I've left couple comments, please address them and let's merge this PR today
hello, @epugh I've left couple comments, please address them and let's merge this PR today
Thanks! I will get to them. It actually will probably be tomorrow as my afternoon has an event for me to go to. Exctied to ship this.
@arunagov, remember how hard it was to add queries to SRW, this ticket will make it easy, you jsut type them in.