-
Notifications
You must be signed in to change notification settings - Fork 14
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
External configuration provided by BP_TOMCAT_EXT_CONF_URI
is cached if the same image is built twice
#286
Comments
I'm curious, is there a reason you're not setting That's different from layer caching though. At the same time, I believe we put the dependency information into the layer cache, so if the dependency information changes it'll break the layer cache and rebuild the layer. I believe the SHA256 hash is part of that dependency information, so I'm wondering if that makes the layer rebuild in this scenario. |
Currently I was developing, trying out things. So updating the
That is exactly what I would have expected.
Fair point. I think I will update the issue to make it a bit clearer what I mean.
I can try this out tomorrow or so. But without |
Yes, I agree. It seems like we could make that a little friendlier. If the SHA256 is empty, we could stuff in a random value and it'd force the layer to change every time. I think we've done that in other places to force a layer to always update. We'd probably also want to make sure the output is clear that not having the SHA256 is causing the layer to be rebuilt more frequently. Right now it prints a message about not caching the dependency, but the layer cache is another level of caching and it would being doing more work/slower build so we should probably make sure it's clear why. |
Sounds good.
Maybe we can have a look and propose a pr if that is OK. We are looking for ways to contribute to the project anyway... @loewenstein Isn't that right? :) |
If you provide
BP_TOMCAT_EXT_CONF_URI
to use an external configuration, the external configuration is extracted to$CATALINA_BASE
. But when you build the image a second time and the external configuration changed, the layer cache will be used and therefor the old external configuration.Note:
BP_TOMCAT_EXT_CONF_SHA256
is not used.Expected Behavior
The external configuration is always applied and only cached if
$BP_TOMCAT_EXT_CONF_SHA256
is provided and unchanged.Current Behavior
If the previous image is found, it will reuse its configuration.
Possible Solution
Steps to Reproduce
Motivations
Changing the external configuration should have an effect if rebuilding the image.
The text was updated successfully, but these errors were encountered: