app check should use diff
command for two-way checks #36
Labels
No Label
breaking-change
bug
CI/CD
design
documentation
duplicate
enhancement
help wanted
invalid
plugin
question
secrets
shell-completion
versioning
wontfix
No Milestone
No Assignees
2 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/abra#36
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the upstream
.envrc.sample
is edited then some of the env vars change. The "downstream" in this case is usually your~/.abra/servers/...
env vars configuration. They are out of sync.For example, when I edited the
coop-cloup/foodsoft
repo env vars, then my local~/.abra/servers/$domain/$domain
foodsoft env var configuration was not updated.It would be cool to do an env var match (e.g.
require_env_var_match
) on both the app env vars and the server domain env vars (just name will do) to make sure things are in sync. Manual editing can resolve for now. Just a warning and then erroring out should do itSyncing ~/.abra/apps/$app env vars with ~/.abra/servers/$server/$domain config env varsto Syncing ~/.abra/apps/$app env vars with ~/.abra/servers/$server/$domain env vars(remove
export FOOBAR
from the file)Using a brittle regex, maybe a candidate for #34 ..
Awesome, thank you! I think one final thing to think about is how to show which is out of sync? You have your tempoate repo env var file and your server env var file, either one could be out of sync for $reasons. So, I guess a "in this file ..." message added would help point out the inconsistency.
Syncing ~/.abra/apps/$app env vars with ~/.abra/servers/$server/$domain env varsto abra app $domain checkOh, found another issue: if you leave out
# length=$whatever
in one of the env var files the regex thinks they don't match and complains but actually the env var is in place? Maybe it could be worth just running instead a diff on the two files because there can be many $reasons it is out of sync?Currently it just checks for vars which are in
.envrc.sample
and not in$ENV_FILE
.If we wanted to verify the converse, that there aren't any extra vars in
$ENV_FILE
which aren't in.envrc.sample
(which I think is maybe what you're suggesting) then a) we need to parse optional vars from.envrc.sample
because e.g.EXTRA_DOMAINS
is commented out by default and b) we could probably usediff
instead ofcomm
.Thoughts?
Let's diff! :)
abra app $domain checkto app check should use `diff` command for two-way checks