Skip to content

fix(subscriptions): tell operators why subscriptions never start on an unmigrated schema or a lock role without grants - #49

Merged
yordis merged 2 commits into
yordis/test-honor-pgportfrom
yordis/fix-unmigrated-schema-signal
Oct 26, 2026
Merged

yordis merged 2 commits into
yordis/test-honor-pgportfrom
yordis/fix-unmigrated-schema-signal

Conversation

@yordis

@yordis yordis commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

… stop subscriptions without a word

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…n unmigrated schema or a lock role without grants

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@cursor

cursor Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Observability and documentation only; subscription retry behavior is unchanged aside from clearer one-time error logs.

Overview
When subscription lock claims fail persistently, AdvisoryLocks now emits a single operator-facing error instead of leaving subscriptions retrying silently.

PostgreSQL undefined_column is mapped to guidance to run mix event_store.migrate for the v1.5.0 lock_generation schema; insufficient_privilege points at granting SELECT and UPDATE on subscriptions to the session-mode DB role. The event store name is passed from the supervisor into AdvisoryLocks so logs name the right instance, and a MapSet deduplicates so each problem type is logged once.

Upgrades.md documents the 1.5.0 migration, unmigrated-schema behavior, and the session-role grants. Tests assert one error log per failure mode.

Reviewed by Cursor Bugbot for commit 0a3962b. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eaf2a3f6-0b30-4cbb-84b5-ede13a6629ce
Commits

Reviewing files that changed from the base of the PR and between 0739ab5 and 0a3962b.

Files selected for processing: 5
  • guides/Upgrades.md
  • lib/event_store/advisory_locks.ex
  • lib/event_store/supervisor.ex
  • test/advisory_locks_test.exs
  • test/subscriptions/subscription_unmigrated_schema_test.exs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@yordis
yordis added this pull request to stack #73 October 26, 2026 16:00
@yordis yordis changed the title yordis/fix unmigrated schema signal fix(subscriptions): tell operators why subscriptions never start on an unmigrated schema or a lock role without grants Oct 26, 2026
@yordis
yordis merged commit 92d9848 into main Oct 26, 2026
6 of 8 checks passed
@yordis
yordis deleted the yordis/fix-unmigrated-schema-signal branch October 26, 2026 16:16
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