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

Add reviewStatus, qaState, and qaRunCount sort options to crawls/all-crawls list endpoints #1686

Merged
merged 5 commits into from
Apr 17, 2024

Conversation

tw4l
Copy link
Contributor

@tw4l tw4l commented Apr 17, 2024

Backend work for #1672

Adds new sort options to /crawls and /all-crawls GET list endpoints:

  • reviewStatus
  • qaRunCount: number of completed QA runs for crawl (also added to CrawlOut)
  • qaState (sorts by activeQAState first, then lastQAState, both of which are added to CrawlOut)

Add reviewStatus, qaRunCount, and activeQAState as sort
options for crawls.

Adds qaRunCount and activeQAState to CrawlOut as well.
Rename activeQAState sort option to just qaState, which sorts by
activeQAState first, then lastQAState. Both fields are returned
with the data now.

This requires a fair bit of computation in the Mongo aggregation
so we may want to consider moving to precomputing like with workflow
last crawl information at some point. That would also allow the sort
to be more visible based on a single field.
Copy link
Member

@ikreymer ikreymer left a comment

Choose a reason for hiding this comment

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

Nicely done! I wonder if activeQAstate and lastQAState should just combined into one return value, but we can deal with that later.. I guess having activeQAState is what allows us to know that the QA running

@ikreymer ikreymer merged commit c800da1 into main Apr 17, 2024
4 checks passed
@ikreymer ikreymer deleted the issue-1672-backend branch April 17, 2024 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants