Support in-place update for gateway default - #4128
Merged
Merged
Conversation
The `default` gateway configuration property can now be updated in-place. ```shell $ dstack apply -f gateway.dstack.yml Found gateway my-gateway. Detected changes that can be updated in-place: - default Update the gateway? [y/n]: ``` When a gateway is updated in-place, `default` has the following semantics: - If `true`, the gateway will become (or remain) the project's default. - If `false`, the gateway will become (or remain) non-default. - If omitted, the project's default gateway won't change. When a new gateway is created, `default` has the following semantics: - If `true`, the gateway will become the project's default (existing behavior before this PR). - If `false`, the gateway will not become the project's default (new behavior, previously `false` was equivalent to omitting). - If omitted, the gateway will become the project's default unless there is already another default gateway (existing behavior before this PR).
…default_in_place_update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
defaultgateway configuration property cannow be updated in-place.
$ dstack apply -f gateway.dstack.yml Found gateway my-gateway. Detected changes that can be updated in-place: - default Update the gateway? [y/n]:When a gateway is updated in-place,
defaulthasthe following semantics:
true, the gateway will become (or remain)the project's default.
false, the gateway will become (or remain)non-default.
change.
When a new gateway is created,
defaulthas thefollowing semantics:
true, the gateway will become the project'sdefault (existing behavior before this PR).
false, the gateway will not become theproject's default (new behavior, previously
falsewas equivalent to omitting).project's default unless there is already
another default gateway (existing behavior
before this PR).
Fixes #4126
Fixes #4127