-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Rework crawl page migration #2412
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- use group instead of distinct in unique page stats, page filename migration - consolidate collection recompute stats into single function - bump to 1.14.0-beta.2
add timeout for backend gunicorn worker update
Also adds isMigrating, which we'll use in migration 0042
- Adds new optimize pages background job that updates crawl pages and sets version on updated crawls to 2 - New job uses a new migration_job.yaml template with parallelism set to 3 - Update BackgroundJob model and some ops methods to allow for creating and retrying a background job with no oid - Add new API endpoint to retry one specific background job that isn't tied to a specific org (superuser-only)
Now that we have background jobs that aren't tied to a specific org, much of the background_jobs module needs to be reworked to account for that. That will take some time, so for now, so that we can test the migration, we just pass the default org to retry_background_job if the job doesn't have an oid set.
Only include initialPages, pagesQueryUrl, and preloadResources in replay.json responses for crawls and collections if all of the relevant crawls have version set to 2.
- move preloadResources to be precomputed in update_collection_counts_and_tags() - only query list of crawls once, reuse ids - remove facet from list_collection_pages(), support passing in crawlIds
- rename /urls -> /pageSnapshots - remove facet, just return results - frontend: update to new model, don't check total, just look at results list length
- rename list_collection_pages -> list_replay_query_pages to be used for replay page querying for collection or single crawl, no page totals - use list_replay_query_pages in crawl /replay.json
tw4l
commented
Feb 19, 2025
… dialog until open (#2414) Delays rendering contents of the collection settings dialog until actually needed. Various fetches that internal components were running were causing slowdowns in other parts of the app, so this should resolve some of that.
- restore pages response models to include 'items' again - rename endpoint to pageSnapshots -> pageUrlCounts - fix tests to not check 'total'
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
Instead of regex search on url and title: - If search string starts with https:// or http://, do a prefix search on URL - Otherwise, do a $text search on title, sort by match score. --------- Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
ikreymer
reviewed
Feb 20, 2025
add migration_jobs_scale to customize this setting chart values: document rerun_from_migration and migration_jobs_scale chart: remove unneeded background worker timeout customization
ikreymer
approved these changes
Feb 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2406
Converts migration 0042 to launch a background job (parallelized across several pods) to migrate all crawls by optimizing their pages and setting
version: 2
on the crawl when complete.Also Optimizes MongoDB queries for better performance.
Migration Improvements:
isMigrating
andversion
fields toBaseCrawl
migration_job.yaml
template that allows for parallelizationversion
set to2
initialPages
,pageQueryUrl
,preloadResources
) if all relevant crawls/uploads haveversion
set to2
distinct
calls from migration pathwaysQuery Optimizations:
Remaining work: