Centralize default HTTP timeouts across session, compatibility, and upload flows#22
Merged
Centralize default HTTP timeouts across session, compatibility, and upload flows#22
Conversation
Co-authored-by: erseco <1876752+erseco@users.noreply.github.com>
Co-authored-by: erseco <1876752+erseco@users.noreply.github.com>
Co-authored-by: erseco <1876752+erseco@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add roadmap task implementation
Centralize default HTTP timeouts across session, compatibility, and upload flows
Mar 16, 2026
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.
This picks up a small roadmap reliability task by replacing scattered hardcoded HTTP timeouts with a shared configuration surface. The goal is to make timeout behavior consistent across session bootstrap, compatibility detection, scraping fallbacks, and upload paths.
Add shared timeout defaults
src/py_moodle/config.pywith named timeout policies for:Replace hardcoded values in core flows
session.py: use the shared request timeout for sesskey fallback fetches and webservice callscompat.py: use the shared request timeout for version detection via webservice and dashboard probingmodule.py: use the shared scrape timeout for label intro fallback scrapingupload.py: default webservice uploads to the shared upload timeoutdraftfile.py: default draft uploads to the shared large-upload timeout and add explicit request timeouts to draft-item and repo-detection callsscorm.py: reuse the shared large-upload timeout for SCORM package uploadsAdd focused regression coverage
Example of the new timeout contract:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.