-
-
Notifications
You must be signed in to change notification settings - Fork 60
Pause crawls instead of stopping when quotas are reached or archiving is disabled #2997
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
Draft
tw4l
wants to merge
24
commits into
main
Choose a base branch
from
issue-2957-pause-crawl-on-quota-reached
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+536
−122
Conversation
This file contains hidden or 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
217e935 to
db80a95
Compare
Needs to be tested, just pushing as-is so that I can pick it up next week. There's an issue in local testing where crawls sometimes appear to be twice as big as they really are, which is making Browsertrix think the storage quota is reached prematurely. I haven't yet pinned down the cause of this and it seems intermittent.
db80a95 to
c15c1ec
Compare
8298fda to
7a0a515
Compare
3ae0565 to
6432f42
Compare
#3013) … pending, un-uploaded size - use pending size to determine if quota reached - also request pause to be set before assuming paused state - also ensure data is actually committed before shutting down pods (in case of any edge cases) - clear paused flag in redis after crawler pods shutdown - add OpCrawlStats to avoid adding unnecessary profile_update to public API this assumes changes in crawler to support: clearing size after WACZ upload, ensure upload happens if pod starts when crawl is paused --------- Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
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 #2957
Full backend and frontend implementation, with a new email notification to org admins when a crawl is paused because an org quota has been reached.
Backend changes
paused_storage_quota_reached,paused_time_quota_reached,paused_org_readonlybytesStoredabove the storage quotaFrontend changes
Dependencies
Relies on crawler changes introduced in webrecorder/browsertrix-crawler#919
Out of scope
Crawl workflow counts are a bit off, counting all crawls that complete as successful regardless of state and sometimes incrementing workflow storage counts incorrectly. I started trying to address that in this branch but it's a bit involved and may require a migration so best handled separately, I think. Issue: #3011