Repository navigation
fix(cluster): name only the Compose files the host has when checking a deploy - #196
Merged
Merged
Conversation
…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
marked this pull request as ready for review
November 3, 2026 15:14
Mearman
force-pushed
the
fix/node-labels-compose-check
branch
from
November 3, 2026 15:14
6f98935 to
05cc54b
Compare
|
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. |
|
🎉 This PR is included in version 2.27.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
site.yml --checkon a fleet that turns the role controller on failed on every host: the compose commands and the Compose module the role runs under--checknameddocker-compose.node-labels.yml, which a check run does not write, so Compose refused (open .../docker-compose.node-labels.yml: no such file or directoryfrom the recreate check on the servers,Cannot find Compose filefrom 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 intotasks/start_agent.ymlso it can be tested as a server's is.The test stand-ins for
docker compose configand 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