[RAPTOR-19939] fix(workload): report .env drift on up, and after an update - #882
Draft
wojtekwdr wants to merge 1 commit into
Draft
[RAPTOR-19939] fix(workload): report .env drift on up, and after an update#882wojtekwdr wants to merge 1 commit into
wojtekwdr wants to merge 1 commit into
Conversation
…pdate up never read .env unless a flag asked it to, so a deploy whose .env had just been edited answered "Already up to date" without having looked at the file. Report what dr workload config already reports, naming the flag that settles it on the command being run. Nothing is applied: a deploy stays a function of the committed repo. Only what has moved. A credential's value, a local-only verdict, a placeholder and a manifest no flag can edit are true on every run, so on a deploy they would print forever and take the drift beside them down too. --update-env also named the variables the manifest does not declare only on the run that found nothing to do, so reconciling every value you could left the file reading as a clean bill of health.
|
🎫 Jira: |
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 upnever read.envunless you passed--import-envor--update-env, so a deploy whose.envhad just been edited answered✓ Already up to date. That is a claim about being in sync, made without looking at the file the reader had just edited, and the only command that would have told them isdr workload config, which nothing on the deploy path points at.The rule the two flags were built around is not the problem and does not change here: a deploy stays a function of the committed repo. Reading the file to say the two have parted is not deploying from it, and nothing is applied without a flag that asks for it by name.
CHANGES
upreports the drift, through the comparisondr workload configalready runs, so the two commands cannot reach different conclusions about the same pair of files. Names only, never values. The remedy is a flag on the command you are already running rather than a trip to another one, and it carries the--dirthis run was given, becauseconfiglooks only where it is pointed whileupwalks upward for the manifest.Only what has moved. A credential's value, which nothing can compare; a name the classifier read as local-only, which no flag will ever add; an entry still naming the placeholder; a manifest whose shape no flag can edit, whose refusal counts the whole of
.envas missing. None of those can be settled by anything the reader is about to run, so on a deploy each would print on every run for the life of the project, and a line that always prints is one you stop reading along with the drift beside it.dr workload configstill says all of it.--update-envowed a notice it was not giving. It named the variables the manifest does not declare only on the run that found nothing to do, so reconciling every value you could left the file reading as a clean bill of health while a variable it had never carried went on reaching nothing.Two things fixed on the way, both pulled onto the common path by the above:
manifest.DirFlagquotes a project path with a space in it, so the remedy survives being pasted into a shell, anddr workload config --dir <path>carries that--dirinto its own remedies.