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

QA Runs Initial Backend Implementation #1586

Merged
merged 52 commits into from Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
dfea2ff
Start adding backend support to start and stop qa crawl jobs
tw4l Feb 22, 2024
e8f0da3
Fixups
tw4l Feb 22, 2024
5dbab3f
WIP: Add replay.json endpoint for QA crawls
tw4l Feb 26, 2024
f238d25
Add API endpoint to return QACrawls associated with a crawl
tw4l Feb 26, 2024
31ea444
Flesh out method docstring
tw4l Feb 26, 2024
447b142
Fixups
tw4l Feb 26, 2024
b1514f2
Minor touchups
tw4l Feb 26, 2024
67481ac
Use qa-crawlid-ts naming scheme for QA crawls
tw4l Feb 26, 2024
1c3de77
Merge branch 'main' into issue-1498-crawl-qa-backend-support
ikreymer Mar 6, 2024
af5c866
qa run work, unifying interface
ikreymer Mar 7, 2024
93b2652
more refactoring of apis for qa
ikreymer Mar 7, 2024
e849529
update operator + crawl_ops calls to pass crawl_id + source_crawl_id
ikreymer Mar 8, 2024
f2ca46c
store qa compare data in unified PageQACompare from page_dict
ikreymer Mar 8, 2024
3e1bda2
fixes
ikreymer Mar 9, 2024
8b0e6c7
refactor basecrawls / crawls / uploads getters:
ikreymer Mar 9, 2024
23f5a24
various fixes, add separate configmap for qa
ikreymer Mar 9, 2024
5d66279
simplify qa model:
ikreymer Mar 10, 2024
59e1d70
rename qa_finished -> qaFinished
ikreymer Mar 10, 2024
caf82f1
various type fixes to fix tests:
ikreymer Mar 10, 2024
4a72080
move finished qa run to fininshed in finalizer, perform clear qa + ad…
ikreymer Mar 11, 2024
ec9240b
page ops: create index on 'crawl_id'
ikreymer Mar 11, 2024
046af50
Merge branch 'main' into qa-run
ikreymer Mar 11, 2024
5942a1b
lint fix
ikreymer Mar 11, 2024
b2581fc
additional pages APIs:
ikreymer Mar 12, 2024
4d332e9
update test, remove 'qa' from default /pages response
ikreymer Mar 12, 2024
cdf7a71
Adjust priorities without changing bg-jobs
tw4l Mar 12, 2024
87a62a8
Change qa crawl priority back
tw4l Mar 12, 2024
9b4b393
Allow None for stats for reverse compatibility
tw4l Mar 12, 2024
8b3b6c0
Add conditional for if base crawl has stats
tw4l Mar 12, 2024
914d6ff
bg job priority: rename to 'bg-job' (to avoid conflict) and change to…
ikreymer Mar 12, 2024
fc7b1ef
lint: fix conditional for stats being optional
ikreymer Mar 12, 2024
896787f
Remove duplicate notes field in sort_fields
tw4l Mar 12, 2024
20a3083
Print log pages data in operator
tw4l Mar 12, 2024
bc7c668
additional fixes:
ikreymer Mar 13, 2024
3c58cb9
page model rename: rename load_state -> loadState, timestamp -> ts to…
ikreymer Mar 13, 2024
ce58e38
tests: fix page test
ikreymer Mar 13, 2024
ff9592e
initial QA tests!
ikreymer Mar 13, 2024
571b306
qa: fix qa deletion, add test for deleting qa run, ensuring removed f…
ikreymer Mar 13, 2024
b544a59
Update backend/btrixcloud/basecrawls.py
ikreymer Mar 13, 2024
d61b8d9
also track qa-only exec time and usage, add qausage and qaexectime to…
ikreymer Mar 13, 2024
310780a
change delete endpoint to use POST, accept a list of qa_run_ids
ikreymer Mar 13, 2024
d512def
bump kubernetes-asyncio to 29.0.0
ikreymer Mar 15, 2024
ce72edb
fix qa org keys to be properly cased
ikreymer Mar 16, 2024
7bbdffd
Merge branch 'main' into qa-run
ikreymer Mar 20, 2024
43e2d0b
additional type fixes
ikreymer Mar 20, 2024
cbf3c99
fix Page constructor
ikreymer Mar 20, 2024
fa44420
fix test, update crawler image to 1.1.0-beta.1
ikreymer Mar 20, 2024
039f273
fix load_state -> loadState
ikreymer Mar 20, 2024
f5d1c02
fix models to contain qaUsage, qaCrawlExecSeconds in org and org out
ikreymer Mar 20, 2024
9e9f352
rename FRONTEND_ALIAS -> FRONTEND_ORIGIN
ikreymer Mar 20, 2024
bc3bc44
add test for qaCrawlExecuted and qaUsage, ensure qaUsage is populated…
ikreymer Mar 20, 2024
55994a1
filterBy -> filterQABy
ikreymer Mar 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions backend/btrixcloud/background_jobs.py
Expand Up @@ -403,11 +403,11 @@ async def get_replica_job_file(
profile = await self.profile_ops.get_profile(UUID(job.object_id), org)
return BaseFile(**profile.resource.dict())

item_res = await self.base_crawl_ops.get_crawl_raw(job.object_id, org)
matching_file = [
f for f in item_res.get("files", []) if f["filename"] == job.file_path
][0]
return BaseFile(**matching_file)
item_res = await self.base_crawl_ops.get_base_crawl(job.object_id, org)
matching_file = [f for f in item_res.files if f.filename == job.file_path][
0
]
return matching_file
# pylint: disable=broad-exception-caught, raise-missing-from
except Exception:
raise HTTPException(status_code=404, detail="file_not_found")
Expand Down