Skip to content

Fail fast when production SSH is unreachable - #117

Merged
kl3inIT merged 2 commits into
mainfrom
fix/deploy-ssh-timeouts
Jul 28, 2026
Merged

Fail fast when production SSH is unreachable#117
kl3inIT merged 2 commits into
mainfrom
fix/deploy-ssh-timeouts

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Observed evidence

Automatic product deployment run 30399267433 timed out before SSH authentication. The deploy step was skipped, so no runtime mutation occurred. Cleanup then repeated the same two-minute timeout.

Change

  • enforce BatchMode, a 10-second connect timeout, and one connection attempt for product and docs SSH calls
  • run registry logout only if the corresponding login succeeded
  • record GitHub-runner SSH reachability as an explicit operator prerequisite alongside DNS/NPM access

Verification

  • actionlint 1.7.12
  • documentation operating-model check (284 Markdown files, 8 mirrored pairs)
  • git diff --check

This PR does not dispatch either deployment workflow.

Summary by CodeRabbit

  • Bug Fixes
    • Improved documentation and production deployment reliability with clearer SSH connection handling and timeout behavior.
    • Ensured temporary registry credentials are removed only after successful authentication.
    • Enhanced deployment verification by explicitly checking out the intended commit before running documentation deployment.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kl3inIT, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 44e48536-d6e5-4894-863e-c677a24244d6

📥 Commits

Reviewing files that changed from the base of the PR and between 4b6e207 and bc9bd5b.

⛔ Files ignored due to path filters (1)
  • docs/runbooks/public-docs-deployment.md is excluded by !docs/**
📒 Files selected for processing (2)
  • .github/workflows/deploy-docs.yml
  • .github/workflows/deploy-production.yml
📝 Walkthrough

Walkthrough

Both deployment workflows now use explicit SSH connection settings, identify registry-login steps, and restrict temporary credential cleanup to successful registry authentication. The docs workflow also performs detached checkout and public smoke-tested deployment for the specified commit.

Changes

Deployment workflow hardening

Layer / File(s) Summary
Explicit SSH deployment commands
.github/workflows/deploy-docs.yml, .github/workflows/deploy-production.yml
SSH calls now set batch mode, a 10-second connection timeout, and one connection attempt.
Registry outcome cleanup gating
.github/workflows/deploy-docs.yml, .github/workflows/deploy-production.yml
Registry-login steps expose IDs for outcome checks; cleanup requires successful authentication, and docs deployment checks out the requested commit before running the deployment script.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: making deployment SSH fail fast when the host is unreachable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/deploy-ssh-timeouts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/deploy-docs.yml:
- Around line 131-132: Update the cleanup steps in
.github/workflows/deploy-docs.yml lines 131-132 and
.github/workflows/deploy-production.yml lines 161-162 so GHCR credentials cannot
remain on the production server when a later SSH operation fails. Isolate Docker
credentials to the run-scoped deployment store, or make the registry login,
deployment, and logout steps a single transaction with cleanup guaranteed
regardless of intermediate SSH outcomes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: eb359570-a5fe-4eee-887e-92423298adf3

📥 Commits

Reviewing files that changed from the base of the PR and between 24ad760 and 4b6e207.

⛔ Files ignored due to path filters (3)
  • docs/increments/active/2026-07-28-public-docs-portal/plan.md is excluded by !docs/**
  • docs/increments/active/2026-07-28-public-docs-portal/verification.md is excluded by !docs/**
  • docs/runbooks/public-docs-deployment.md is excluded by !docs/**
📒 Files selected for processing (2)
  • .github/workflows/deploy-docs.yml
  • .github/workflows/deploy-production.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Deployment contracts
  • GitHub Check: Public docs · Node 24
🧰 Additional context used
📓 Path-based instructions (1)
.github/**/*.{yml,yaml}

⚙️ CodeRabbit configuration file

.github/**/*.{yml,yaml}: Require least-privilege permissions, explicit release tags for actions,
bounded job timeouts, concurrency cancellation, frozen lockfiles, and no
secrets in pull-request workflows. GitHub Actions are intentionally not
pinned to commit SHAs; Dependabot owns their scheduled version updates.

Files:

  • .github/workflows/deploy-production.yml
  • .github/workflows/deploy-docs.yml
🧠 Learnings (1)
📚 Learning: 2026-07-24T22:52:57.466Z
Learnt from: kl3inIT
Repo: kl3inIT/OrgMemory PR: 40
File: .github/workflows/ci.yml:126-126
Timestamp: 2026-07-24T22:52:57.466Z
Learning: In this repository’s GitHub Actions workflows, the `uses:` field may intentionally reference GitHub Actions by explicit release tags (not immutable commit SHAs) per the project’s OrgMemory policy. Do not flag tag-based `uses:` references as “unpinned” if they are release-tag-based (e.g., `owner/repovX.Y.Z`) and follow the repo’s Dependabot-owned scheduled updates approach.

Applied to files:

  • .github/workflows/deploy-production.yml
  • .github/workflows/deploy-docs.yml
🔇 Additional comments (2)
.github/workflows/deploy-docs.yml (1)

92-92: LGTM!

Also applies to: 102-107, 119-129, 139-144

.github/workflows/deploy-production.yml (1)

119-119: LGTM!

Also applies to: 129-134, 147-152, 169-174

Comment thread .github/workflows/deploy-docs.yml Outdated
@kl3inIT
kl3inIT merged commit c5d4797 into main Jul 28, 2026
14 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