Skip to content

Create Announcement “2026-05-first-news”#1

Merged
rainxchzed merged 1 commit into
mainfrom
cms/announcements/2026-05-first-news
May 3, 2026
Merged

Create Announcement “2026-05-first-news”#1
rainxchzed merged 1 commit into
mainfrom
cms/announcements/2026-05-first-news

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

@rainxchzed rainxchzed commented May 3, 2026

Automatically generated by Decap CMS

Summary by CodeRabbit

  • New Features
    • Added a new informational news announcement that users can dismiss as needed.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 3, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a1616d9c-f5f5-4db5-a03e-6324ce919b29

📥 Commits

Reviewing files that changed from the base of the PR and between b053cf1 and 931b9c8.

📒 Files selected for processing (1)
  • src/main/resources/announcements/2026-05-first-news.json

📝 Walkthrough

Walkthrough

A new JSON announcement file is added to the announcements resource directory. The file defines an announcement record with metadata including identifier, title, publication timestamp, severity level, category, body text, and acknowledgment/dismissal flags.

Changes

Announcement Data Addition

Layer / File(s) Summary
Announcement Record
src/main/resources/announcements/2026-05-first-news.json
New announcement JSON with id "2026-05-first-news", title "First test news", publishedAt "2026-05-03T18:01:00Z", severity "INFO", category "NEWS", dismissible true, requiresAcknowledgment false, and empty iconHint and expiresAt fields.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A news announcement hops into place,
Simple and sweet with an informative face,
Dismissible, kind, with no fuss to obey,
May brings fresh tidings to brighten your day! 📰✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cms/announcements/2026-05-first-news

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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@rainxchzed rainxchzed merged commit b8ecc9a into main May 3, 2026
1 of 2 checks passed
@rainxchzed rainxchzed deleted the cms/announcements/2026-05-first-news branch May 3, 2026 18:02
rainxchzed added a commit that referenced this pull request May 19, 2026
…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.
rainxchzed added a commit that referenced this pull request May 19, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant