Skip to content

chore(infra): node2 and node3 Fly configs as deployed for 0.8.1 - #614

Merged
kevincodex1 merged 1 commit into
mainfrom
chore/fly-node-configs-081
Nov 19, 2026
Merged

kevincodex1 merged 1 commit into
mainfrom
chore/fly-node-configs-081

Conversation

@kevincodex1

@kevincodex1 kevincodex1 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Brings infra/fly/gitlawb-node-2.fly.toml and gitlawb-node-3.fly.toml in line with what node2 and node3 actually run since the 0.8.1 upgrade on 2026-11-18.

Motivation & context

The repo copies had drifted from the live apps. GITLAWB_P2P_KEY was added to these files in #324 but never deployed, and 0.8.1 needs two settings that weren't in either file:

  • The libp2p key path. 0.8.1 keeps the libp2p identity in a file. In the container the default path is not on the volume, so without TWIGPINE_P2P_KEY each deploy would mint a new PeerId.
  • Connection pools. 0.8.1's default pools (48 main + 40 lock) could take 88 of the 100 connections these nodes' Postgres allows. The configs now cap them.

Kind of change

  • Bug fix
  • Feature
  • Security fix
  • Docs
  • Tests / CI
  • Refactor (no behavior change)
  • Breaking or protocol change (issue required first)

None of these fit: this is infra config only, with no code changes.

What changed

Both files, as saved from the live apps with fly config save after the deploy:

  • TWIGPINE_P2P_KEY = '/data/keys/p2p.key', on the volume (new PeerId once at the upgrade, stable after). It replaces the never-deployed GITLAWB_P2P_KEY line.
  • TWIGPINE_DB_MAX_CONNECTIONS = '30', TWIGPINE_DB_LOCK_POOL_MAX_CONNECTIONS = '24', TWIGPINE_MAX_CONCURRENT_GIT_PUSHES = '16', about 54 connections at most. The lock pool stays at least 8 above the push limit.
  • Fly's regenerated header comment.

The other GITLAWB_* settings are unchanged; 0.8.x still reads the old names. node1's config stays out of the repo (.gitignore).

How a reviewer can verify

fly config save -a gitlawb-node-2 -y   # in an empty folder; same for gitlawb-node-3
diff <(grep -vE '^\s*#|^\s*$' fly.toml | sort) <(grep -vE '^\s*#|^\s*$' infra/fly/gitlawb-node-2.fly.toml | sort)
curl -s https://node2.twigpine.com/api/v1/stats   # version 0.8.1

Checked on 2026-11-19: both files match the live configs apart from line order and comments.

Before you request review

  • Scope is one logical change; no unrelated churn
  • cargo test --workspace passes locally
  • New behavior is covered by tests (required for fixes)
  • cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings are clean
  • Commit titles use Conventional Commits (feat(...), fix(...), docs(...))
  • Docs / .env.example updated if behavior or config changed (or N/A)
  • Checked existing PRs so this isn't a duplicate

The unchecked boxes are N/A: no Rust changes.

Protocol & signing impact

  • Touches DID / did:key, Ed25519 / RFC 9421 signatures, UCAN, ref certs, or P2P wire formats
  • Discussed in an issue before implementation
  • Backward-compatible with existing nodes and previously signed history

Notes for reviewers

  • Both nodes got a new PeerId once at the upgrade. Peers find each other by URL, so nothing broke.
  • These nodes still advertise *.gitlawb.com in GITLAWB_PUBLIC_URL and GITLAWB_BOOTSTRAP_PEERS. Moving them to twigpine.com is a separate change.

Summary by CodeRabbit

  • Chores
    • Service configuration now sets database connection-pool limits and a maximum of 16 concurrent Git pushes across the updated deployments.
    • These explicit limits help keep resource usage more predictable during database activity and concurrent pushes.

The live configs had never received TWIGPINE_P2P_KEY (added to these files
in #324 but not deployed). 0.8.1 keeps the libp2p key in a file, so both
nodes now set it to /data/keys/p2p.key on their volume, and cap the new
connection pools for their 100-connection Postgres: 30 main, 24 lock pool,
16 concurrent pushes. Deployed with the released ghcr.io/twigpine/node:0.8.1
image on 2026-11-18.
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The two Fly node configurations update their generated-file headers and environment settings. They set the P2P key path, database connection limits, and maximum concurrent Git pushes.

Changes: Fly node configuration

Layer / File(s) Summary
Node environment settings
infra/fly/gitlawb-node-2.fly.toml, infra/fly/gitlawb-node-3.fly.toml
Both configurations use TWIGPINE_P2P_KEY instead of GITLAWB_P2P_KEY. They set database connection limits to 30 and 24 and cap concurrent Git pushes at 16. The generated-file dates and Fly configuration documentation URLs are also updated.

Estimated code review effort: 2 (Simple) | ~7 minutes

Suggested reviewers: beardthelion

Merge Risk: Minimal · up to bc71d

This updates the node2 and node3 Fly configs to match their deployed 0.8.1 settings: the P2P key path on the volume, and caps on database connections and concurrent Git pushes. The per-node connection budget of 54 stays within Postgres's limit of 100, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: node2 and node3 Fly configs are updated to match the settings deployed for the 0.8.1 upgrade. The changeset only touches these two Fly TOML files, which add the P2P key pat…
Description check Passed The description follows the repository template closely. It has a Summary, Motivation & context with the problem and the 0.8.1 requirements, the Kind of change section with a clear note that no catego…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: node2 and node3 Fly configs are updated to match the settings deployed for the 0.8.1 upgrade. The changeset only touches these two Fly TOML files, which add the P2P key path and connection limits, so the title matches the main change. It uses the conventional 'chore(infra)' scope and is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description follows the repository template closely. It has a Summary, Motivation & context with the problem and the 0.8.1 requirements, the Kind of change section with a clear note that no category applies, a What changed section listing the env var changes, a How a reviewer can verify section with commands, the review checklist with N/A reasons, the Protocol & signing impact section, and Notes for reviewers. The Motivation section does not contain the template's 'Closes #' issue link, and the protocol checklist is filled in. These gaps are minor, so the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: f81c73ba-23be-4904-9b27-4dc5f974d598
Commits

Reviewing files that changed from the base of the PR and between fe537be and bc71d1a.

Files selected for processing: 2

  • infra/fly/gitlawb-node-2.fly.toml
  • infra/fly/gitlawb-node-3.fly.toml

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

@kevincodex1

Copy link
Copy Markdown
Member Author

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor
Action performed

Comments resolved. Approval is disabled; enable reviews.auto_approvals.enabled to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

@kevincodex1
kevincodex1 merged commit 59c9cbd into main Nov 19, 2026
19 checks passed
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