Configure the CLI to exit non-zero on failures. #1313
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that
kamal
wasn't exiting non-zero for me in certain scenarios where I expected it to.This caught me by surprise in my CI/CD when my
staging
deployment "succeeded" super quickly and my changes started deploying toproduction
. 😅I'm not very familiar with Ruby but I believe that this is a good change to make.
(Looks like this was previously set to
true
but was changed tofalse
by @djmb here.)Testing
bundle exec ./bin/kamal deploy -d staging --some-option-that-doesnt-exist
and got the expected behavior (non-zero exit code).bundle exec ./bin/tests
but I'm getting severaltoomanyrequests
errors [1] fromdocker
. The number of errors (10) seems to remain consistent with and without this change so I have some confidence that it shouldn't cause any regressions but I'm not certain.[1] - Error Message Example
I went ahead and created a Docker account. I did a
docker login
(which indicated success) and tried again and still get the error. Looking at the "Usage" dashboard in Docker doesn't seem to indicate an issue. Perhaps my anonymous usage before logging in is causing my IP to be throttled? Another theory is that maybe the way the tests are run aren't making use of my logged in account. 🤷I'm not really interested in upgrading to any sort of paid account at this time.
Any suggestions on how to work around this issue would be greatly appreciated!