Skip to content

Conversation

@luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Oct 9, 2025

Resolves #14298

Summary by CodeRabbit

  • New Features

    • Merge RSS Feeds action now marked as read-only in the UI.
  • Bug Fixes

    • RSS requests include a standard User-Agent to reduce blocking.
    • Improved HTTP error handling for RSS fetches, surfacing clearer errors for 404, 429, 4xx and 5xx responses.
  • Chores

    • Version bumps across RSS package, app, action, and sources for a maintenance release.

- Bump @pipedream/rss version to 0.5.9
- Update merge-rss-feeds action version to 1.2.9
- Add User-Agent header in rss.app.ts
- Bump new-item-from-multiple-feeds source version to 1.2.8
- Bump new-item-in-feed source version to 1.2.8
@vercel
Copy link

vercel bot commented Oct 9, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Oct 9, 2025 8:46pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 9, 2025 8:46pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Walkthrough

Added a User-Agent header, enabled full HTTP responses, and introduced explicit HTTP-status-based error handling in the RSS app fetch logic; added readOnlyHint metadata and bumped versions for an RSS action and multiple RSS sources; package version incremented.

Changes

Cohort / File(s) Summary of Changes
RSS app: fetch behavior & error handling
components/rss/app/rss.app.ts
Added fetch header "User-Agent": "@PipedreamHQ/pipedream v1.0", set returnFullResponse: true, and introduced explicit HTTP-status-based error handling (throws ConfigurationError for 404, 429, >=500, and other 4xx responses). Minor ESLint-disable comments only.
RSS action metadata
components/rss/actions/merge-rss-feeds/merge-rss-feeds.ts
Added annotation readOnlyHint: true; bumped action version "1.2.8""1.2.9".
RSS sources: version bumps & import reorder
components/rss/sources/new-item-from-multiple-feeds/new-item-from-multiple-feeds.ts, components/rss/sources/new-item-in-feed/new-item-in-feed.ts, components/rss/sources/random-item-in-multiple-feeds/random-item-in-multiple-feeds.ts
Bumped source versions ("1.2.7""1.2.8" for two sources, "0.2.7""0.2.8" for random-item); reordered imports in a couple files and added inline ESLint-disable comments—no behavioral change.
Package metadata
components/rss/package.json
Package version updated "0.5.8""0.5.9".

Sequence Diagram(s)

sequenceDiagram
  participant Source as RSS Source
  participant App as RSS App (fetchFeed)
  participant HTTP as HTTP Endpoint

  Source->>App: request feed URL
  App->>HTTP: fetch(url, headers: User-Agent, returnFullResponse:true)
  alt HTTP 200
    HTTP-->>App: full response (200, body)
    App-->>Source: parsed feed items
  else HTTP 404
    HTTP-->>App: response 404
    App-->>Source: throw ConfigurationError (404)
  else HTTP 429
    HTTP-->>App: response 429
    App-->>Source: throw ConfigurationError (429)
  else HTTP 4xx (other)
    HTTP-->>App: response 4xx
    App-->>Source: throw ConfigurationError (4xx)
  else HTTP >=500
    HTTP-->>App: response >=500
    App-->>Source: throw ConfigurationError (5xx)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I’m a rabbit with a tiny hat, I fetch with gentle art,
Headers snug and errors checked, I know each feed’s true heart.
Versions hopped a little up, a hint: readOnly today,
I nibble changelogs, twitch my whiskers, then I bound away. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning Several version bumps across different source and action files, import reorderings, and ESLint disable comments are unrelated to the linked issue’s objective of fixing the RSS feed bug and could be separated from the core fix. Please separate or remove nonfunctional changes such as version bumps in unrelated components, import ordering adjustments, and lint rule disables so the PR focuses solely on the bug fix.
Description Check ⚠️ Warning The pull request description does not follow the required template because it omits the "## WHY" section and any explanation of the motivation behind the changes. Please include the required "## WHY" section from the template with details on why these changes are necessary to resolve the RSS source bug.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly references the main functional change of adding a User-Agent header and also notes the version updates across the RSS components, matching the changes presented in the diff without extraneous detail.
Linked Issues Check ✅ Passed The changes introduce a User-Agent header and structured error handling in rss.app.ts to address the reported feed access failure in issue #14298, ensuring the RSS source now works with the specified URL while preserving existing logic.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 14298-bug-rss-source-does-not-work-with-httpsserviceslesechosfrrssles-echos-entreprisesxml

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 67f5e96 and 7e50757.

