Skip to content

Production 504 Gateway Timeout on insights.cppalliance.org/weblate.#146

Merged
wpak-ai merged 2 commits into
cppalliance:developfrom
AuraMindNest:fix/quickbook-timeout
Jun 26, 2026
Merged

Production 504 Gateway Timeout on insights.cppalliance.org/weblate.#146
wpak-ai merged 2 commits into
cppalliance:developfrom
AuraMindNest:fix/quickbook-timeout

Conversation

@AuraMindNest

@AuraMindNest AuraMindNest commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Close #145.

Summary by CodeRabbit

  • Bug Fixes

    • Improved parsing of inline links so trailing text on the same line is handled correctly.
    • Fixed environment defaults for database and cache settings so local/CI container setups work more reliably.
  • Documentation

    • Updated the example environment file to show the default database and Redis connection values more clearly.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@AuraMindNest, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 44 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

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 credits.

🚦 How do rate 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 see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 67f0cf94-f336-40bc-952d-e7c9003f5a73

📥 Commits

Reviewing files that changed from the base of the PR and between 6bc4a79 and 9816feb.

📒 Files selected for processing (2)
  • src/boost_weblate/utils/quickbook.py
  • tests/utils/test_quickbook.py
📝 Walkthrough

Walkthrough

The PR updates CD environment defaults for Postgres and Redis, and adjusts Quickbook parsing so inline URL markers can be followed by prose on the same line.

Changes

CD environment defaults

Layer / File(s) Summary
Compose defaults and example values
.env.example, docker/docker-compose.cd.yml
.env.example now lists explicit Postgres and Redis host/port defaults, and docker/docker-compose.cd.yml reads those values from .env with fallbacks.

Quickbook inline marker parsing

Layer / File(s) Summary
Inline marker whitespace skip
src/boost_weblate/utils/quickbook.py, tests/utils/test_quickbook.py
_parse_qbk skips contiguous spaces and tabs after inline bracket markup, and a new test covers inline URL markers immediately followed by prose.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • henry0816191
  • wpak-ai

Poem

🐇 I hopped through .env with a curious nose,
and found Postgres and Redis in tidy new rows.
I skipped little spaces where inline marks lay,
then prose trotted out on the same bright day.
Hop! The parser and compose both glow.

🚥 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 matches the issue and main change: fixing a production 504 timeout on the Weblate deployment.
Linked Issues check ✅ Passed The changes plausibly address issue #145 by fixing the quickbook parser timeout path and associated deployment defaults.
Out of Scope Changes check ✅ Passed The compose and env-example updates are tied to the Weblate timeout fix and do not appear unrelated to the issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@AuraMindNest AuraMindNest self-assigned this Jun 26, 2026

@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: 2

🤖 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 `@src/boost_weblate/utils/quickbook.py`:
- Around line 486-490: The paragraph scan in quickbook.py still skips inline
QuickBook markup before collecting the msgid, so `[@...]` content is lost and
only trailing prose is extracted. Update the paragraph parsing logic around the
inline-bracket handling and whitespace skip path so `[`@url` text]` remains
pass-through in the paragraph msgid instead of being discarded, while still
avoiding the scan-loop stall. Keep the fix localized to the inline markup branch
used by the paragraph extraction code.

In `@tests/utils/test_quickbook.py`:
- Around line 354-363: The test is asserting the wrong msgid for inline [@...]
markup in _parse_qbk; update
test_parse_qbk_inline_url_followed_by_prose_on_same_line to expect the full
paragraph text, including the inline markup content, rather than only the
trailing prose. Use the _parse_qbk behavior and the msgid assertions in this
test to align the expected output with the parser’s documented contract.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8641c0f8-fd8b-47c8-98eb-b97df11245d7

📥 Commits

Reviewing files that changed from the base of the PR and between 24dc26b and 6bc4a79.

📒 Files selected for processing (4)
  • .env.example
  • docker/docker-compose.cd.yml
  • src/boost_weblate/utils/quickbook.py
  • tests/utils/test_quickbook.py

Comment thread src/boost_weblate/utils/quickbook.py
Comment thread tests/utils/test_quickbook.py
@AuraMindNest AuraMindNest requested a review from wpak-ai June 26, 2026 19:51
@wpak-ai wpak-ai merged commit 637e357 into cppalliance:develop Jun 26, 2026
12 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.

Production 504 Gateway Timeout on insights.cppalliance.org/weblate.

2 participants