Repository navigation
#557: Reject crawler results below MIN_CRAWLER_VERSION with 426 - #573
Merged
Merged
Conversation
Part of #557. The version-spread dashboard (#558) and tagged crawler releases are merged, so the server can now tell old crawlers to upgrade: POST /api/v1/crawler/results returns 426 Upgrade Required when the submitted crawler_version is below the new MIN_CRAWLER_VERSION setting (default 0.0.0, which accepts every crawler, including ones too old to report a version). The crawler waits out an hour on a 426 instead of crash-looping, giving an external updater time to replace the process. CRAWLER_VERSION is raised to 1.0.2 because this changes what the crawler runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 31, 2026
Contributor
|
Looks good - can you fix the conflicts and I'll merge ❤️ |
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
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.
Part of #557.
Step 3 of the issue's suggested order. The version-spread dashboard (#558 + mwmbl/front-end#99) and tagged crawler releases (crawler-v1.0.0/1.0.1) are merged, so the server can now tell old crawlers to upgrade.
What
MIN_CRAWLER_VERSIONsetting (settings_common.py), default"0.0.0"so every crawler passes until an admin raises it once the dashboard shows the fleet has moved.POST /api/v1/crawler/resultsreturns 426 Upgrade Required when the submittedcrawler_versionis below the minimum (versions compared as numeric tuples via a newparse_release_versionin mwmbl/crawler/version.py; a missing or malformed version counts as 0.0.0). Applies to dry runs too. 426 added to the route's response schema and docs.UPGRADE_REQUIRED_WAIT_SECONDS(1h) instead ofraise_for_status(), so it waits for an external updater rather than crash-looping; all other error statuses still raise.CRAWLER_VERSIONraised to 1.0.2 (this changes what the crawler runs; release_check passes).How it was verified
make checkpasses;python -m mwmbl.crawler.release_check origin/mainreports the version was raised.Next steps after this: Docker auto-update timer on the
stabletag + book docs, then optionally extracting a pure-Python mwmbl-crawler package.