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 searching, build the path objects asynchronously while returning the results #7265

Merged
merged 6 commits into from
Dec 4, 2023

Conversation

scottbell
Copy link
Contributor

@scottbell scottbell commented Nov 30, 2023

Closes #7264

Describe your changes:

  • When building the search results, return them as soon as we can, and asynchronously build the paths incrementally as we receive them.
  • Asynchronously search for tags
  • Pass abort controllers to search for more details about objects. For ObjectPath, if we've been dismounted, abort the original path search.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?
  • Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
  • Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

@scottbell scottbell linked an issue Nov 30, 2023 that may be closed by this pull request
@scottbell scottbell changed the title When searching, build the paths asynchronously When searching, build the path objects asynchronously to returning the results Nov 30, 2023
Copy link

deploysentinel bot commented Nov 30, 2023

Current Playwright Test Results Summary

✅ 162 Passing - ⚠️ 2 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 12/04/2023 09:40:08pm UTC)

Run Details

Running Job e2e-stable on CircleCI

Commit: f573aa8

Started: 12/04/2023 09:33:31pm UTC

⚠️ Flakes

📄   functional/plugins/tabs/tabs.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Tabs View Renders tabbed elements
Retry 1Initial Attempt
0% (0) 0 / 42 runs
failed over last 7 days
4.76% (2) 2 / 42 runs
flaked over last 7 days

📄   functional/plugins/notebook/restrictedNotebook.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Restricted Notebook with a page locked and with an embed @addinit Disallows embeds to be deleted if page locked @addinit
Retry 1Initial Attempt
2.33% (1) 1 / 43 run
failed over last 7 days
37.21% (16) 16 / 43 runs
flaked over last 7 days

View Detailed Build Results


Current Playwright Test Results Summary

✅ 14 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 12/04/2023 09:40:08pm UTC)

Run Details

Running Workflow e2e-couchdb on Github Actions

Commit: f573aa8

Started: 12/04/2023 09:34:07pm UTC

⚠️ Flakes

📄   functional/couchdb.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
CouchDB Status Indicator with mocked responses @couchdb Shows unknown if it receives an unexpected response code
Retry 1Initial Attempt
0% (0) 0 / 39 runs
failed over last 7 days
15.38% (6) 6 / 39 runs
flaked over last 7 days

View Detailed Build Results


Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Merging #7265 (979e172) into master (e7b9481) will increase coverage by 0.39%.
The diff coverage is 71.42%.

❗ Current head 979e172 differs from pull request most recent head f573aa8. Consider uploading reports for the commit f573aa8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7265      +/-   ##
==========================================
+ Coverage   54.76%   55.16%   +0.39%     
==========================================
  Files         654      654              
  Lines       26256    26238      -18     
  Branches     2536     2530       -6     
==========================================
+ Hits        14380    14474      +94     
+ Misses      11171    11059     -112     
  Partials      705      705              
Flag Coverage Δ
e2e-full 41.86% <ø> (-0.03%) ⬇️
e2e-stable 55.04% <100.00%> (+0.07%) ⬆️
unit 49.30% <71.42%> (+0.52%) ⬆️
Files Coverage Δ
src/api/annotation/AnnotationAPI.js 90.14% <100.00%> (ø)
src/api/objects/ObjectAPI.js 84.54% <100.00%> (ø)
src/ui/components/ObjectPath.vue 60.46% <66.66%> (-1.70%) ⬇️
src/ui/layout/search/GrandSearch.vue 70.49% <61.53%> (+6.69%) ⬆️

... and 15 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7b9481...f573aa8. Read the comment docs.

@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Nov 30, 2023
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Nov 30, 2023
@scottbell scottbell marked this pull request as ready for review November 30, 2023 20:33
@scottbell scottbell changed the title When searching, build the path objects asynchronously to returning the results When searching, build the path objects asynchronously while returning the results Nov 30, 2023
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Dec 1, 2023
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Dec 1, 2023
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Dec 1, 2023
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Dec 1, 2023
@scottbell
Copy link
Contributor Author

Before:

before.mov

Note all the results, object paths, and annotations come at once.

After:

after.mov

Note you get results relatively quickly that you can click on.

Copy link
Member

@ozyx ozyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! A legit use of for await!

async getOriginalPath(identifier, path = []) {
const domainObject = await this.get(identifier);
async getOriginalPath(identifier, path = [], abortSignal = null) {
const domainObject = await this.get(identifier, abortSignal);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

},
async searchObjects(abortSignal) {
const objectSearchPromises = this.openmct.objects.search(this.searchValue, abortSignal);
for await (const objectSearchResult of objectSearchPromises) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brilliant stuff!

@ozyx ozyx enabled auto-merge (squash) December 4, 2023 21:21
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Dec 4, 2023
@ozyx ozyx added this to the Target:3.3.0 milestone Dec 4, 2023
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Dec 4, 2023
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Dec 4, 2023
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Dec 4, 2023
@ozyx ozyx added the performance impacts or improves performance label Dec 4, 2023
@ozyx ozyx merged commit 72e0621 into master Dec 4, 2023
21 of 22 checks passed
@ozyx ozyx deleted the 7264-speed-up-search-with-couchdb branch December 4, 2023 21:40
@unlikelyzero unlikelyzero modified the milestones: Target:3.3.0, Target:4.0.0 Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance impacts or improves performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Speed up search with CouchDB
4 participants