Do not log errors in init-directories container during Gitea launch #708
Reference in New Issue
Block a user
No description provided.
Delete Branch "do-not-log-errors-from-init"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the init-directories container runs, the shell script init_directory_structure.sh logs to stderr because debugging is enabled with set -x. The output from the script, should be logged to stdout instead. The issue is discussed here: https://gitea.com/gitea/helm-chart/issues/701
Description of the change
This PR uses the verbose flag with all commands in the script to log what the script is doing.
Benefits
Log entries with incorrect severity ERROR will no longer be logged in Kubernetes.
Possible drawbacks
Log output will change. If someone had a check for certain log entries from the init container, that check would break.
Checklist
Updated unit tests.
I don't think we need all the
-v
additions.Let's see what @justusbunsi thinks about this.
We can issue a release afterwards. Thanks for contributing 👍
The -v additions are to track the progress of the script as suggested by @techknowlogick in the issue
It would be nice if this could be a part of the changes for the upcoming chart release that uses Gitea 1.22.2 @justusbunsi
OK, merging this now so we can proceed and get this into 1.22.2. Still not fully convinced about all the
-v
additions but we can also remove them again if needed.Thanks again @tobiasbp!