[fix] chaos mode always fails deploy #450

Merged
ammaratef45 merged 1 commits from chaos_and_specific_label into main 2024-12-02 00:22:58 +00:00
Member

I was working on coop-cloud/abra#449 and while trying to chaos deploy to see what my changes cause, I found that chaos deploy isn't working

 FATAL  cannot use <version> and --chaos together

I sure didn't provide version, with some debugging I found that

		specificVersion := cmd.Args().Get(1)
		if specificVersion == "" {
			specificVersion = app.Recipe.Version // specificVersion will never be "" from now on
		}

		if specificVersion != "" && internal.Chaos { // first half is always true, this is basically blocking --chaos
			log.Fatal("cannot use <version> and --chaos together")
		}

soooo, I got distracted and did a little clean-up while fixing the bug

I was working on [coop-cloud/abra#449](https://git.coopcloud.tech/coop-cloud/abra/pulls/449) and while trying to chaos deploy to see what my changes cause, I found that chaos deploy isn't working ``` FATAL cannot use <version> and --chaos together ``` I sure didn't provide version, with some debugging I found that ``` specificVersion := cmd.Args().Get(1) if specificVersion == "" { specificVersion = app.Recipe.Version // specificVersion will never be "" from now on } if specificVersion != "" && internal.Chaos { // first half is always true, this is basically blocking --chaos log.Fatal("cannot use <version> and --chaos together") } ``` soooo, I got distracted and did a little clean-up while fixing the bug
ammaratef45 added 1 commit 2024-12-01 04:17:06 +00:00
[fix] chaos mode always fails deploy
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
f664599836
ammaratef45 reviewed 2024-12-01 04:19:04 +00:00
Member

I think with this change it does not take the version from the .env file anymore. In my opinion the more correct change would be to move the first if block below the second one and also guard it by checking if internal.Chaos is set

I think with this change it does not take the version from the .env file anymore. In my opinion the more correct change would be to move the first if block below the second one and also guard it by checking if internal.Chaos is set
Author
Member

I think with this change it does not take the version from the .env file anymore. In my opinion the more correct change would be to move the first if block below the second one and also guard it by checking if internal.Chaos is set

@p4u1 This seems to be the case already, the removed one is redundant?

bba1640913/cli/app/deploy.go (L63-L65)

> I think with this change it does not take the version from the .env file anymore. In my opinion the more correct change would be to move the first if block below the second one and also guard it by checking if internal.Chaos is set @p4u1 This seems to be the case already, the removed one is redundant? https://git.coopcloud.tech/coop-cloud/abra/src/commit/bba1640913d4fe1f8b04d9ca606d9f967a9352b4/cli/app/deploy.go#L63-L65
p4u1 approved these changes 2024-12-01 15:31:47 +00:00
decentral1se approved these changes 2024-12-02 00:21:51 +00:00
decentral1se left a comment
Owner

LGTM 🎉

LGTM 🎉
ammaratef45 merged commit f664599836 into main 2024-12-02 00:22:58 +00:00
ammaratef45 deleted branch chaos_and_specific_label 2024-12-02 00:22:58 +00:00
Sign in to join this conversation.
No description provided.