Specify a different git location for a recipe #533
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?
Use Case:
I find a bug in a recipe or create a new feature and make those changes in the
~/.abra/recipes/<myrecipe>
, so I can directly deploy the fix or the new feature. Next I push the changes to a fork and upstream the changes. While waiting for the changes to land upstream all other people managing the same server must manually change the recipe to my fork and checkout the correct branch. This is quite error prone, since I need to inform them manually and they need to do the correct git operations manually.Feature Request:
It would be nice to optionally specify a git repository for a recipe. I can think of two places where this could be specified:
.env
file using e.g. aGIT_REPO
env variableWith either method it would be nice to have a command for it (but not required). But it must be easy to add this information to a git repository managing the server.
Specify a differnt git location for a recipeto Specify a different git location for a recipeThanks for raising, important one!
I wonder could this feed into: https://docs.coopcloud.tech/federation/resolutions/in-progress/013/ somehow 🤔 Generally, the simplest solution to replace your now laborious work-around is probably the one we'd want to go with. So, please feel free to sketch out something that you think will practically work for yourselves.
So,
abra
would honour aGIT_REPO=...
remote URL in a.env
file and then use that to clone the recipe if not present? Otherwise, it respects the remote and pulls from there, so that would be fine. It would try to check out tags from the catalogue tho and if those are not present in your forked recipe, that might be an isssue. However, I believe local tags are also respected and a "fetch all tags" is arranged byabra
. Maybe ifGIT_REPO=...
is set, we ignore the (centralised) catalogue for now? Unsure, this would need some testing.Probably you want to have a way to specify a branch in that env var? There might be something standard we can parse.
I have an idea, to combine the two proposals:
We define a new Variable
RECIPE
which can consist of two parts:a
recipe definition
and aversion
separated by a colon. Some examples:Recipe Definition
A recipe definition can be one of the following
https://
Version
A version can be any git ref. This includes tags, branches and commits.
When
RECIPE
contains a version, it gets updated when using theabra app upgrade
and related commands.I can further refine this proposal, If you think this is right direction.
Oh yeh, that looks pretty damn solid to me @p4u1 🎉
It seems also like a smaller stepping stone towards
OPERATOR_SYNC_VERSION
like functionality in https://docs.coopcloud.tech/federation/resolutions/in-progress/013/#details-budget-007 without the syncronisation? Maybe more people can agree to this first step.@moritz any thoughts on this one?
Love this idea.
I would like to add the git commit as version for a specific chaos deployment #517:
decentral1se referenced this issue2024-03-28 13:54:55 +00:00
The wheels are turning! coop-cloud/abra#420
Too hasty closing this, we need some integration tests and docs still 🤓
b8e1a3b75f
7672eea434