Merged
Conversation
- Support rolling deployments for services when
the run repo is updated: new commits are added,
the branch is changed, uncommitted files are
updated, etc. Switching from one repo to another
is not yet supported.
> **Note**: A side effect of this change is that
if the run configuration file is stored in the
same repo that is used for the run, any changes
to the configuration file will also be
considered a change to the repo
(`repo_code_hash`), and hence require a rolling
deployment for services or a full restart for
tasks and dev environments. Previously, this was
not the case, since changes to `repo_code_hash`
were ignored for existing jobs. This new
behavior makes it more difficult to avoid
redeployment when changing some configuration
properties, namely `priority`,
`inactivity_duration`, `replicas`, and
`scaling`. However, we consider this acceptable,
since changing these properties in-place is an
advanced use case and can still be achieved by
moving the configuration file out of the repo.
- Improve run plan output in `dstack apply` when
attempting an in-place update:
- Show not only the list of changed
configuration properties, but also other
changes from the run spec, such as
repo-related changes.
```shell
$ dstack apply -f test-service.dstack.yml
Active run test-service already exists. Detected changes that can be updated in-place:
- Repo state (branch, commit, or other)
- Repo files
- Configuration properties:
- env
Update the run? [y/n]:
```
- Show the list of changes not only when
in-place update is possible, but also when it
is not. This will help users understand why a
run cannot be updated in-place.
```shell
$ dstack apply -f test-service.dstack.yml
Active run test-service already exists. Detected changes that cannot be updated in-place:
- Repo files
- Configuration properties:
- gateway
Stop and override the run? [y/n]:
```
Currently, all detected changes are listed
together. An area for future improvement is
highlighting the changes that prevent an
in-place update.
un-def
approved these changes
Jun 30, 2025
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.
Support rolling deployments for services when
the run repo is updated: new commits are added,
the branch is changed, uncommitted files are
updated, etc. Switching from one repo to another
is not yet supported.
Improve run plan output in
dstack applywhenattempting an in-place update:
Show not only the list of changed
configuration properties, but also other
changes from the run spec, such as
repo-related changes.
$ dstack apply -f test-service.dstack.yml Active run test-service already exists. Detected changes that can be updated in-place: - Repo state (branch, commit, or other) - Repo files - Configuration properties: - env Update the run? [y/n]:Show the list of changes not only when
in-place update is possible, but also when it
is not. This will help users understand why a
run cannot be updated in-place.
$ dstack apply -f test-service.dstack.yml Active run test-service already exists. Detected changes that cannot be updated in-place: - Repo files - Configuration properties: - gateway Stop and override the run? [y/n]:Currently, all detected changes are listed
together. An area for future improvement is
highlighting the changes that prevent an
in-place update.
#2180