spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.92k stars 1.05k forks source link

Meta: Centralized location for versions of containers? #965

Open skepticalwaves opened 3 years ago

skepticalwaves commented 3 years ago

I regularly see PRs like this https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/964

And I wonder if centralizing all the versions into a single file would allow for perhaps automated checking/updating of container versions.

spantaleev commented 3 years ago

We keep roles independent of one another, so centralizing variables goes against that.

Someone worked on some grep (etc.) script to generate a list of all versions for the various components, for the purposes of easily diff-ing their current playbook commit against a new one. Not sure where that script was published though.

Still, someone probably needs to go through each component and check for new releases for that component, and then make a PR. For components like nginx it's easy to just bump the version a bit (even without really testing it).

For other components, one may need to test more thoroughly. The playbook has grown quite large, so we're probably all using various subsets of the components. I can't properly test and upgrade the IRC bridge, for example, because I neither use it (so I can't test it), nor do I have the time to maintain tens of such optional components updated (especially when I'm not using them myself).

Some decentralized maintenance of all these things would be better. Me (or someone else) updating things blindly doesn't sound good somehow - it may lead to a non-working setup. Although.. a non-working setup may be a good way to force users to step up and fix the broken components they care about.

skepticalwaves commented 3 years ago

That's entirely reasonable. That script would be helpful to keep track of the current state of the playbook vs the latest versions of things, at least as a possible path for people to test/contribute. Will do some searching to see if I can find it.

rakshazi commented 3 years ago

here's the script (note: you should have yq installed):

#!/bin/sh
grep -rhE "^matrix_.*_version: |^custom_.*_version: "  ./roles/*/*/defaults/main.yml | sed -e "s/matrix_//;s/custom_//;s/_version//;/^synapse_default/d;/^synapse_ext/d;/^mailer_container/d" | sort | yq -y | sed "s/^/\*\ /" > $PWD/VERSIONS.md

it generates VERSIONS.md file with list of all components and their versions, I have it in pre-commit hook for my wrapper repository, and the result: VERSIONS.md (example diff)