Un-chaos unhelpful error and fuzzy brain / no git version loss #668
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
You deploy version X, then hack it and
deploy --chaos
then undeploy and want to deploy the old version X and get:Your
--chaos
deploy put the commit hash in your app.env
. You can passabra app deploy <app> <version-x>
to override it. You can also passabra app deploy --latest
(if version X is the latest one!). You can also edit the.env
and delete the:<commit-sha>
to get it to "reset" (which will then pick the latest version ondeploy
).The error doesn't really help you in this case.
Also if you forgot what version X is and don't use Git, you're really in trouble! If you can't do
--latest
(for whatever reason, some intermediate upgrade will break your deployment), then it is really easy to get lost. I thinkabra
could potentially help here by stashing the last version used when you--chaos
so that you canabra app deploy --unchaos
? That would recover your version once you're finished with chaos hacking.Or maybe simpler,
abra
can record somewhere every version it sees so you can track back somehow?abra app deploy --history
could just be a read-only list output with timestamps? This could be stashed in~/.abra/cache
or something, idk. This all seems a bit tricky.Other work-around is "just use git" but this is not great for new hackers...
These problems are kind of separate but also related.
/cc @iexos @cyrnel @3wordchant @p4u1 (would love your feedback on this)
Deploy history would be great of course, but as a quick fix maybe just suggest something else instead? Like
In my case, I had a
--chaos
deploy because I was testing a new version, then wanting to roll forward to the new version once I released it. So I only checked the flags/docs forabra app upgrade
because I was convinced I was doing an upgrade.I would think
deploy
should not have anything to do with versioning; it should just deploy whatever version you have configured. Other commands would handle the version (likeupgrade
androllback
). But that might have negative effects since you don't wanna input SHAs every time you do a new chaos deploy, etc.@cyrnel
abra app deploy
is about the most versatile command with regards to versioning based on what people have needed it to do down through the years. It's the swiss army knife of the entire command-line tool basically. I think the--latest
flag works in your case (or passing the version) relatively OK.#668 (comment) seems like a good / easy to fix for now if someone wants to take a run at it.
Caching a simple read-only list of versions and timestamps per-app in
$ABRA_DIR/.cache
seems like a good thing to do eventually. This is pending some good CLI UI/UX also. Please anyone take a stab at it if you feel like it!