Repository navigation
feat(vmm): support environment value specs in deployment tooling - #1651
Merged
Merged
Conversation
kvinwang
force-pushed
the
feat/value-spec-tooling
branch
3 times, most recently
from
November 26, 2026 02:05
e44ab93 to
b4d6eca
Compare
kvinwang
force-pushed
the
feat/value-spec
branch
from
November 26, 2026 02:05
92f2c1e to
4d3a223
Compare
kvinwang
force-pushed
the
feat/value-spec-tooling
branch
from
November 26, 2026 02:07
b4d6eca to
47f288e
Compare
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
force-pushed
the
feat/value-spec
branch
from
November 26, 2026 02:09
4d3a223 to
5f0ff5e
Compare
kvinwang
force-pushed
the
feat/value-spec-tooling
branch
from
November 26, 2026 02:09
47f288e to
c4c866b
Compare
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.
Follow-up to #1649; stacked on
feat/value-spec.Problem
vmm-cliand the web UI rebuildallowed_envsfrom the names of the variables being encrypted, so aNAME: specentry is replaced by a plain name on the nextdeploy,updateorupdate-env. Specs can only be used with a hand-written compose file, and a malformed spec is not reported until the CVM fails to boot.Fix
CreateVm,UpgradeAppandGetComposeHashreject a malformedintorfloatspec inallowed_envs. Regex specs are not compiled there and are left to the guest: one short entry such as/\w{200}/takes about 85 ms to compile, and a compose file can hold any number of them. Measured on a release build, the check takes 30–360 ms for a 3–4 MB compose (200k short entries, or 1000 entries of 4 KB).compose --env-spec 'PORT: int(1..=65535)'(repeatable).deploy,updateandupdate-envkeep entries that carry a spec and only rebuild the plain names.NAME: specentry parsing moves intovalue-specso the guest and the VMM share it.Values are still only checked in the guest: they are encrypted client-side, and the tools do not reimplement the spec language.
Verification
cargo test -p dstack-vmm -p value-spec -p dstack-util, including a newcreate_manifest_from_vm_configtest with valid and malformed specs, and regex specs passing unchecked.python3 -m unittest dstack/vmm/src/tests/test_vmm_cli.pyandnpm testindstack/vmm/ui, with new cases for the merge and for specs not reaching the encrypted payload.