Skip to content

Conversation

@Azorlogh
Copy link
Contributor

@Azorlogh Azorlogh commented Jan 9, 2026

Sets up a readiness probe for the ledger: without it, rolling upgrades switch to the new version before it's actually ready.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 9, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a composable readiness probe helper and applies it to multiple deployments' API containers to configure readiness checks alongside existing liveness probes and ports.

Changes

Cohort / File(s) Summary
Readiness Probe Helpers
internal/resources/applications/probes.go
Added exported DefaultReadiness(port string, opts ...ProbeOpts) *corev1.Probe and type ProbeOpts func(*corev1.ProbeHandler) *corev1.ProbeHandler. Introduced internal readiness(handler corev1.ProbeHandler) *corev1.Probe with predefined timing config.
Deployments — readiness added
internal/resources/ledgers/deployments.go, internal/resources/ledgers/..., internal/resources/auths/deployment.go, internal/resources/orchestrations/deployments.go, internal/resources/payments/deployments.go, internal/resources/reconciliations/deployments.go, internal/resources/stargates/deployment.go, internal/resources/wallets/deployment.go, internal/resources/webhooks/deployment.go
Inserted ReadinessProbe: applications.DefaultReadiness("http" (sometimes with appOpts) into API/container specs across multiple services. Existing Ports and LivenessProbe entries remain; minor formatting adjustments present.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nibble on code, so spry and keen,
I stitch a probe where none had been.
A hop, a sniff, the service greets,
Ready bells and steady beats.
🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description directly relates to the changeset by explaining why the readiness probe is needed for rolling upgrades.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a missing readiness probe, which aligns with the primary modification across the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ledger-readiness-probe

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between dd411c6 and bdd2aae.

📒 Files selected for processing (7)
  • internal/resources/auths/deployment.go
  • internal/resources/orchestrations/deployments.go
  • internal/resources/payments/deployments.go
  • internal/resources/reconciliations/deployments.go
  • internal/resources/stargates/deployment.go
  • internal/resources/wallets/deployment.go
  • internal/resources/webhooks/deployment.go

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 and usage tips.

@Azorlogh Azorlogh marked this pull request as ready for review January 9, 2026 17:49
@Azorlogh Azorlogh requested a review from a team as a code owner January 9, 2026 17:49
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
internal/resources/applications/probes.go (1)

27-37: Correct implementation of readiness probe.

The probe configuration is correct:

  • TerminationGracePeriodSeconds: nil is appropriate for readiness probes (only liveness probes should trigger termination)
  • The timing parameters mirror the liveness probe configuration

Consider whether readiness and liveness probes should have different timing characteristics:

  • Readiness probes typically tolerate shorter delays but may need different failure thresholds
  • InitialDelaySeconds: 1 is aggressive and assumes very fast startup
  • You may want to tune these based on actual service startup times
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 16c53b0 and dd411c6.

📒 Files selected for processing (2)
  • internal/resources/applications/probes.go
  • internal/resources/ledgers/deployments.go
🧰 Additional context used
🧬 Code graph analysis (1)
internal/resources/ledgers/deployments.go (1)
internal/resources/applications/probes.go (1)
  • DefaultReadiness (24-26)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Tests
  • GitHub Check: GoReleaser
🔇 Additional comments (2)
internal/resources/applications/probes.go (1)

24-26: LGTM! Clean implementation.

The function correctly mirrors the pattern established by DefaultLiveness, providing a consistent API for probe configuration.

internal/resources/ledgers/deployments.go (1)

362-362: Excellent addition! This addresses the missing readiness probe.

The readiness probe correctly uses the same port as the liveness probe and will ensure the API container doesn't receive traffic until it's ready to handle requests. This improves the reliability of the ledger deployment.

flemzord
flemzord previously approved these changes Jan 12, 2026
@flemzord flemzord changed the title fix: add missing readiness probe for ledger fix: add missing readiness probe Jan 12, 2026
Add ReadinessProbe to Reconciliations, Orchestrations, Wallets, Auths,
Webhooks, Stargates, and Payments API deployments for better traffic
management during pod startup.
@flemzord flemzord merged commit 2170472 into main Jan 12, 2026
1 of 3 checks passed
@flemzord flemzord deleted the fix/ledger-readiness-probe branch January 12, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants