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

Do not apply git patches when using a brach based on but different than master while using Tutor Nightly #1047

Open
mariajgrimaldi opened this issue Apr 22, 2024 · 0 comments
Assignees

Comments

@mariajgrimaldi
Copy link
Contributor

mariajgrimaldi commented Apr 22, 2024

Is your feature request related to a problem? Please describe.

Sometimes, developers must use a different branch based on the master branch while using Tutor Nightly. When that happens, building a new image with that configuration will fail with the following:

#17 CANCELED
------
> importing cache manifest from docker.io/...:nightly-athena-v1.8.0-cache:
------
------
> [code 4/4] RUN curl -fsSL https://github.com/openedx/edx-platform/commit/ad201cd664b6c722cbefcbda23ae390c06daf621.patch | git am:
0.698 error: patch failed: lms/envs/devstack-experimental.yml:102
0.698 error: lms/envs/devstack-experimental.yml: patch does not apply
0.698 error: patch failed: xmodule/modulestore/split_mongo/mongo_connection.py:246
0.698 error: xmodule/modulestore/split_mongo/mongo_connection.py: patch does not apply
0.698 Applying: fix!: infinite growth of cache when auto eviction is disabled
0.698 Patch failed at 0001 fix!: infinite growth of cache when auto eviction is disabled
0.698 When you have resolved this problem, run "git am --continue".
0.698 If you prefer to skip this patch, run "git am --skip" instead.
0.698 To restore the original branch and stop patching, run "git am --abort".
0.699 hint: Use 'git am --show-current-patch' to see the failed patch
------
Dockerfile:51
--------------------
 49 |     # Prevent course structure cache infinite growth
 50 |     # https://github.com/openedx/edx-platform/pull/34210
 51 | >>> RUN curl -fsSL https://github.com/openedx/edx-platform/commit/ad201cd664b6c722cbefcbda23ae390c06daf621.patch | git am
 52 |     
 53 |     
--------------------
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

It fails because Tutor will try to apply the patches since the config is not using the master branch. Although it's based on it, we have no way of knowing.

Describe the solution you'd like
There should be a way of letting Tutor know we're using a branch based on master.

Describe alternatives you've considered

  • Adding a new config variable used to identify whether we're using a nightly environment instead of checking if we're using master
  • Adding documentation about using a noop in the openedx-dockerfile-git-patches-default patch to help with troubleshooting
@hinakhadim hinakhadim self-assigned this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants