upgrading-infrastructure-dependencies
Skill548 starsChanged 10 days agoApache-2.0View on GitHub
Upgrades Neo4j, Prefect, Redis, RabbitMQ or PostgreSQL across opsmill/infrahub, opsmill/infrahub-private and opsmill/infrahub-helm, including the tests that CI does not run. TRIGGER when: the user wants to upgrade or bump one of these services, the prefect package, or the Neo4j image or Helm chart, or to check or finish such an upgrade. DO NOT TRIGGER when: bumping an ordinary Python or JavaScript package that is not one of these services; analyzing what a dependency-bump pull request breaks → analyzing-dependency-bumps.
- Reads credentials
In this repository54 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backend/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- backend/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- analyzing-ci-flakinessSkill
- audit-docsSkill
- commitSkill
- creating-changelog-entriesSkill
- creating-issuesSkill
- creating-prdSkill
- grilling-ideasSkill
- harvesting-reviewSkill
- migrate-feature-pageSkill
- monitoring-pull-requestsSkill
- neo4j-cypher-guideSkill
- opsmill-dev-analyzing-bugsSkill
- opsmill-dev-fixing-bugsSkill
- opsmill-dev-test-driving-bugsSkill
- pre-ciSkill
- prSkill
- rebaseSkill
- reviewing-pull-requestsSkill
- speckit-agent-context-updateSkill
- speckit-analyzeSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-convergeSkill
- speckit-critique-runSkill
- speckit-git-commitSkill
- speckit-git-featureSkill
- speckit-git-initializeSkill
- speckit-git-remoteSkill
- speckit-git-validateSkill
- speckit-implementSkill
- speckit-opsmill-autoSkill
- speckit-opsmill-extractSkill
- speckit-opsmill-implementSkill
- speckit-opsmill-prepSkill
- speckit-opsmill-retrospectSkill
- speckit-opsmill-summarySkill
- speckit-planSkill
- speckit-review-codeSkill
- speckit-review-commentsSkill
- speckit-review-errorsSkill
- speckit-review-runSkill
- speckit-review-simplifySkill
- speckit-review-testsSkill
- speckit-review-typesSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 3 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 27
Read the AGENTS.md of each repository before you change it.
- Distinctive: line 32
Ask the user which services to upgrade and to which version.
- Distinctive: line 42
Read the release notes of every version between the current one and the target, not only the target: breaking changes often sit in the …
- Very specific: line 59
Search for the old version and change every pin that the search finds, except the files that record past changes and …
- Very specific: line 82
Search there for the old version too.
- Very specific: line 98
If the Infrahub pull request moves to a later release, change the release named in these descriptions.
- Very specific: line 116
Run both on images built from the upgrade branch.
- Very specific: line 128
Before you mark it ready, merge the latest develop into the branch and run the searches of step 4 and of the service notes again.
- Very specific: line 132
Never merge any of the pull requests yourself.
- Very specific: line 159
Check the Cypher changes in the output of the component tests, deprecation warnings included.
- Very specific: line 190
Check the methods that backend/infrahub/workers/infrahub_async.py overrides against src/prefect/workers/base.py of the new version, and the …
- Very specific: line 208
Check the adapters in backend/infrahub/services/adapters/, the locks in backend/infrahub/lock.py and backend/infrahub/locks/, and the …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Upgrading infrastructure dependencies
One upgrade of these services can need a pull request in three repositories:
opsmill/infrahub(this repository): the Docker Compose stack, the test containers, the tests, the docs and the Python packages.opsmill/infrahub-private: Infrahub Enterprise. It pins some of the same images, and its tests must pass with the new version too.opsmill/infrahub-helm: the Helm charts.
Read the AGENTS.md of each repository before you change it. The
service notes at the end say what is specific to each service.
1. Agree on the scope and the release
Ask the user which services to upgrade and to which version. Never default to all of them.
Then find the Infrahub release that the upgrade ships in, and confirm it with the user. It is the
release that develop holds: the minor release after the latest release tag
(git ls-remote --tags origin 'infrahub-v*'), or the one after that when a release-x.y branch
already holds that next minor release. For example, with infrahub-v1.11.9 as the latest tag and
a release-1.12 branch, the upgrade ships in 1.13.0. Infrahub Enterprise uses the same numbers.
2. Check what the new version changes
Read the release notes of every version between the current one and the target, not only the target: breaking changes often sit in the versions in between. For each change that can reach Infrahub, find the code or setting it touches and decide how to check it. Show the user a short report (the breaking changes, the deprecated features that Infrahub uses, the code or setting changes needed, whether the client library supports the new version, and the risk). Wait for their go before you change anything.
3. Branch from the right base
opsmill/infrahubandopsmill/infrahub-private: branch fromdevelop. Neo4j and Prefect upgrades ship in a feature release and never in a patch release, also for a patch version of either, because CI does not run the tests they need and Prefect patch releases can contain breaking changes.opsmill/infrahub-helm: branch fromstable, its only main branch.
4. Change this repository
Search for the old version and change every pin that the search finds, except the files that
record past changes and .github/workflows/version-upgrade.yml, whose images are the versions that
the upgrade test starts from:
git grep -nF '<old tag>' -- ':!CHANGELOG.md' ':!changelog' ':!docs/docs/release-notes' \
':!dev/specs' ':!docs/archive' ':!.github/workflows/version-upgrade.yml'The service notes give a better search for Neo4j and Prefect. Add a changelog fragment of type
changed with the creating-changelog-entries skill, and run the checks that AGENTS.md lists
before you push.
5. Open the Infrahub pull request
Open it as a draft against develop with the pr skill, with the title
chore(deps): upgrade <service> from <old version> to <new version>. In the description, write
the release it ships in, each change in the release notes that can reach Infrahub and how you
checked it, what you did not test, the pull requests in the other repositories, and the test
results of steps 6 and 7 as they come in.
6. Change the other two repositories
Search there for the old version too. Show the user the changes, and open the pull requests only after they agree, as drafts that link the Infrahub pull request and name the release the upgrade ships in.
opsmill/infrahub-private: its tests must pass with the new version before the Infrahub pull request merges. Run them withcommunityat the upgrade branch, as itsAGENTS.mddescribes, and post the result on the Infrahub pull request. A pull request there merges after the Infrahub pull request, oncedevelopthere holds the release the upgrade ships in. If it movedcommunity, set it back to the commit ofdevelopbefore the merge.opsmill/infrahub-helm: only when the charts change. Every final Infrahub and Infrahub Enterprise release publishes its chart fromstable, and so does a chart release cut by hand there. So the pull request merges while the Infrahub release it ships in is cut, before it is published: merged earlier, it ships with a release that was not tested with it. Leaveversion,appVersionandprefectTagalone: the release process sets them onstablejust before the merge.
If the Infrahub pull request moves to a later release, change the release named in these descriptions.
7. Run the tests that CI does not run
A Neo4j or Prefect upgrade also needs these two runs. Run them, or ask a maintainer to.
- Performance: run the tests of
opsmill/infrahub-private-testswith the new version and with the current one, on the same datasets, and compare the failures and the durations. Check in the output of each run that it used the version you meant. - High availability on Kubernetes: deploy the example of the
high-availability guide
(
development/deploy.tfdeploys the same) and test it by hand. The example pins an old chart and image, so install theinfrahub-enterprisechart from a checkout ofopsmill/infrahub-helmas itsAGENTS.mddescribes, with-f charts/infrahub-enterprise/values.small.yamlbefore the values file of the example. Setinfrahub.global.infrahubTagandinfrahub.prefect-server.global.prefect.image.prefectTagto the image you test.
Run both on images built from the upgrade branch. With the user's agreement, add the cd/preview
label to the Infrahub pull request for opsmill/infrahub, and for opsmill/infrahub-enterprise to
a draft pull request in opsmill/infrahub-private whose community points at the upgrade branch.
Each push then publishes the image with the tag dev- followed by the first 7 characters of the
commit. For an image without the upgrade, run the "Publish development docker image" workflow of
the same repository with a commit that does not have it.
8. Mark the Infrahub pull request ready
It is ready for review when its CI and the opsmill/infrahub-private tests of step 6 pass and,
for Neo4j and Prefect, the two runs of step 7 pass. Once the user agrees, mark it ready.
Before you mark it ready, merge the latest develop into the branch and run the searches of step 4
and of the service notes again. A pin that reaches develop while the branch is open is not in your
first search, and stays on the old version unless you search again.
Never merge any of the pull requests yourself. A maintainer merges the Infrahub pull request and
then the opsmill/infrahub-private one. The person who cuts the release merges the
opsmill/infrahub-helm one: /cut-release has this step.
Service notes
Neo4j
Versions are
YYYY.MM.PATCH, in the imagesneo4j:<version>-communityandneo4j:<version>-enterprise. The Helm charts drop the leading zero of the month (chart2026.9.0runs Neo4j2026.09.0), andAGENTS.mdnamesNeo4j 2026.09. Some images can be older than the current version, and some of those still have a version of the earlierX.Y.Zform, such as5.20.0. Search for all of them, with the exclusions of step 4:git grep -nE 'neo4j:[0-9]+\.[0-9]+\.[0-9]+' git grep -nF -e '<old chart version>' -e 'Neo4j <old YYYY.MM>'Latest versions, then the release notes at https://neo4j.com/release-notes/ and the upgrade guide at https://neo4j.com/docs/upgrade-migration-guide/current/:
curl -s "https://hub.docker.com/v2/repositories/library/neo4j/tags?page_size=100&ordering=last_updated" \ | jq -r '.results[].name' | grep -E '^[0-9]{4}\.[0-9]{2}\.[0-9]+-enterprise$' | head -5- Check the Cypher changes in the output of the component tests, deprecation warnings included.
Open a data volume of the current version with the new one, and back it up and restore it with
utilities/db_backup. Compare the memory settings of the size presets in the other two repositories with the release notes, and check that theneo4jdriver andneo4j-rust-extinpyproject.tomlsupport the new version. python_testcontainers/infrahub_testcontainers/container.pyhas two images: the Community default inPROJECT_ENV_VARIABLESand the Enterprise image increate_env_file. Both are written into the.envfile of the test stack, so they win over the fallback ofdocker-compose.test.yml, and no test fails when one of them is old.- The end-to-end job of
.github/workflows/ci.ymlsets its own Neo4j image. Changing it is a CI change, whichAGENTS.mdsays to agree on first: get that agreement and change it in the same pull request, or the end-to-end suite keeps testing a version that Infrahub no longer ships. - Performance runs: set
NEO4J_DOCKER_IMAGE, orDATABASE_DOCKER_IMAGEfor a cluster, in both runs, because the defaults of the test containers can differ. The high-availability example installs theneo4j/neo4jcharts itself: install them at the new chart version.
Prefect
- The
prefectpackage in the Infrahub image runs both the Prefect server and the task workers.opsmill/infrahub-privatehas no pin: it takes Prefect fromcommunity. Latest versions, then the release notes at https://github.com/PrefectHQ/prefect/releases. Read every release in the range, because patch releases can contain breaking changes:
curl -s https://pypi.org/pypi/prefect/json | jq -r '.releases | keys[]' \ | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -5- Find the pins with
git grep -nE 'prefect(-client|-redis)?==|prefecthq/prefect:', then runuv lockin the repository root and inpython_testcontainers/. Comments and links that name the version:git grep -nF '<current version>' -- ':!*.lock', with the exclusions of step 4. - Check the methods that
backend/infrahub/workers/infrahub_async.pyoverrides againstsrc/prefect/workers/base.pyof the new version, and the facts that comments state about the current version. Check the task manager migrations on a large task history, the health check (--with-healthcheck), and thePREFECT_settings of each repository (git grep -lE 'PREFECT_|INFRAHUB_TASKMANAGER_'). List in the pull request the other packages that the lock file moves. - The image is what changes the Prefect version in the test runs: the performance run with the
current version needs an image without the upgrade. Change the
prefect-serverchart ofopsmill/infrahub-helmonly if the new version needs it.
Redis, RabbitMQ and PostgreSQL
- RabbitMQ is the message bus, Redis the cache and the locks, and PostgreSQL the database of the task manager.
- Latest versions: the Neo4j query with the image name and tag pattern changed:
redis(X.Y.Z),rabbitmq(X.Y.Z-management),postgres(N-alpine). Release notes: https://github.com/redis/redis/releases, https://github.com/rabbitmq/rabbitmq-server/releases, https://www.postgresql.org/docs/release/. - Check the adapters in
backend/infrahub/services/adapters/, the locks inbackend/infrahub/lock.pyandbackend/infrahub/locks/, and the client packagesredisandaio-pika. A new major version of PostgreSQL cannot start on the data of an older one: say in the changelog fragment that deployments need a dump and restore orpg_upgrade. - Whether
opsmill/infrahub-helmchanges is not decided: ask a maintainer. Ask too whether to run the tests of step 7.
Report
Tell the user, for each repository, what changed and the link to its pull request, what you tested, and what is still to do before the merge.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

