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

build: don't apply release patches in nightly #1044

Draft
wants to merge 1 commit into
base: nightly
Choose a base branch
from

Conversation

kdmccormick
Copy link
Collaborator

@kdmccormick kdmccormick commented Apr 18, 2024

The Dockerfile applies some patches to edx-platform. These patches are only meant to work on named releases. So, the Dockerfile avoids applying the patches to Nightly by checking if EDX_PLATFORM_VERSION is "master"

However, people running Nightly will often use a branch off of edx-platform master, causing that conditional to miss, which will lead to build errors like this:

ERROR: failed to solve: process "/bin/sh -c curl -fsSL https://github.com/openedx/edx-platform/commit/ad201cd664b6c722cbefcbda23ae390c06daf621.patch | git am" did not complete successfully: exit code: 128

As a solution, we simply will remove the patches from Tutor's nightly branch. We can also remove the same conditional from Tutor's master branch.

The Dockerfile applies some patches to edx-platform. These patches are only meant to work on named releases. So, the Dockerfile avoids applying the patches to Nightly by checking if EDX_PLATFORM_VERSION is "master" 

However, people running Nightly will often use a *branch off of master*, which will lead to build errors like this:

> ERROR: failed to solve: process "/bin/sh -c curl -fsSL https://github.com/openedx/edx-platform/commit/ad201cd664b6c722cbefcbda23ae390c06daf621.patch | git am" did not complete successfully: exit code: 128

As a solution, we simply will remove the patches from Tutor's nightly branch. We can also remove the same conditional from Tutor's master branch.
@regisb
Copy link
Contributor

regisb commented Apr 18, 2024

This is not a super robust solution, as it means we need to open a PR in nightly each time a patch lands in master. I suggest instead to define a IS_NIGHTLY variable (I'm open to other names): note that this variable would not be a configuration setting, but a variable available at template rendering time.

Then we can replace {%- elif EDX_PLATFORM_VERSION == "master" %} by {%- elif IS_NIGHTLY %}.

@kdmccormick kdmccormick self-assigned this Apr 18, 2024
@kdmccormick
Copy link
Collaborator Author

Sounds good! I presume that it's OK to determine the value of IS_NIGHTLY by looking at tutor.__about__.__app__.__version_suffix__? I can take care of that.

@kdmccormick kdmccormick marked this pull request as draft April 18, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants