feat: app rm - check if the app is undeployed before removing #61
Closed
knoflook
wants to merge 1 commits from
knoflook/abra:dev into main
pull from: knoflook/abra:dev
merge into: :main
:main
:fix/492
:local-integration-testing
:renovate/github.com-charmbracelet-lipgloss-2.x
:renovate/otel-weaver-0.x
:renovate/codespell-2.x
:renovate/github.com-charmbracelet-bubbletea-2.x
:renovate/tonistiigi-xx-1.x
:renovate/alpine-3.x
:renovate/github.com-charmbracelet-log-2.x
:chore-deps
:fix/deps
:fix/613
Dismiss Review
Are you sure you want to dismiss this review?
Labels
Clear labels
bug
build
ci/cd
critical fix
design
documentation
duplicate
easy-first-issue
enhancement
help wanted
i10n
i18n
installer
invalid
question
release
release-candidate
security
tech-debt
test
wontfix
Something is not working
go build related issues
Building things with CI/CD
https://docs.coopcloud.tech/federation/resolutions/passed/010/
UI/UX
Documenting all the things
This issue or pull request already exists
Something for new people to get stuck into. We hope it's easy!
New feature
Need some help
Everything to do with localisation
Everything to do with internationalisation
Everything to do with the install script.
Something is wrong
More information is needed
Release management
Related to the new release candidate
Security related
Unit/integration testing
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/abra#61
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Also fixes app rm not checking for the volumes and secrets at all.
@@ -68,0 +68,4 @@if !internal.Force {// get app status and check if it's deployedstatuses := map[string]string{}statuses, err = config.GetAppStatuses(appFiles)Is there a reason for doing it like this vs
statuses, err := config.GetAppStatuses(appFiles)nope, I just brainlessly copied it from cli/app/list.go lol
Everything looks fine but did comment on one line of the code that looks like it can be simplifed but I didn't write it so there could be a reason for that you encountered. I can't test it right now though so I'll have to ping @decentral1se to test the code when he can. I don't see why not atm though as the code looks good.
64608a5ab0to0d548869e8@@ -68,0 +72,4 @@logrus.Fatal(err)}if statuses[appName] == "deployed" {return errors.New("app still deployed. Run abra app undeploy first. (or pass --force)")Unsure if we want to move to the return flo uses if urfave/cli like actually outputs it to stderr. I used logrus cause its there and we will use it for debug, warn, and info. But for errors we could return to avoid the messy error output. Like the way it looks is fine for a daemon but im reconsidering that for a cli program
Merged in cc249e8187066cb9ce7a15e6ce97e843c953a135! Thanks!
I like the approach of using
config.GetAppStatusesbut I realise now that it looks up all statuses of all apps instead of just one app. We'll need to figure out a separate API for that.Pull request closed