fix: enables https and job fixes [#70]#71
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
Addresses the issues discussed in #70 around two separate areas:
This PR contains the repo-side fixes needed to support the AWS HTTPS rollout and to clean up the CI workflow.
Discussion Summary
During investigation, we confirmed a few separate problems:
lintjob was also relying on an implicit Python version and thepre-commit/actionwrapper.APP_ENV=production./static//css/main.css, and the browser console showed blocked stylesheet requests.Separately from this PR, the AWS and DNS side was configured manually during the discussion:
course-enrollment-app.robertlech.comwas pointed at the ALBWhat This PR Changes
CI / workflow fixes
.github/workflows/main.ymlto setpython-version: 3.13in thelintjobpre-commit/actionwith explicit dependency installation pluspre-commit run --all-filesFORCE_JAVASCRIPT_ACTIONS_TO_NODE24=truefor the workflow, with an inline comment explaining that this is a compatibility guardrail while GitHub-hosted runners complete the Node 20 deprecation transitionHTTPS / app fixes
ProxyFixinapplication/__init__.pyso the app respects the ALB's forwarded scheme/host headersapplication/templates/layout.htmlby removing the leading slash fromurl_for('static', filename=...)/static//...to/static/...and avoids proxy/mixed-content style failures after the HTTPS rolloutTests
ProxyFix/static//...Files Changed
.github/workflows/main.ymlapplication/__init__.pyapplication/templates/layout.htmltests/test_config.pytests/test_routes.py.vscode/settings.jsonValidation
Ran locally:
pre-commit run --files application/__init__.py application/templates/layout.html tests/test_config.py tests/test_routes.py✅.venv/bin/pytest tests/test_config.py tests/test_routes.py✅pre-commit run --files .github/workflows/main.yml✅Validated during the AWS/HTTPS rollout discussion:
course-enrollment-app.robertlech.comresolved to the ALBISSUEDhttps://course-enrollment-app.robertlech.com/indexbecame reachable through the ALBFollow-up After Merge
After this PR is merged and deployed, validate that:
https://course-enrollment-app.robertlech.com/indexloads with the app stylesheet applied/static/css/main.cssrather than/static//css/main.cssCloses #70