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

Merged
pat-s merged 6 commits from :do-not-log-errors-from-init into main 2024-09-11 12:49:18 +00:00
Member

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: gitea/helm-chart#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.
tobiasbp added 2 commits 2024-09-02 10:36:44 +00:00
tobiasbp requested review from justusbunsi 2024-09-02 10:36:44 +00:00
tobiasbp requested review from pat-s 2024-09-02 10:36:44 +00:00
tobiasbp changed title from Do not log errors in init-directories container during Gitea launch to WIP: Do not log errors in init-directories container during Gitea launch 2024-09-02 10:39:47 +00:00
tobiasbp added 1 commit 2024-09-02 11:22:18 +00:00
Update unittest to match modified init_directory_structure.sh
Some checks failed
check-and-test / check-and-test (pull_request) Failing after 30s
c4c7255e4a
tobiasbp added 1 commit 2024-09-02 11:46:57 +00:00
Fix: Incorrect unittest for script init_directory_structure.sh
Some checks failed
check-and-test / check-and-test (pull_request) Failing after 30s
a1fc7734e0
tobiasbp added 1 commit 2024-09-02 11:59:32 +00:00
Update unittests for script init_directory_structure.sh in rootless mode
Some checks failed
check-and-test / check-and-test (pull_request) Failing after 30s
49977c31e0
tobiasbp added 1 commit 2024-09-02 12:34:51 +00:00
Fix: Do not expect blank line after 'set -euo pipefail' in tests for script init_directory_structure.sh
All checks were successful
check-and-test / check-and-test (pull_request) Successful in 34s
f310982a1b
tobiasbp changed title from WIP: Do not log errors in init-directories container during Gitea launch to Do not log errors in init-directories container during Gitea launch 2024-09-02 12:54:06 +00:00
techknowlogick approved these changes 2024-09-02 16:07:21 +00:00
pat-s reviewed 2024-09-03 17:35:56 +00:00
pat-s left a comment
Collaborator

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 👍
Author
Member

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)
Author
Member

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
Collaborator

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 approved these changes 2024-09-11 12:49:09 +00:00
pat-s merged commit 3fdb39df68 into main 2024-09-11 12:49:18 +00:00
Sign in to join this conversation.
No description provided.