fix: set master as OPENEDX_COMMON_VERSION if PR target is not named release
Description
While creating or updating a sandbox for a PR, the pr_watcher function sets the OPENEDX_COMMON_VERSION
variable for the sandbox instance.
To do this, the function checks whether the target branch of the PR is named release branch and if so, sets the common branch as one of the predefined named release.
However, if the target branch is not a named release branch, the function currently sets the target branch as the common branch. This is problem, since a lot of other openedx repos (such as MFEs) do not have a branch matching the PR target branch and so the deployment fails.
In the MR, this issue is fixed by setting the common branch as master
as default if the target branch is not a named release branch.
PR authors can override this default if required.
Supporting information
Link to other information about the change, such as GitLab issues, GitHub issues, forum discussions. Be sure to check they are publicly readable, or if not, repeat the information here.
Testing instructions
Steps to test the changes:
- Check this merge commit created by the pr_watcher function before the changes here. The common version is set to the custom target branch.
- Next, check this merge commit created by the pr_watcher function with the current changes.
- Next, check this merge commit created by the pr_watcher function with the current changes, where the common version is overriden by the PR author.
Dependencies
List the dependencies required for this change, if any. Do not forget to link grove-template merge request here if that's affected by this change.
Screenshots
If applicable, add screenshots to help explain your feature.
Checklist
If any of the items below is not applicable, do not remove them, but put a check in it.
-
All providers include the new feature/change -
All affected providers can provision new clusters -
Unit tests are added/updated -
Documentation is added/updated -
The TOOLS_CONTAINER_IMAGE_VERSION
in ci_vars.yml is updated -
The grove-template repository is updated
Additional context
Add any other context about the merge request here.