resonai / ybt

Yet another Build Tool
Apache License 2.0
2 stars 2 forks source link

make DockerImage uncachable #257

Closed tomerz-resonai closed 1 month ago

tomerz-resonai commented 1 month ago

To make DockerImage targets build (and push if needed) even if none of their dependencies is dirty. For example when building images on prod-us to be pushed with the commit tag, but all the dependencies are clean.

tomerz-resonai commented 1 month ago

This is way to aggressive approach and unacceptable, we are heavily counting on image caching and can't accept need to building every time it is needed (think if building our ywz-python3-testrunner on every ybt test command). Images are not used just for deployment but during the build and test processes.

Doesn't --no-docker-cache gives you what you want?

you should look at #189

Didn't know about --no-docker-cache. Thought there is only the option to build without ybt cache. Tried it now and it is a partial solution, since it builds the image anew, which can be annoying (the image I'm interested in is run-vera-on-k8s) while my change still uses the docker cache when building. But I agree it is way too aggressive. Will use the --no-docker-cache flag for now when I need it.