-
Notifications
You must be signed in to change notification settings - Fork 97
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
refactor: use MFE refs caching for master branches #163
refactor: use MFE refs caching for master branches #163
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we would avoid calling the PROJECT_ROOT_READY
and manually loading the config. Sorry about the back-and-forth, this feature is more complex than I expected...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing something: how does this fix rate limiting if somebody is rebuilding off of master?
It wouldn't. But we expect that people and companies that face rate limiting issues don't build from master branches, but tags. |
Ah, this makes sense. @gabor-boros, do you mind including in this PR a change to the README that gives people this particular tip? |
Reading back the comments, this raises a question for me: How would this solve the issue at all? I mean, if the I guess we were not thinking about that @regisb. We were discussing to drop the caching like this during our call. Won't it make sense to do so? |
Yes, this is correct. My reasoning is that this problem should not happen too often, if at all. And in particular, it should not affect your project. And when it does, you always have the option to create a plugin to remove the |
1825eaf
to
bb58c5a
Compare
@regisb This is now ready for your review. Based on our latest discussion, it seems that would be the ultimate solution. I think every needs will be satisfied with this changes as:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change, as it removes the "refs" attribute and requires a higher Docker version. As a consequence, please add a corresponding changelog entry with scriv create
. Because this is a breaking change, we should only introduce it in the nightly branch, so you should rebase your branch on top of nightly. Finally, please update the README to remove references to "refs".
@regisb Sure thing. I'll do it by EOD |
I think this would be good to get in Quince. Mind making those changes, @gabor-boros? |
@gabor-boros if you don't have time that's fine too, I can make the change today. We're in a bit of a rush with the upcoming Quince release... |
Hey @regisb, sorry, I ran out of time. If you can help out that would be awesome! |
Superseded by c4ed70c |
Similar to what we need with the MFE image, we leverage Docker's ADD directive to implement caching of the edx-platform git checkout step. See: overhangio/tutor-mfe#163 https://docs.docker.com/reference/dockerfile/#add
Similar to what we need with the MFE image, we leverage Docker's ADD directive to implement caching of the edx-platform git checkout step. See: overhangio/tutor-mfe#163 https://docs.docker.com/reference/dockerfile/#add
This PR fixes #161 by using the
--keep-git-dir
flag of the add command. The docker build step is cached if the branch is intact since the last build. However, if the branch is updated, the cache is invalidated and a new build is required -- as expected.The image above shows that the first build had ditch the previous cache; the second build shows that the image is rebuilt with no changes on the branch, therefore it is cached.
cc: @regisb @arbrandes