-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
chore(check-for-changes.sh
): Drop redundant guards
#2623
chore(check-for-changes.sh
): Drop redundant guards
#2623
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.
👍🏼
This comment was marked as resolved.
This comment was marked as resolved.
The test command looks awful...
|
9996bd3
Outdated - Early investigationBizarrely the test failure was avoided by reverting the commit adding 3 new config files to monitor. Now running tests with each config line added as single commits to try see where the CI is choking. Current progress:
Do you have a suggestion for improving the test? They originated from the Aug 2017 PR introducing |
Cause identified as earlier tests updating the newly monitored file PR to extract the Troubleshooting and experimentationPrior to the docker-mailserver/test/tests.bats Lines 1131 to 1166 in 62fdcb0
As this is running in UPDATE: Yep... that seems to be it. Likely change detection restarting Postfix and the tests that follow not expecting Postfix to be down? (presumably something like that is happening, and it's a race condition hence why my local system isn't affected) PR to extract the Alternatively, the I'll play around with the
Reverted back commits to prior state before experimenting. The current failure has changed, and is tests between the
Probably related to the cause for this issue. |
This is an old requirement from when the change detector service was first introduced. It's no longer relevant.
The config was created regardless to workaround early change detection support. No longer necessary to require the file to exist.
Legacy guards when this was the only location change detection location supported. There does not appear to be any need for changing into this directory at the start of `check-for-changes.sh` as we use absolute filepaths (originally monitored files were checked with relative paths to this config dir).
These are also handled at run-time in the current change detection support, so it makes sense to allows these config updates to also trigger change events.
4c4b2ed
to
59b7854
Compare
5b0c24c
to
59b7854
Compare
Nice detective work :D |
Description
Housekeeping PR mostly, added a few extra configs that should be monitored for changes.
I looked into some conditional guards and why they were needed. Turns out they're not, most of it was introduced from early support of Change Detection service and no longer relevant.
Origin of conditional guards:
check-for-changes.sh
originally used relative paths to supported config files to monitor. This and checksum file creation relied on changing the working directory to/tmp/docker-mailserver
. No longer necessary as we use absolute paths.postfix-accounts.cf
guard was introduced as part of the originalcheck-for-changes.sh
feature PR in Oct 2017, shortly followed up with a fix to the guard toexit
if the config file didn't exist to prevent log spam.postfix-aliases.cf
was always generated, for what seemed to be a compatibility workaround forcheck-for-changes.sh
support. That logic was originally introduced in a Nov 2018 PR. That PR did not introduce the original alias support requiringPOSTMASTER_ADDRESS
, but did carry over the dependency for it intocheck-for-changes.sh
. Asaliases.sh
has since de-duplicated the alias code andcheck-for-changes.sh
is in much better shape, this workaround is no longer necessary.I've additionally added 3 user configs that make sense for change detection to support as well since we already run recreation logic involving them:
postfix-sasl-password.cf
,postfix-relaymap.cf
,postfix-regexp.cf
.All these
/tmp/docker-mailserver
config files are wrapped into the directory check before adding them toSTAGING_FILES
, although withshopt -s nullglob
and the filtering toCHANGED_FILES
array, it probably makes no difference and the conditional could be dropped?Type of change
Checklist: