Add CODEOWNERS and validateAnnouncements step to CI#2
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 3 minutes and 44 seconds.Comment |
…PK swap Architect findings #1 + #2 from the architecture review on this branch. #1 (CRITICAL) - pg_try_advisory_lock is session-scoped, and Exposed/Hikari returned the connection to the pool the moment the 'acquire' transaction committed. The lock was released between acquireAdvisoryLock() and the actual fetch + upsert, so 'skipped: another instance' never fired and the dedup was illusory. The new ForgejoFdroidSeedWorker amplified the impact by holding the (broken) lock across N upstream HTTP fetches. Fix: switch to pg_try_advisory_xact_lock, which is automatically released at COMMIT. Restructure both workers (the pre-existing GitHub-side FdroidSeedWorker had the same bug — fixed in the same commit) so they fetch every index FIRST with no DB connection held, then open ONE newSuspendedTransaction that pairs the xact lock with the upsert via the new upsertBatchInCurrentTransaction helper on SigningFingerprintRepository. Lock and write share the same transaction; race window gone. #2 (HIGH) - V17 migration ran ADD COLUMN, DROP PK, ADD PK as three independent statements. Between DROP and ADD, concurrent writers could insert rows that would later violate the new PK and abort the migration mid-flight, leaving the schema half-broken. Fix: LOCK TABLE signing_fingerprint IN ACCESS EXCLUSIVE MODE at the top of V17 so no writer can interleave between drop and re-add. The outer transaction DatabaseFactory.runMigrations() already opens releases the lock at COMMIT. Deferred (architect review #4 fan-out concurrency cap, #5 HttpClient AutoCloseable lifecycle) — both only fire under real forge usage, which can't happen until client PR #631 ships and 1.9.0 propagates. Addressed in a follow-up PR before any user can trigger them.
…PK swap Architect findings #1 + #2 from the architecture review on this branch. #1 (CRITICAL) - pg_try_advisory_lock is session-scoped, and Exposed/Hikari returned the connection to the pool the moment the 'acquire' transaction committed. The lock was released between acquireAdvisoryLock() and the actual fetch + upsert, so 'skipped: another instance' never fired and the dedup was illusory. The new ForgejoFdroidSeedWorker amplified the impact by holding the (broken) lock across N upstream HTTP fetches. Fix: switch to pg_try_advisory_xact_lock, which is automatically released at COMMIT. Restructure both workers (the pre-existing GitHub-side FdroidSeedWorker had the same bug — fixed in the same commit) so they fetch every index FIRST with no DB connection held, then open ONE newSuspendedTransaction that pairs the xact lock with the upsert via the new upsertBatchInCurrentTransaction helper on SigningFingerprintRepository. Lock and write share the same transaction; race window gone. #2 (HIGH) - V17 migration ran ADD COLUMN, DROP PK, ADD PK as three independent statements. Between DROP and ADD, concurrent writers could insert rows that would later violate the new PK and abort the migration mid-flight, leaving the schema half-broken. Fix: LOCK TABLE signing_fingerprint IN ACCESS EXCLUSIVE MODE at the top of V17 so no writer can interleave between drop and re-add. The outer transaction DatabaseFactory.runMigrations() already opens releases the lock at COMMIT. Deferred (architect review #4 fan-out concurrency cap, #5 HttpClient AutoCloseable lifecycle) — both only fire under real forge usage, which can't happen until client PR #631 ships and 1.9.0 propagates. Addressed in a follow-up PR before any user can trigger them.
Summary
.github/CODEOWNERSrequires my review on changes to.github/andsrc/main/resources/announcements/(only effective when the branch ruleset has "Require review from Code Owners" enabled)../gradlew validateAnnouncementsbefore tests, so a malformed announcement JSON fails the PR check before merge.concurrencyand explicitpermissions: contents: readto CI for hygiene.Test plan
build(NOTDeploy to production).