add a warning if ~/.abra/servers/ has uncommitted git changes #267

Open
opened 2021-11-24 21:34:09 +00:00 by 3wordchant · 1 comment
Owner

Describe the problem to be solved

be me
disorganised, collaborating with a bunch of people, firing apps at the internet like it was a competitive sport
abra app config <something>
abra app config <something-else>
abra recipe create, hack on it some, and slam some uncommitted stuff into the live .env file because why not
...
time passes
...
collaborators try and edit app configuration, redeploy apps after inevitable SSO / custom theme / $general_docker_breakage
things break
I delete my hard drive in a not-rare flourish of chaos
deployed configs are lost to history

Describe the solution you would like

We already have incrediblyrobust checking of the git status of recipe repositories in ~/.abra/apps.

What about:

  1. Check if the server directory, e.g. ~/.abra/servers/demo.coopcloud.tech/, is a symlink, and find the target if so.
  2. If not, check if the entire abra servers directory ~/.abra/servers is a symlink, and find the target of that if so.
  3. (Future-brain: if not, then maybe check if the entire ~/.abra directory is a symlink, and read that?)
  4. Wherever we've decoded the symlink to, do a git status on that folder (possibly with git's default terrifying behaviour of traversing up the entire directory tree to see if any parent directories are git repoitories..?)
  5. If there are any uncommitted changes in said repository, give us a friendly warning (pls not an error, I am optimistic about my ability to change but not delusional), e.g. `that shit = ain't commit``

During, I guess, any app-involving abra operation?

## Describe the problem to be solved > be me > disorganised, collaborating with a bunch of people, firing apps at the internet like it was a competitive sport > `abra app config <something>` > `abra app config <something-else>` > `abra recipe create`, hack on it some, and slam some uncommitted stuff into the live `.env` file because why not > ... > time passes > ... > collaborators try and edit app configuration, redeploy apps after inevitable SSO / custom theme / $general_docker_breakage > things break > I delete my hard drive in a not-rare flourish of chaos > deployed configs are lost to history ## Describe the solution you would like We already have incrediblyrobust checking of the git status of recipe repositories in `~/.abra/apps`. What about: 1. Check if the server directory, e.g. `~/.abra/servers/demo.coopcloud.tech/`, is a symlink, and find the target if so. 2. If not, check if the entire abra servers directory `~/.abra/servers` is a symlink, and find the target of _that_ if so. 3. (Future-brain: if not, then maybe check if the entire `~/.abra` directory is a symlink, and read _that_?) 4. Wherever we've decoded the symlink to, do a `git status` on that folder (possibly with git's default terrifying behaviour of traversing up the entire directory tree to see if any parent directories are git repoitories..?) 5. If there are any uncommitted changes in said repository, give us a friendly warning (pls not an error, I am optimistic about my ability to change but not delusional), e.g. `that shit = ain't commit`` During, I guess, any app-involving abra operation?
3wordchant added the
enhancement
abra
labels 2021-11-24 21:34:09 +00:00
Owner

I think #467 (comment) is maybe at odds with the approach proposed in this ticket. I think the warning would be a great feature if we can detect a git repository but #467 is proposing a much more automated approach. There could a dependency on finally doing #303 to allow different modes of collaboration to happen?

I think https://git.coopcloud.tech/coop-cloud/organising/issues/467#issue-3577 is maybe at odds with the approach proposed in this ticket. I think the warning would be a great feature if we can detect a git repository but #467 is proposing a much more automated approach. There could a dependency on finally doing https://git.coopcloud.tech/coop-cloud/organising/issues/303 to allow different modes of collaboration to happen?
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#267
No description provided.