-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Custom Docker image not rebuild correctly after merging #19352
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Did anybody had a chance to take a look at that? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@JuJup Thanks for bringing up the issue. We are dealing with the same problem. Every time we merge the main branch into a feature branch it often breaks our Gitpod workspaces which then needs a manual fix. The workaround is basically making a commit with a pseudo change to Thank in advance. |
Hi @shintonik, are you using prebuilds? |
Yes, we use prebuilds. |
Hey @axonasif, |
Hi @JuJup Done |
@shintonik this could be another potential workaround: |
@axonasif, see step 9. in my I have an assumption what might be the problem..
In relation to my example above: |
@JuJup, sorry, I missed it. |
No worries :) |
Hey there @JuJup 👋, I've tried reproducing according to your steps in https://github.com/filiptronicek/gitpod-test-image-builds and was not able to: when starting a new workspace on my FROM gitpod/workspace-base:latest
RUN touch main-branch-updated.info
RUN touch feature-branch.info Any ideas on what I'm doing wrong in my approach? |
Hey @filiptronicek, Therefore, I assume this might be a platform depending issue? |
It totally could be. I will try reproducing with GitLab when I find some time. For now, it's helpful to know that it works fine for GitHub. |
Bug description
We have a very strange behavior with our Gitpod Setup using a custom Dockerfile.
We have a main branch A and a feature branch B. In B we're testing some new things so the Dockerfile differs slightly but is mainly equal to A. From time to time, we merge the main branch A into the feature branch B to keep it up to date.
In this case, the Docker Image is rebuild for B, but with the Dockerfile from A.
Sounds confusing? Yes it is :lau
I described the steps using a minimal example to show the problem:
Steps to reproduce
Start a Gitpod workspace for main
->
ls ~
should show onlymain-branch.info
Create a Feature Branch (test-branch) and change the Dockerfile to:
Start a Gitpod workspace for test-branch
->
ls ~
should showmain-branch.info
andtest-branch.info
-> So far everything is fine
Make a change to Dockerfile in main:
Start a Gitpod workspace for main
->
ls ~
should show onlymain-branch-refactored.info
Merge main into test-branch:
Start a Gitpod workspace for test-branch⚠️
->
ls ~
showsmain-branch-refactored.info
but not test-branch.infoThat's already confusing, as the code now doesn't represent the state anymore. So I tried rebuilding the image explicitely:
https://gitpod.io/#imagebuild/https://gitlab.com/<group>/<project>/-/tree/test-branch
-> Image is rebuild (you can see the logs, but you can see it's the wrong Dockerfile from main)
->
ls ~
showsmain-branch-refactored.info
but not test-branch.infoThe only thing that helps now is changing some line in the Dockerfile in test-branch. But this can't be the solution honestly.
Workspace affected
No response
Expected behavior
Example repository
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: