Skip to content

Comments

Fixed Supabase Queue Operations #14

Merged
fortune710 merged 3 commits intomainfrom
dev
Jan 4, 2026
Merged

Fixed Supabase Queue Operations #14
fortune710 merged 3 commits intomainfrom
dev

Conversation

@fortune710
Copy link
Owner

@fortune710 fortune710 commented Jan 4, 2026

Summary by CodeRabbit

  • Chores

    • Adjusted CI push trigger branches to refine the testing pipeline.
  • Refactor

    • Updated backend notification integration to use schema-scoped RPC invocation patterns for more reliable operations.
  • Tests

    • Updated test suites and mocks to reflect the new schema-based RPC interaction model and ensure end-to-end notification flows remain validated.

✏️ Tip: You can customize this high-level summary in your review settings.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel
Copy link

vercel bot commented Jan 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
keepsafe Ready Ready Preview, Comment Jan 4, 2026 5:28am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Updated CI: removed dev from push triggers. Refactored notification RPC usage to call schema-scoped RPCs (using .schema("pgmq_public").rpc(...).execute()) and adjusted tests to mock the new schema→rpc→execute chain across unit and integration tests.

Changes

Cohort / File(s) Summary
CI/CD workflow
\.github/workflows/test.yml
Removed dev from push trigger branches; main and staging remain. PR trigger and steps unchanged.
Notification service
backend/services/notification_service.py
Switched Supabase RPC invocations from direct "pgmq_public.<op>" to schema-scoped .schema("pgmq_public").rpc("<op>").execute() for send/read/delete flows; minor formatting newline on shutdown.
Unit tests
backend/tests/test_notification_service.py
Updated mocks to use mock_client.schema().rpc().execute() chain; replaced assertions to check schema("pgmq_public") and RPC names without the pgmq_public. prefix; added side_effect-based handling for multi-RPC scenarios.
Integration tests
backend/tests/test_notification_service_integration.py
Reworked test scaffolding to provide schema().rpc().execute()-compatible mocks; centralized side_effects to map read/send/delete RPCs; introduced rpc call tracking for DLQ and processing assertions; updated assertions to inspect schema-level calls.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐇 I hopped through branches, pruned the dev vine,

main and staging now bask in fine shine.
RPCs found their schemaed nest,
mocks rewritten, tests put to the quest.
A rabbit cheers: queues hum, all's aligned!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fixed Supabase Queue Operations' directly and accurately describes the main changes in the pull request, which involve correcting RPC calls in the notification service to use schema-scoped invocations for pgmq_public queue operations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb92577 and 40ec1f1.

📒 Files selected for processing (2)
  • backend/tests/test_notification_service.py
  • backend/tests/test_notification_service_integration.py

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.

@fortune710 fortune710 merged commit fc1439b into main Jan 4, 2026
2 of 4 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