11. Infrastructure-only redeployment without new distribution
Status
Accepted
Context
The Mithril release process (see ADR 3) is designed around distributing new versions of the Mithril software. Every release cycle builds new artifacts, creates Docker images, publishes crates and npm packages, and deploys the infrastructure.
However, some changes do not require a new Mithril distribution at all. A typical example is a Cardano node upgrade that is fully compatible with the current Mithril nodes: the Mithril binaries and Docker images remain unchanged, but the infrastructure must be redeployed with updated configuration (e.g. new Cardano node version, new configuration files).
Previously, this required going through the full release cycle, creating a new distribution tag even though the Mithril software itself introduced no new features. This was inefficient and added unnecessary overhead to the release process.
Decision
The pre-release and release GitHub workflows now support manual triggering (workflow_dispatch) to redeploy the infrastructure without creating a new distribution.
When triggered manually:
- Only the deployment jobs (
deploy-pre-release/deploy-release) run. - All other jobs (Docker build, GitHub release creation, crate/npm publishing) are skipped.
- The caller provides the
mithril_image_idof the existing Docker image to deploy. - A
dry_runmode (enabled by default) allows verifying the terraform plan before applying it.
The process to perform an infrastructure-only redeployment is:
- Create a branch with the infrastructure modifications since the last release (e.g. updated Cardano node configuration files in
mithril-infra/). - Run the Pre-release workflow manually from that branch:
- Provide the
mithril_image_idof the current distribution already deployed. - Enable
dry_runto verify the terraform plan. - Disable
dry_runto apply the deployment topre-release-preview.
- Provide the
- Once validated, run the Release workflow manually from that branch:
- Provide the same
mithril_image_id. - Enable
dry_runto verify the terraform plan. - Disable
dry_runto apply the deployment torelease-preprodandrelease-mainnet.
- Provide the same
- Merge the branch back to
main.
Consequences
- Cardano node upgrades that are compatible with the current Mithril distribution no longer require a new release tag or distribution version.
- The existing tag-push and release-event triggered behavior of both workflows is completely unchanged.
- The
dry_runmode provides a safety net by allowing operators to review the terraform plan before any actual deployment. - The
mithril_image_idinput must reference an existing Docker image in the registry; it is the caller's responsibility to provide a valid value. - Infrastructure changes must still be merged back to
mainafter deployment to keep the repository in sync with the deployed state.