Skip to content

Conversation

@lucasbalieiro
Copy link
Contributor

@lucasbalieiro lucasbalieiro commented Jan 5, 2026

closes #137

This adds a GitHub Actions workflow and validation script that compares TOML config examples against their corresponding Docker template files.

The check ensures all config keys stay in sync, preventing silent drift between example configs and Dockerized deployments.

This CI does not check the docker_env.example file, because the decision to override values via docker_env or rely on the default configuration is intentionally left to the implementer.

Additionally, docker-release.yml was updated to build and publish the main Docker tag on every PR merged intomain branch.

@lucasbalieiro lucasbalieiro force-pushed the add-docker-config-check branch from f361a4a to d46e273 Compare January 5, 2026 19:22
@lucasbalieiro lucasbalieiro marked this pull request as ready for review January 5, 2026 19:27
@lucasbalieiro lucasbalieiro force-pushed the add-docker-config-check branch from d46e273 to 98e5c23 Compare January 5, 2026 20:33
@lucasbalieiro
Copy link
Contributor Author

Tested this script on @GitGab19 PR #129 , and the script was able to identify the missing config:
image

@GitGab19
Copy link
Member

GitGab19 commented Jan 6, 2026

Which commit did you use in your test?

Because yesterday I pushed fd245fc which added the new config to the docker templates..

@lucasbalieiro
Copy link
Contributor Author

Which commit did you use in your test?

Because yesterday I pushed fd245fc which added the new config to the docker templates..

Yeah, I saw it.

I Just reverted it locally, to see if the script would catch the problem and then reapplied to see if the script stop complaining with the fix from the commit

@lucasbalieiro lucasbalieiro force-pushed the add-docker-config-check branch from 98e5c23 to f3f4b8e Compare January 6, 2026 16:11
@lucasbalieiro lucasbalieiro marked this pull request as draft January 6, 2026 18:48
@lucasbalieiro lucasbalieiro marked this pull request as ready for review January 7, 2026 20:05
@lucasbalieiro
Copy link
Contributor Author

ready for review again.

added two new commits:

  • 19214e0
    Updates docker-release.yml to run not only when a release is published, but also on every PR merged into main.
    As a result, the latest Docker tag now always reflects the current state of main, while versioned tags (e.g. v0.1.0) remain unchanged and are still published only on releases.

  • 0d70601
    Updates docker-compose.yml to reference the latest tags instead of the latest release tags.

services:
pool_sv2:
image: stratumv2/pool_sv2:v0.1.0
image: stratumv2/pool_sv2:latest
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the “maintainer’s job” that I mentioned in the issue comes into play: when cutting a release, maintainers must update this Docker tag to reference the exact release version being published, ensuring the release points to a stable, immutable image.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can do that by adding one single commit directly to the release branch.

Now we are creating the release branch after we push the release, but we should simply switch the order:

  • we create release branch
  • we add a new commit where we make docker-compose point to the release image
  • we add a new commit where we make stratum-apps and bitcoin_core_sv2 fetch stratum-core from crates.io (as planned here)
  • we trigger the release, referencing the release branch instead of main

In this way we would avoid adding commits on main which would need to be reverted right after the release.

Wdyt @plebhash ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

took note here: #175

@lucasbalieiro lucasbalieiro force-pushed the add-docker-config-check branch from 0d70601 to ce7e061 Compare January 8, 2026 16:54
@lucasbalieiro lucasbalieiro force-pushed the add-docker-config-check branch from ce7e061 to bed08b6 Compare January 8, 2026 18:03
@lucasbalieiro lucasbalieiro force-pushed the add-docker-config-check branch 2 times, most recently from 59933c9 to 38fbcf4 Compare January 9, 2026 15:02
@lucasbalieiro lucasbalieiro force-pushed the add-docker-config-check branch from 38fbcf4 to 16326f6 Compare January 9, 2026 17:31
This adds a GitHub Actions workflow and validation script that
compares TOML config examples against their corresponding Docker
template files.

The check ensures all config keys stay in sync, preventing silent
drift between example configs and Dockerized deployments.
@lucasbalieiro lucasbalieiro force-pushed the add-docker-config-check branch from 16326f6 to cc23006 Compare January 9, 2026 17:33
@plebhash plebhash merged commit 3f68277 into stratum-mining:main Jan 9, 2026
10 checks passed
@lucasbalieiro lucasbalieiro deleted the add-docker-config-check branch January 10, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add a CI check for docker setup

3 participants