-
Notifications
You must be signed in to change notification settings - Fork 155
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 force pkg build by default #2926
Conversation
This speeds things up between ~50% and ~66%, which is really nice. Let me see if I get this:
I have no objection to this. I do have a question, though. Why would we not remove As it is, if you changed any files in a Can we just get rid of
Thank you for including that, and especially hats off for tracking it down. |
Not sure that it cover all cases, as I mentioned before, it will not work for files not added to git, which is possible for local development:
Agree, it will simplify the logic, but at least for me it is not clear why |
True. It captures:
The only thing it misses is things that were added but not staged or committed, yet are targeted to git (i.e. not in Either way, the majority of the cases are when a git-known file has changed, and the "I added a new file but didn't tell git about it" is by far the minority. I think that we are much better off having all cases run by default with no |
I would agree with @deitch. |
FWIW, I have a PR open to linuxkit to capture not-yet-added-to-git files as well.
Yeah, that would be a corner case. In that case, I actually am quite comfortable saying, "you need to use |
e1b5d8e
to
83a1bba
Compare
Well, with linuxkit/linuxkit#3875 merged, I hope we will not hit such corner cases. I modified title, description and code. |
But as #2927 has higher priority and modify the version as well, I will mark the PR as draft. |
Let's make FORCE_BUILD flag optional and rely on hash provided by linuxkit on changes (linuxkit/linuxkit#3875). With no flag provided linuxkit will check that image published, if not, will build it. This way we can avoid building of dependencies as well. Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
83a1bba
to
2e99b29
Compare
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.
Thrilled to see this in.
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.
LGTM
Let's make FORCE_BUILD flag optional and rely on hash provided by linuxkit on changes (linuxkit/linuxkit#3875).
With no flag provided linuxkit will check that image published, if not, will build it.
This way we can avoid building of dependencies as well.
Few measurements on my PC (
time make pkg/pillar
) with changes from PR vs without:docker rm -f --volumes linuxkit-builder&&rm -rf ~/.linuxkit
: 0m6,400s vs 9m15,422sAlso PR includes update of linuxkit version to speedup restart of buildkit container.