fix: Fix unit tests failing with release branch env variable#38497
Conversation
|
Thanks for the pull request, @mgwozdz-unicon! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
There was a problem hiding this comment.
The fix makes sense — the hardcoded "latest" breaks on release branches where doc_version() returns "open-release-verawood.master".
How the URL is constructed
The SUPPORT_URL flows through four layers:
- View layer —
views.py:get_legacy_config_overrides()callsresolve_help_token("instructor")→HelpUrlExpert.the_one().url_for_token("instructor") - help-tokens library —
url_for_token()readshelp_tokens.ini(instructor = course_author:index.html), looks upHELP_TOKENS_BOOKS["course_author"], then replaces/latestwith/{version} - Settings —
common.py:HELP_TOKENS_VERSION = Derived(lambda settings: doc_version()) - Release info —
release.py:doc_version()returns"latest"on master,"open-release-{RELEASE_LINE}.master"on release branches
See inline suggestion for a slightly more precise alternative approach.
Review assisted by Kiro
wgu-taylor-payne
left a comment
There was a problem hiding this comment.
Looks good, thanks for this! Do you plan to make a backport PR for this @mgwozdz-unicon?
|
Backport PR for verawood: #38503 |
(cherry picked from commit d327dd3)
Description
My Verawood PR has unit tests failing on what appears to be an unrelated environment variable issue:
Supporting information
This is blocking getting #38495 into the Verawood release.
Testing instructions
Deadline
This is blocking getting #38495 into the Verawood release.