-
Notifications
You must be signed in to change notification settings - Fork 138
raise severity of non-empty docroot test #387
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
base: master
Are you sure you want to change the base?
raise severity of non-empty docroot test #387
Conversation
and SKIP_CHECK_EMPTY_DOCROOT is not set either Closes: roundcube#384
|
Thank you! I would prefer to have this as a non-breaking change, though. We don't have a proper versioning scheme for these image (yet), and I don't want people to have problems with this change. Could you change it so the default behaviour stays the same? |
|
i thought about that, but... right now (before this PR), the behaviour is to wait 10 seconds if there is data in the docroot. and then continue. as per #384, some people ("me") find this suboptimal: a better solution is to just skip the wait, if you know that there will be files. my original proposal was to just set the timeout to afact, the "root cause" is that some people find it dangerous if the docroot is not clean. so my thinking was:
this is what this PR implements. obviously it breaks backward compatibility, as the image now fails to start for people that rely on dirty docroots (unless they take explicit action). but how should we solve the backwards compatibility? i guess it boils down that for me "solving the root cause" means "getting rid of the (arbitrary) timeout" (as this just combines the worst of both worlds: it penalizes but doesn't protect against data loss. |
|
I understand your thinking and would agree that in principle this approach would be the best. If we would introduce this as a new feature I'd be happy to merge it. But there's always people out there depending on current behaviour, and I want to avoid breaking their usage unless necessary or really important – especially since we don't have proper version numbers for our images (which we should improve), which could indicate such a breaking change. That's why I'm asking you to re-introduce the previous behaviour as default in order to merge this. (I'd like to introduce a semantic versioning scheme for the images, just didn't come around to do it. Once we have that in place I'd be happy to accept this breaking change, too.) |
|
totally understood. but how should it actually look like? |
Do you mean the behaviour? That should look like before, so by default it checks the directory and if it's not empty, emits the warning and waits 10 seconds, then continues. If the new environment variable is set, then the whole dir check is not performed. |
|
so my original suggestion to just allow the user to set the timeout to instead of sleep ${ROUNDCUBE_EMPTYWORKDIR_TIMEOUT:-10}i thought the latter was more powerful, but... ¯\(ツ)/¯ (yes, i know: you say "skip the entire test", not just "skip the wait") |
|
so how about this: with a non-empty docroot:
( this will not break any existing systems (that do not have the |
|
@pabzm, @thomascube |
previously, if the docroot was non-empty, the entrypoint script would wait for 10 seconds and then continue.
now, it will simply fail.
unless the
SKIP_CHECK_EMPTY_DOCROOTenvvar is set to some non-empty value.this is a somewhat "breaking change", as people with half-popuplated docroots (e.g. having an local skin; like me) will now experience failures, unless they manually add the
SKIP_CHECK_EMPTY_DOCROOTenvvar to their setup.