Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Dec 16, 2025

WHY

Resolves #19500

Summary by CodeRabbit

  • New Features

    • Added Cloud Convert "Create Job" action to create/manage jobs with customizable tasks, tags, and webhook support.
    • Improved JSON parsing for safer, depth-limited handling of complex task configurations (handles nested objects/arrays and circular refs).
  • Chores

    • Cloud Convert component version bumped to v0.2.0.

✏️ Tip: You can customize this high-level summary in your review settings.

@jcortes jcortes self-assigned this Dec 16, 2025
@vercel
Copy link

vercel bot commented Dec 16, 2025

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 16, 2025 7:42pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 16, 2025

Walkthrough

Adds a new CloudConvert "Create Job" action that parses provided task definitions and calls the CloudConvert client to create a job, plus a utility implementing a depth-limited, circular-reference-safe JSON-like parser. The package version and platform dependency are bumped.

Changes

Cohort / File(s) Summary
CloudConvert Create Job Action
components/cloud_convert/actions/create-job/create-job.mjs
New action module exporting metadata, props (app, tasks, tag, webhookUrl), and a run that parses tasks via the new util and calls app.createJob with optional tag and webhook_url, returning the created job ID and response.
CloudConvert Utilities
components/cloud_convert/common/utils.mjs
New utility exporting parseJson(input, maxDepth = 100): recursively parses JSON-like strings into objects/arrays with depth limiting and circular-reference detection using a WeakSet; handles primitives, arrays, and plain objects safely.
Package metadata
components/cloud_convert/package.json
Bumps version from 0.1.1 to 0.2.0 and updates dependencies["@pipedream/platform"] from ^1.6.8 to ^3.1.1 (dependency block relocated relative to publishConfig).

Sequence Diagram(s)

mermaid
sequenceDiagram
actor User
participant Action as CreateJob Action
participant Utils as parseJson
participant App as CloudConvert SDK (app)
participant API as CloudConvert API
User->>Action: invoke action with props (tasks, tag, webhookUrl)
Action->>Utils: parseJson(tasks)
Utils-->>Action: parsed tasks
Action->>App: app.createJob({tasks: parsedTasks, tag, webhook_url})
App->>API: send create job request
API-->>App: job created (job id, details)
App-->>Action: response
Action-->>User: return summary (id) and response

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review parseJson: verify depth limiting, WeakSet usage, and safe handling of strings that resemble JSON vs plain strings.
  • Validate tasks prop schema and mapping to CloudConvert API fields (task structure, tag vs webhook_url naming).
  • Confirm compatibility with updated @pipedream/platform v3.x APIs (action metadata/props/run shape) and ensure package.json change aligns with code usage.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title '[ACTION] CloudConvert - Create Job' clearly and concisely describes the main change: implementing a CloudConvert action to create a job.
Description check ✅ Passed The PR description adequately references the linked issue #19500, which provides full context about the objectives and requirements for this action.
Linked Issues check ✅ Passed The code changes implement the CloudConvert Create Job action as required by issue #19500, including API integration, job creation functionality with task parsing, and proper module exports.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the CloudConvert Create Job action: new action module, utility parser, and package metadata updates are all within scope of the linked objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 cloudconvert-create-job

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4225a14 and 591ad99.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • components/cloud_convert/actions/create-job/create-job.mjs (1 hunks)
  • components/cloud_convert/common/utils.mjs (1 hunks)
  • components/cloud_convert/package.json (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/cloud_convert/common/utils.mjs
  • components/cloud_convert/actions/create-job/create-job.mjs
📚 Learning: 2025-09-12T07:49:36.125Z
Learnt from: matyascimbulka
Repo: PipedreamHQ/pipedream PR: 18308
File: components/apify/actions/run-task-synchronously/run-task-synchronously.mjs:70-0
Timestamp: 2025-09-12T07:49:36.125Z
Learning: The Apify Task object always contains the `options` field according to the official API documentation, making nested destructuring like `options: { build }` safe to use without additional checks.

Applied to files:

  • components/cloud_convert/actions/create-job/create-job.mjs
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.

Applied to files:

  • components/cloud_convert/actions/create-job/create-job.mjs
⏰ 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). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (4)
components/cloud_convert/package.json (2)

3-3: LGTM: Appropriate version bump for new feature.

The minor version increment (0.1.1 → 0.2.0) correctly reflects the addition of the new "Create Job" action.


16-16: Use @pipedream/platform 3.1.0 instead of 3.1.1.

Version 3.1.1 does not exist on npm. The latest available version is 3.1.0. Update the dependency to "@pipedream/platform": "^3.1.0" to resolve properly.

Likely an incorrect or invalid review comment.

components/cloud_convert/actions/create-job/create-job.mjs (2)

1-2: LGTM: Clean imports.

The imports correctly reference the CloudConvert app instance and the new utils module.


4-14: LGTM: Appropriate action metadata.

The metadata and annotations correctly describe a create action that makes external API calls.


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.

@jcortes jcortes force-pushed the cloudconvert-create-job branch from 4225a14 to 591ad99 Compare December 16, 2025 19:42
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: 6

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d6edb6e and 4225a14.

📒 Files selected for processing (2)
  • components/cloud_convert/actions/create-job/create-job.mjs (1 hunks)
  • components/cloud_convert/common/utils.mjs (1 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: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (4)
components/cloud_convert/common/utils.mjs (1)

7-20: LGTM: String parsing logic is sound.

The JSON detection heuristic (checking for {}/[] delimiters) with try-catch error handling correctly identifies and parses JSON strings while safely returning unparseable strings unchanged. The approach of only attempting to parse strings that look like JSON objects or arrays avoids unnecessary parsing attempts on plain strings.

components/cloud_convert/actions/create-job/create-job.mjs (3)

1-2: LGTM: Imports are correctly structured.

The imports properly reference the app and utility modules using the correct relative paths.


4-14: LGTM: Action metadata is correctly configured.

The metadata properly follows Pipedream conventions with appropriate hints: openWorldHint: true for external API calls, destructiveHint: false since job creation doesn't modify existing resources, and clear documentation reference.


72-79: No action needed. The app.createJob method exists in components/cloud_convert/cloud_convert.app.mjs and correctly accepts the $ and data parameters as called in the code. The method properly chains through post()_makeRequest()axios(), passing the data object (containing tasks, tag, and webhook_url) as the request body to the CloudConvert API POST /v2/jobs endpoint, which aligns with the API specification.

Likely an incorrect or invalid review comment.

Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

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

Hi @jcortes, LGTM! Ready for QA!

@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test reports

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.

[ACTION] CloudConvert - Create Job

4 participants