📒 Files selected for processing (1)
  • components/rss/sources/random-item-in-multiple-feeds/random-item-in-multiple-feeds.ts (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: pnpm publish
🔇 Additional comments (2)
components/rss/sources/random-item-in-multiple-feeds/random-item-in-multiple-feeds.ts (2)

2-2: LGTM!

The import reordering is a cosmetic change that has no functional impact and improves consistency across the codebase.


11-11: LGTM!

The version bump appropriately reflects the underlying bug fixes in the RSS app (User-Agent header and HTTP error handling improvements), which this component inherits through its calls to fetchAndParseFeed().


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
components/rss/app/rss.app.ts (1)

62-62: LGTM! User-Agent header resolves feed blocking issue.

The User-Agent header addition directly addresses the issue with feeds that require proper identification (like lesechos.fr). The format follows standard bot naming conventions.

Consider whether the hardcoded version "v1.0" should be dynamically sourced from package.json to stay synchronized with releases. However, a static version is acceptable if you prefer stable identification across package updates.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c888bba and a7b3339.

📒 Files selected for processing (5)
  • components/rss/actions/merge-rss-feeds/merge-rss-feeds.ts (1 hunks)
  • components/rss/app/rss.app.ts (1 hunks)
  • components/rss/package.json (1 hunks)
  • components/rss/sources/new-item-from-multiple-feeds/new-item-from-multiple-feeds.ts (2 hunks)
  • components/rss/sources/new-item-in-feed/new-item-in-feed.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/rss/actions/merge-rss-feeds/merge-rss-feeds.ts (1)
types/src/index.ts (1)
  • defineAction (402-408)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (4)
components/rss/sources/new-item-in-feed/new-item-in-feed.ts (1)

10-10: LGTM! Version bump aligns with package updates.

The version increment appropriately reflects the underlying changes to the RSS app (User-Agent header addition).

components/rss/package.json (1)

3-3: LGTM! Package version bump is appropriate.

The minor version increment correctly reflects the addition of the User-Agent header and metadata improvements.

components/rss/sources/new-item-from-multiple-feeds/new-item-from-multiple-feeds.ts (1)

2-2: LGTM! Import order and version updates are correct.

The import reordering has no semantic impact, and the version bump is consistent with the other RSS source components.

Also applies to: 11-11

components/rss/actions/merge-rss-feeds/merge-rss-feeds.ts (1)

2-2: LGTM! Metadata improvements enhance action semantics.

The addition of readOnlyHint: true correctly indicates that this action only reads RSS feeds without modifying external state. The version bump and import adjustments are appropriate.

Also applies to: 8-8, 12-12

…nings

- Added eslint-disable comments for explicit any type in itemTs, itemKey, fetchFeed, isJSONFeed, and sortItems methods in rss.app.ts.
- Updated new-item-from-multiple-feeds source to disable explicit any warning in forEach method.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
components/rss/app/rss.app.ts (2)

62-62: Consider using a dynamic version for the User-Agent header.

The User-Agent is currently hardcoded as v1.0. If this version needs to stay in sync with the package version, consider deriving it from package.json to avoid maintenance overhead.

Example approach:

import { version } from "../package.json";

// In the header:
"User-Agent": `@PipedreamHQ/pipedream v${version}`,

Alternatively, if v1.0 is intentional and represents an API version rather than the package version, consider adding a comment to clarify this.


33-33: Consider improving type safety in a follow-up.

Multiple any type suppressions were added throughout this file. While these may be acceptable given the dynamic nature of RSS/JSON feeds and the untyped feedparser library, some improvements could be made:

  • Line 56: fetchFeed could return Promise<{ data: ReadStream; contentType: string }> instead of Promise<any>
  • Line 123: isJSONFeed parameter could be typed as { contentType?: string } instead of any
  • Lines 33, 43: Consider defining a union type for RSS/JSON feed items instead of Item | any

Since this PR focuses on bug fixes, these type improvements can be deferred.

Also applies to: 43-43, 56-56, 90-90, 123-123, 160-160

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7b3339 and 67f5e96.

📒 Files selected for processing (2)
  • components/rss/app/rss.app.ts (6 hunks)
  • components/rss/sources/new-item-from-multiple-feeds/new-item-from-multiple-feeds.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/rss/sources/new-item-from-multiple-feeds/new-item-from-multiple-feeds.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (1)
components/rss/app/rss.app.ts (1)

69-75: LGTM: Comprehensive HTTP status error handling.

The explicit error handling for different HTTP status codes is well-implemented:

  • 404: Clear message about non-existent URL
  • 429: Helpful guidance about rate limiting
  • 5xx: Appropriate server error message
  • Other 4xx: Catch-all for client errors

The error messages are user-friendly and actionable. Combined with the User-Agent header addition, this should resolve the reported issue.

Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

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

LGTM!

@vunguyenhung vunguyenhung merged commit 18a7fe8 into master Oct 10, 2025
10 checks passed
@vunguyenhung vunguyenhung deleted the 14298-bug-rss-source-does-not-work-with-httpsserviceslesechosfrrssles-echos-entreprisesxml branch October 10, 2025 02:44
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.

[BUG] RSS source does not work with https://services.lesechos.fr/rss/les-echos-entreprises.xml

3 participants