[RAPTOR-19721] feat(workload): take the .env flags on up as well as config - #2
Closed
wojtekwdr wants to merge 1 commit into
Closed
[RAPTOR-19721] feat(workload): take the .env flags on up as well as config#2wojtekwdr wants to merge 1 commit into
wojtekwdr wants to merge 1 commit into
Conversation
…onfig up already reads .env: with no manifest it runs the wizard, which classifies the file, mints the credentials and writes them in. The second run was the only one that could not, which made the file a deploy reads something you had to leave the command to change. --import-env and --update-env now do the same two edits as part of a deploy, so adding a variable or rotating a key is one command rather than two. Both stay opt-in, and that is what keeps a deploy a function of the committed repo: a run without them reads nothing but the manifest, so a fresh CI clone with no .env deploys exactly what a working copy deploys. The edit runs before the plan, so what the plan shows and what the deploy carries is the file as edited. A dry run previews it and writes nothing, saying that the plan below is for the manifest as it stands. A re-sent secret is the one edit a deploy cannot finish: it changes no file, so a deploy with nothing else to do replaces no container and the workload keeps serving the value it started with. That run now says so and names the restart instead of reporting the workload as up to date and leaving it there.
Owner
Author
|
Moved to datarobot-oss/cli. |
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.
RATIONALE
dr workload upalready reads.env: with no manifest it runs the wizard, which classifies the file, mints the credentials and writes them in. The second run was the only one that could not, so the file a deploy reads was something you had to leave the command to change.CHANGES
dr workload up --import-envanddr workload up --update-envdo the same two edits as part of a deploy, so adding a variable or rotating a key is one command rather than two..envdeploys exactly what a working copy deploys.--dry-runpreviews it, writes nothing, and says the plan below is for the manifest as it stands.upenvelope gains anenvblock:keysAdded,valuesUpdated,secretsRotated,secretsNotRotated,secretsPending.TESTING
task testandtask lintpass. Exercised against a live instance:up --import-envminted the credential, added both variables, planned them as spec changes that keep the running image, rolled out with no rebuild in about 90 seconds, and the container logs show both.up --update-envwith nothing else to do re-sends the secret and prints the restart advice rather than a bare "Already up to date".NOTES
Third of a stack of three. Merge after the
--update-envPR.