Avoid deleting data without prompt #325
Closed
opened 2022-05-30 07:57:39 +00:00 by mayel
·
4 comments
Labels
Clear labels
abra
awaiting-feedback
backups
bug
build
ci/cd
community organising
contributing
coopcloud.tech
design
documentation
duplicate
enhancement
fedi
fedi-infra
finance
funding
good first issue
help wanted
installer
legal
performance
proposal
question
security
test
wontfix
Everything to do with abra
Ping/pong on comms
Something is not working
Go build related issues
Getting the robots into the mix
Opening this thing up
Contributors stuff
Our main website
Design thinking required
Let's write things together
This issue or pull request already exists
New feature
Democratic decision making
Money things
Anything related to grant funding
Easy start with development
Need some help
Installation related issues
Performance related
Large change which requires feedback & decisin making
More information is needed
Securing our shit
Unit or integration test suite
This won't be fixed
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
decentral1se
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/organising#325
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.
If you already have a directory for a server and then try to
abra server addit deletes it and the files inside:INFO[0004] /Users/me/.abra/servers/example.bonfire.cafe already exists
WARN[0013] cleaning up context for example.bonfire.cafe
WARN[0013] cleaning up server directory for example.bonfire.cafe
Oh damn, hope you didn't lose any data @mayel 😱
This logic was implemented to clean up failed server add attempts.
I think a fix might be "check if files in server directory, delete context / directory if not" logic? I'd rather not add an additional prompt for an internal logic and I guess people won't want to delete the context & directory if they have files inside it! Lemme know if that sounds weird.
No data loss don't worry :)
Here's how I came across this issue, I wanted to create several new instances similar to an existing one (with similar env keys), so duplicated it's folder, renamed each copy and renamed/edited the config files within. Then doing
abra server lsshowed that the servers didn't have a host/user/port associated and I assumed thatabra server addwould allow me to add those and used the ready-made folder.Weird workflow maybe, and I'm not suggesting that you support it (I ended up just doing
abra server addand copying the configs into the blank directories after). But yeah, maybe just aborting if it exists?Ran into this again.
Our internal Autonomic workflow goes like this: we have a single "coop-cloud-apps" repository with every server directory in it with all the
.envfiles. We use a Makefile to symlink the stuff into~/.abra/servers/...but thenabra server lsshows that none of them have any connections details connected.@knoflook has suggested that this ticket is related and we could solve this inside
abraitself.So, it seems we need to 1. not delete server directory 2. if we detect a directory that has no server details, error / warning out with a "you need to
abra server addthis thing to get a connection" going?Finally handled in coop-cloud/abra#262.