Skip to content

Optimised 'bootstrap' API endpoints#549

Merged
tieneupin merged 3 commits intomainfrom
bootstrap-endpoint-fixes
Apr 2, 2025
Merged

Optimised 'bootstrap' API endpoints#549
tieneupin merged 3 commits intomainfrom
bootstrap-endpoint-fixes

Conversation

@tieneupin
Copy link
Contributor

@tieneupin tieneupin commented Mar 31, 2025

Applied various improvements to the bootstrap API endpoints:

  • Switched to using StreamingResponse when downloading files
  • Switched from using requests.get() to reusing a requests.Session() object instead to stop creating new connections unless necessary
  • Fixed how base URLs are resolved on index pages (a trailing "/" is needed in the URL path)
  • Simplified URL parsing and rewriting as a result of resolving base URLs correctly
  • Added debug logs to record what URLs are being accessed.
  • Added logic to construct functioning URL dynamically to endpoints that have to return a working URL for the client to use.

… pages; switched to using StreamingResponse for package downloads; added debug logs
@tieneupin tieneupin added enhancement New feature or request server Relates to the server component labels Mar 31, 2025
@tieneupin tieneupin self-assigned this Mar 31, 2025
@codecov
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

Attention: Patch coverage is 21.42857% with 77 lines in your changes missing coverage. Please review.

Project coverage is 28.44%. Comparing base (f4df956) to head (58c1ffe).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #549      +/-   ##
==========================================
- Coverage   28.96%   28.44%   -0.53%     
==========================================
  Files          80       80              
  Lines       10495    11109     +614     
  Branches     1394     1609     +215     
==========================================
+ Hits         3040     3160     +120     
- Misses       7354     7836     +482     
- Partials      101      113      +12     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…de when dynamically generating URLs for downloadable config files
@tieneupin tieneupin requested a review from d-j-hatton March 31, 2025 15:36
@tieneupin tieneupin marked this pull request as ready for review March 31, 2025 15:38
@tieneupin tieneupin merged commit aa0bf3a into main Apr 2, 2025
17 checks passed
@tieneupin tieneupin deleted the bootstrap-endpoint-fixes branch April 2, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request server Relates to the server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants