Skip to content

Read blue-green config from node config, not protocol.json#85

Merged
jonathonbyrdziak merged 1 commit intomasterfrom
fix/bluegreen-read-node-config
Mar 22, 2026
Merged

Read blue-green config from node config, not protocol.json#85
jonathonbyrdziak merged 1 commit intomasterfrom
fix/bluegreen-read-node-config

Conversation

@jonathonbyrdziak
Copy link
Copy Markdown
Contributor

Summary

  • Blue-green deployment config (enabled, releases_dir, git_remote) is a node-level concern — the repo's protocol.json shouldn't need to know about it
  • isEnabled(), getReleasesDir(), and getGitRemote() now read from node config first, falling back to protocol.json only for local dev / non-slave usage
  • Fixes release-watcher not cloning into a new release folder despite bluegreen.enabled: true being set in node config
  • Moves release-watcher.log to /var/log/protocol/ when writable (was polluting the repo directory)

Root cause

The release-watcher calls BlueGreen::isEnabled($repo_dir) which only checked protocol.json in the repo. The node config at ~/.protocol/.node/nodes/ghostagent.json had bluegreen.enabled: true and bluegreen.releases_dir, but these were never read. The watcher fell through to the in-place checkout path, overwriting the branch checkout.

Test plan

  • Deploy to EC2, protocol restart
  • Set PROTOCOL_ACTIVE_RELEASE to a tag
  • Verify release-watcher clones into ghostagent-releases/v0.1.0/ instead of in-place checkout
  • Verify release-watcher.log goes to /var/log/protocol/

🤖 Generated with Claude Code

Blue-green deployment is a node-level concern — the repo's protocol.json
shouldn't need to know about it. On slave nodes, isEnabled(),
getReleasesDir(), and getGitRemote() now read from node config first,
falling back to protocol.json only for local dev / non-slave usage.

Also moves release-watcher.log to /var/log/protocol/ when writable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jonathonbyrdziak jonathonbyrdziak merged commit b027b4a into master Mar 22, 2026
5 of 8 checks passed
@jonathonbyrdziak jonathonbyrdziak deleted the fix/bluegreen-read-node-config branch March 22, 2026 00:12
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.

1 participant