Skip to content

Made RSS renderer synchronous#27841

Merged
EvanHahn merged 1 commit into
mainfrom
make-rss-renderer-synchronous
May 20, 2026
Merged

Made RSS renderer synchronous#27841
EvanHahn merged 1 commit into
mainfrom
make-rss-renderer-synchronous

Conversation

@EvanHahn
Copy link
Copy Markdown
Contributor

@EvanHahn EvanHahn commented May 12, 2026

no ref

I recommend reviewing this with whitespace changes disabled.

It was already synchronous, but we made it async for no reason I could see. This change should have no user impact.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 18ebc98e-4886-4968-b164-cd8ee496d4a6

📥 Commits

Reviewing files that changed from the base of the PR and between d22d269 and 388940a.

📒 Files selected for processing (4)
  • ghost/core/core/frontend/services/rss/cache.js
  • ghost/core/core/frontend/services/rss/generate-feed.js
  • ghost/core/core/frontend/services/rss/renderer.js
  • ghost/core/test/unit/frontend/services/rss/renderer.test.js
✅ Files skipped from review due to trivial changes (1)
  • ghost/core/core/frontend/services/rss/cache.js
🚧 Files skipped from review as they are similar to previous changes (2)
  • ghost/core/core/frontend/services/rss/renderer.js
  • ghost/core/core/frontend/services/rss/generate-feed.js

Walkthrough

This PR converts the RSS feed generation pipeline from asynchronous Promise-based execution to synchronous operation. It updates JSDoc to document string return types for cache and generateFeed, replaces the Promise reduce chain in feed generation with a synchronous for...of that returns feed.xml(), updates the renderer to call rssCache.getXML synchronously and send the result immediately, and adjusts unit tests to expect synchronous behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly describes the main change: converting the RSS renderer from asynchronous to synchronous operation.
Description check ✅ Passed The description is related to the changeset, explaining the rationale for reverting the RSS renderer to synchronous behavior and noting no user impact is expected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch make-rss-renderer-synchronous

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.

no ref

*I recommend reviewing this with whitespace changes disabled.*

It was already synchronous, but we made it async for no reason I could
see. This change should have no user impact.
@EvanHahn EvanHahn force-pushed the make-rss-renderer-synchronous branch from d22d269 to 388940a Compare May 12, 2026 15:32
@EvanHahn EvanHahn requested a review from cmraible May 13, 2026 14:20
Comment on lines -89 to +95
return data.posts.reduce((feedPromise, post) => {
return feedPromise.then(() => {
const item = generateItem(post);
return feed.item(item);
});
}, Promise.resolve()).then(() => {
return feed.xml();
});
for (const post of data.posts) {
const item = generateItem(post);
feed.item(item);
}

return feed.xml();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: love this, so much nicer to read this way

@EvanHahn EvanHahn merged commit 77f9d19 into main May 20, 2026
43 checks passed
@EvanHahn EvanHahn deleted the make-rss-renderer-synchronous branch May 20, 2026 15:12
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.

2 participants