Versioning logic should include all underlying services #47
Labels
No Label
automation
bug
community organising
democracy
design
documentation
duplicate
enhancement
finance
funding
help wanted
invalid
publishing
question
security
wontfix
No Milestone
No project
No Assignees
2 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/organising#47
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
The current way
abra
handles versioning logic is that it looks at the deploy tags on the${STACK_NAME}_$SERVICE
and then does some comparisons and outputting based on those. A good start.However, the thought has occurred that, since our app definitions ship their own versions of the underyling services required to run the app - the databses and caches and so on - should we also be taking those versions into account also!?
For example, an app repo packager might bump the version of the MySQL image and nothing else. The current versioning logic will say "nothing changed, no need to deploy". But that should deploy a new database image. And if that upgrade is a major version, you definitely want to know about it on the hoster side of things.
My gut feeling is that
abra
should take into consideration all service versions! What do you reckon? I think this could be a larger piece of work but will make things more stable. To do it:ABRA_TYPE_VERSION
toABRA_TYPE_<service>_VERSION
ABRA_TYPE_DIGEST
toABRA_TYPE_<service>_DIGEST
abra.sh
abra
logic to take those into account and display an update summaryYeah now that you mention it, definitely! Maybe we can do some
find
/yq
/sed
magic to pull the image tags out of all thecompose.yml
s to get us started 🤔Yeah seems like we might need some automation around this extra work load. Something not so magic would good. Maybe just a bash script to run as a packager that spits out all the tags and digests from the local compose.yml file something like
app-catalogue.sh
.Should app versioning cover all services in the app definition?to Versioning logic should include all underlying servicesI will try to work this into
abra
handling now.OK, I am finally sold on the idea that we should vendor yq because I can list all services from a
compose.yml
file like so:yq e '.services | keys | .[]' compose.yml
. When we take into account that we'll need to handle multiplecompose.*.yml
files which overload services then it starts to complicated to read the services list and feed that into the version checks.It seems pretty chill to programmatically download that. I might stick it in
.abra/vendor
using these docs https://mikefarah.gitbook.io/yq/#install to get the download logic.If we have an app that has two compose files (c1 and c2) and in c1 we have two services (s1 and s2) then in c2 we overload s2 and define a third service (s3) then we're into some serious edge-case handling for different users who might use c2 (and therefore an update to s3 must be included) or might only use c1 (and then we never care about an upgrade to s3).
If this makes no sense ignore me I am mostly typing this out for myself haha.
I think we need a way for
abra
to know exactly which compose files it is looking at and exactly which services it will be updating. This feels like a lot of extra parsing work or maybe it can be solved with some manual packager work but it feels a bit too complicated and I want to keep this stuff simple.Gonna sit on this for a bit.
Oh, here is a rough algorithm:
COMPOSE_FILE
env var insub_app_deploy
And don't forget to handle the case where everything is updated (no-op).
e99bedf9e4
implements #47 (comment). This is nearly there. I just need to add edge-case handling, missing versions and integrating with the--update
flag. I'll track that over in coop-cloud/abra#90.