abra app cp
with chaos flag
#637
Loading…
x
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?
When working on recipes I often copy files to the container to test some changes without completely redeploying this app. But unfortunately
abra app cp
always tries to checkout to the current recipe version, so it fails if there are uncommitted changes. Adding a--chaos
flag would solve this issue.Tested version:
04aec8232f
Huh, I tested this and the behavior is different (it worked with my unstaged changes without trying to checkout current recipe version)
Thanks for checking this!
Hmmmm looks a bit suspcious there in the code:
bba1640913/cli/app/cp.go (L47-L49)
There's no
--chaos
flag supplied to the command?There has been a really large churn in the CLI / flag handling and also a large refactor in how these Git operations get performed, so plenty of space for bugs to creep in.
I'd say we want to pass the
--chaos
flag in this case? And perhaps we want to put down an integration test on this to ensure we don't have a regression? I see no--chaos
related tests intests/integration/app_cp.bats
(docs here on how to run / write tests. it's 100% bash energy!)This comment will be confusing if I don't give names to things so I will start with that
Tested Version: the version @moritz tested and cut the ticket based on.
My version: The abra version I tested before my response, and it is
0.9.0-beta-e3a0af5
Live version: the version @decentral1se provided a snippet from in the previous comment
Well, silly me, I didn't think about the difference of versions
My version doesn't have any mention of
internal.Chaos
while tested versions had the snippet below04aec8232f/cli/app/cp.go (L53-L55)
Tested version also had this snippet
04aec8232f/cli/app/cp.go (L32-L35)
Live version doesn't have flags, did we change how flags are set for commands @decentral1se?
@ammaratef45 That'll be coop-cloud/abra#435 (large refactor, testing still WIP). If you check the other commands, they do have flags. You need to set
--chaos
on the specific command now vs. before it was everywhere (which was also a hack 🙃). We've had a long standing messy setup with the CLI lib and we're maybe not 100% out of it yet! Thanks for taking a deeper look!decentral1se referenced this issue2024-12-27 21:49:24 +00:00
a0da5299fe/cli/app/cp.go (L375-L383)