Skip to content
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

Better checks that static file routing works as expected #23014

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

KevinMind
Copy link
Contributor

@KevinMind KevinMind commented Jan 22, 2025

Relates: mozilla/addons#15066

Description

  • Removed obsolete file checks and user validation from Makefile-docker.
  • Updated Nginx configuration to improve static file handling and added headers for better traceability.
  • Refactored storage management commands in the Python codebase:
    • Renamed clean_storage to make_storage for clarity and added a clean parameter.
    • Updated command implementations to use the new make_storage method.
  • Introduced a new system check for Nginx configurations to ensure proper file accessibility and response validation.

Context

We serve static files from several possible sources. This PR ensures we understand where a file was served from and also have tests ensuring the routing through nginx works as expected.

Testing

Test NGINX routing

CI should suffice as it runs the make checks but you can break the routing in addons.conf and re-run the checks to ensure they fail. Comment out the /static file handler or specific blocks to force nginx to serve no files or files from incorrect sources

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@KevinMind KevinMind changed the title Move-deps-again Better checks that static file routing works as expected Jan 22, 2025
@KevinMind KevinMind force-pushed the move-deps-again branch 5 times, most recently from 0e3ca9a to 882221b Compare January 27, 2025 09:54
@KevinMind KevinMind requested review from a team and diox and removed request for a team January 27, 2025 12:12
- Removed obsolete file checks and user validation from Makefile-docker.
- Updated Nginx configuration to improve static file handling and added headers for better traceability.
- Refactored storage management commands in the Python codebase:
  - Renamed `clean_storage` to `make_storage` for clarity and added a `clean` parameter.
  - Updated command implementations to use the new `make_storage` method.
- Introduced a new system check for Nginx configurations to ensure proper file accessibility and response validation.
@KevinMind KevinMind merged commit 85a7f41 into master Jan 28, 2025
49 checks passed
@KevinMind KevinMind deleted the move-deps-again branch January 28, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants