Skip to content

[fix] return exit code 0 when settings check passes #102

Open
Fkuloff wants to merge 1 commit intomainfrom
fix/settings-check-exit-code
Open

[fix] return exit code 0 when settings check passes #102
Fkuloff wants to merge 1 commit intomainfrom
fix/settings-check-exit-code

Conversation

@Fkuloff
Copy link
Copy Markdown

@Fkuloff Fkuloff commented Apr 13, 2026

Previously CheckSettings always exited with code 1 and wrote JSON to stderr regardless of the validation outcome. Now it exits with 0 when the result is valid with no warnings and no message, and only writes the JSON structure to stderr on exit 1.

Before (always exit 1, always stderr):

replicas: 0 → exit: 1, stderr: {"valid":false,"message":"replicas cannot be 0","warnings":null}
replicas: 1 → exit: 1, stderr: {"valid":true,"message":"","warnings":null}
replicas: 2 → exit: 1, stderr: {"valid":true,"message":"","warnings":["replicas cannot be greater than 3"]}

After (exit 0 when fully valid, stderr only when needed):

replicas: 0 → exit: 1, stderr: {"valid":false,"message":"replicas cannot be 0","warnings":null}
replicas: 1 → exit: 0, stderr: empty
replicas: 2 → exit: 1, stderr: {"valid":true,"message":"","warnings":["replicas cannot be greater than 3"]}

@Fkuloff Fkuloff requested a review from ipaqsa April 13, 2026 11:08
@Fkuloff Fkuloff self-assigned this Apr 13, 2026
@Fkuloff Fkuloff changed the title [module-sdk] return exit code 0 when settings check passes without wa… [module-sdk] return exit code 0 when settings check passes Apr 13, 2026
…rnings

Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
@Fkuloff Fkuloff force-pushed the fix/settings-check-exit-code branch from 7d160a4 to f7a3160 Compare April 13, 2026 11:18
@Fkuloff Fkuloff marked this pull request as ready for review April 13, 2026 11:20
@ipaqsa ipaqsa changed the title [module-sdk] return exit code 0 when settings check passes [fix] return exit code 0 when settings check passes Apr 13, 2026
@ipaqsa ipaqsa marked this pull request as draft April 13, 2026 11:43
@ipaqsa ipaqsa requested a review from ldmonster April 13, 2026 11:43
@ipaqsa ipaqsa added bug Something isn't working go Pull requests that update go code labels Apr 13, 2026
@Fkuloff Fkuloff marked this pull request as ready for review April 14, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants