Skip to content

fix(cluster): name only the Compose files the host has when checking a deploy - #196

Merged
Mearman merged 3 commits into
mainfrom
fix/node-labels-compose-check
Nov 3, 2026
Merged

Mearman merged 3 commits into
mainfrom
fix/node-labels-compose-check

Conversation

@Mearman

@Mearman Mearman commented Nov 3, 2026

Copy link
Copy Markdown
Member

site.yml --check on a fleet that turns the role controller on failed on every host: the compose commands and the Compose module the role runs under --check named docker-compose.node-labels.yml, which a check run does not write, so Compose refused (open .../docker-compose.node-labels.yml: no such file or directory from the recreate check on the servers, Cannot find Compose file from the module on the agents). Any override file added to a host that had already run the role would have done the same.

A check run now leaves out of every Compose command the files the role writes and the host lacks (github_runner_cluster_compose_files_in_use), and a server that would gain one is reported as recreated, naming the file. A Compose file of the user's own that is missing is still an error, and a real run names every file because it has written them first. The agent's start moved into tasks/start_agent.yml so it can be tested as a server's is.

The test stand-ins for docker compose config and the Compose module now fail on a missing file as the real ones do, which is why the earlier tests did not catch this. The new tests run the role's task files in check mode against hosts with labels set and no node-labels file, on servers and an agent; without the fix they fail with the two errors above. Another test holds the order for the first real run (files placed, then the list worked out, then the mesh and every start) and that no task passes the whole list to a Compose command.

Refs #182

…a deploy

Under --check the role writes nothing, so a Compose file it would add to a host that had run it
before was not there, and the read-only compose command and the Compose module that named it
failed the check: docker-compose.node-labels.yml, for a host turning the role controller on.
A check run now leaves out of every Compose command the files the role writes and the host lacks,
a server that would gain one is reported as recreated by name, and a Compose file of the user's
own that is missing is still an error. A real run names all of them, having written them first.

The agent's start moves to a task file of its own so that it can be run as a server's is. The
test stand-ins now fail on a missing Compose file as Compose and its module do.
The guard on the order of the runtime's end checks looked for the agent's Compose task in the role's
main task file, where it was before the agent's start became a task file of its own.
… file

The role_controller mesh scenario removes docker-compose.node-labels.yml from every node's project
directory as a host that ran the role before the controller was on does, and runs the role with
--check against real Docker: it must pass, write nothing and restart nothing. The real run after it
writes the file first and recreates no container.
@Mearman
Mearman marked this pull request as ready for review November 3, 2026 15:14
@Mearman
Mearman force-pushed the fix/node-labels-compose-check branch from 6f98935 to 05cc54b Compare November 3, 2026 15:14
@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@Mearman
Mearman merged commit 3e2eae7 into main Nov 3, 2026
31 checks passed
@Mearman
Mearman deleted the fix/node-labels-compose-check branch November 3, 2026 15:43
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.27.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant