Skip to content

Commit

Permalink
Fix changing env variable type
Browse files Browse the repository at this point in the history
With the following:

	koyeb service update myapp/svc --env MYENV=value
	koyeb service update myapp/svc --env MYENV=@xxx

We used to generate a bad request because this is changing the type of
the environment variable MYENV to "plain", then "secret". This is now
fixed.
  • Loading branch information
brmzkw committed Nov 7, 2024
1 parent e000ae8 commit ce1d2b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

* `koyeb service unapplied-changes <service_id>`: display "no changes" when there is no stashed deployment, or when the stashed deployment is the same as the current deployment.
- https://github.com/koyeb/koyeb-cli/pull/259
* `koyeb service update`: fix when changing the type of an environment variable given with `--type`
- https://github.com/koyeb/koyeb-cli/pull/260

## v5.2.0 (2024-10-24)

Expand Down
2 changes: 2 additions & 0 deletions pkg/koyeb/flags_list/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ func (f *FlagEnv) UpdateItem(env *koyeb.DeploymentEnv) {
env.Key = koyeb.PtrString(f.key)
if f.isSecret {
env.Secret = koyeb.PtrString(f.value)
env.Value = nil
} else {
env.Secret = nil
env.Value = koyeb.PtrString(f.value)
}
}
Expand Down

0 comments on commit ce1d2b7

Please sign in to comment.