Do not log errors in init-directories container during Gitea launch #708

Merged
tobiasbp merged 6 commits from do-not-log-errors-from-init into main 2024-09-11 12:49:18 +00:00
tobiasbp commented 2024-09-02 10:36:44 +00:00 (Migrated from gitea.com)

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.

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.
justusbunsi (Migrated from gitea.com) reviewed 2024-09-02 10:36:44 +00:00
techknowlogick (Migrated from gitea.com) approved these changes 2024-09-02 16:07:21 +00:00
pat-s (Migrated from gitea.com) reviewed 2024-09-03 17:35:56 +00:00
pat-s (Migrated from gitea.com) left a comment

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 👍

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 👍
tobiasbp commented 2024-09-04 06:38:16 +00:00 (Migrated from gitea.com)

I don't think we need all the -v additions.
Let's see what @justusbunsi thinks about this.

The -v additions are to track the progress of the script as suggested by @techknowlogick in the issue

> I don't think we need all the `-v` additions. > Let's see what @justusbunsi thinks about this. The _-v_ additions are to track the progress of the script [as suggested by @techknowlogick in the issue](https://gitea.com/gitea/helm-chart/issues/701#issuecomment-900341)
tobiasbp commented 2024-09-06 07:18:23 +00:00 (Migrated from gitea.com)

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

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
pat-s commented 2024-09-11 12:48:59 +00:00 (Migrated from gitea.com)

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!

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!
pat-s (Migrated from gitea.com) approved these changes 2024-09-11 12:49:09 +00:00
Sign in to join this conversation.
No description provided.