Skip to content

fix(ci): surface gcloud output on read-replica Data API limit errors - #4006

Merged
riderx merged 1 commit into
mainfrom
charly/read-replica-error-detail
Oct 30, 2026
Merged

riderx merged 1 commit into
mainfrom
charly/read-replica-error-detail

Conversation

@TorichanCapgo

@TorichanCapgo TorichanCapgo commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Release capgo-22.28.1 (run 41068982301) failed in Reconcile production read-replica schema with "Cloud SQL Data API rejected the response at its 10 MB response limit". That message comes from a broad regex over gcloud stderr and drops the real output, so the cause is hidden. That job gates supabase_deploy, deploy_api, deploy_files, deploy_plugin_regions and deploy_webapp, so nothing deployed.

This keeps the classified message and appends the trimmed, 4 KB capped gcloud output so the next run shows the real root cause. No workflow changes.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Bug Fixes
    • Errors triggered by request or response limits now include normalized cloud command output, providing additional diagnostic context. Limit detection and fallback error behavior remain unchanged, so this update affects the information shown in these errors without changing how limit conditions are handled.

@TorichanCapgo

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 33176987-df24-491a-b6ea-79ca077b7e45
Commits

Reviewing files that changed from the base of the PR and between f98ac02 and 7551233.

Files selected for processing: 1
  • scripts/sync-read-replica-schema.ts
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Walkthrough

The request-limit and response-limit errors in dataApiCommandError now include normalized gcloud output. Limit detection and fallback behavior remain unchanged.

Changes: Data API error diagnostics

Layer / File(s) Summary
Include output in limit errors
scripts/sync-read-replica-schema.ts
The request-limit and response-limit errors now include normalized gcloud output. Limit detection and fallback behavior remain unchanged.

Priority: Low

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

Change: Bug fix

Possibly related PRs

  • Cap-go/capgo.app#3999: Changes dataApiCommandError in the same script, including request-limit and response-limit classifications.
  • Cap-go/capgo.app#4003: Adds subscription and publication checks that use the same Cloud SQL Data API execution path.

Suggested reviewers: riderx

Merge Risk: Minimal · up to 75512

The change improves failure diagnostics without a reported change to limit detection or fallback behavior. No merge-blocking issue is identified.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the failure and intended fix, but it does not follow the required template. It lacks the Summary heading, Test plan, Screenshots section, and Checklist responses. Add the required template sections. Include a Test plan with validation steps, complete the Checklist, and state whether screenshots are applicable.
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: exposing gcloud output for read-replica Data API limit errors.
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: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.

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.

@codspeed

codspeed Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing charly/read-replica-error-detail (7551233) with main (f98ac02)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@sonarqubecloud

Copy link
Copy Markdown

@riderx
riderx merged commit cce1563 into main Oct 30, 2026
79 of 82 checks passed
@riderx
riderx deleted the charly/read-replica-error-detail branch October 30, 2026 14:31
@cursor

cursor Bot commented Oct 30, 2026

Copy link
Copy Markdown

Superseded by #4007, which keeps the gcloud diagnostics from this PR and adds tighter Data API limit matching plus deploy workflow unblock so read_replica_schema no longer gates production deploys.

Note: this PR is already merged on main; #4007 rebases on that and carries the remaining workflow fix.

This branch was previously deployed

1 inactive deployment
deepsec-pr — 75512333 Deployed Oct 30, 2026 by TorichanCapgo via Scan PR changes #10438
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.

2 participants