Open
Conversation
- _apply_env_metadata_to_compose was called twice (once inside _generate_app_compose, once at each call site), causing redundant allowed_envs processing. Now _generate_app_compose only builds the dict; callers apply env metadata in one pass with both envs and env_names. - Remove reboot from prelaunch.sh token check — exit 1 is sufficient to block startup; reboot causes an infinite loop if the token stays wrong. - _apply_env_metadata_to_compose now returns None (pure mutation) to match how callers use it.
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.
Summary
allowed_envsandlaunch_token_hashfrom.envprepareand deploy-time compose generation soAPP_LAUNCH_TOKENworks automaticallynewgenerate a defaultprelaunch.shtemplate that verifiesAPP_LAUNCH_TOKENwhen presentThis can be used to prevent the app from being deployed on an unauthorized device.
Validation
python3 -m py_compile scripts/bin/dstack-clouddstack-cloud new+prepareand verified generatedshared/app-compose.jsoncontains the expectedlaunch_token_hashandallowed_envs