Skip to content

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Sep 24, 2025

Updates versions to import the changes from #18308

Summary by CodeRabbit

  • Refactor
    • Improved Apify OAuth integration to apply required headers consistently across requests, enhancing reliability and compatibility.
  • Chores
    • Updated Apify OAuth package version and dependencies for improved stability.
    • Bumped versions of multiple Apify OAuth actions and instant sources to 0.0.2.
  • Style
    • Minor formatting cleanups in Beeminder and Lingvanex components.

@michelle0927 michelle0927 self-assigned this Sep 24, 2025
Copy link
Contributor

coderabbitai bot commented Sep 24, 2025

Walkthrough

Bumps versions for multiple Apify OAuth actions and sources, updates apify_oauth package.json (version, dependencies), refactors apify_oauth app to use ApifyClient with a request interceptor instead of a headers method, and adds trailing newlines to two unrelated app files.

Changes

Cohort / File(s) Summary of changes
Apify OAuth actions: version bump
components/apify_oauth/actions/get-dataset-items/get-dataset-items.mjs, .../run-actor/run-actor.mjs, .../run-task-synchronously/run-task-synchronously.mjs, .../scrape-single-url/scrape-single-url.mjs, .../set-key-value-store-record/set-key-value-store-record.mjs
Updated exported version from "0.0.1" to "0.0.2".
Apify OAuth sources: version bump
components/apify_oauth/sources/new-finished-actor-run-instant/new-finished-actor-run-instant.mjs, .../sources/new-finished-task-run-instant/new-finished-task-run-instant.mjs
Updated exported version from "0.0.1" to "0.0.2".
Apify OAuth app: client refactor
components/apify_oauth/apify_oauth.app.mjs
Removed _headers(); added _client() that creates ApifyClient with OAuth token and a request interceptor to inject x-apify-integration-platform.
Apify OAuth package metadata
components/apify_oauth/package.json
Bumped package version 0.1.0 → 0.1.1; updated @pipedream/apify ^0.3.0 → ^0.3.1; added dependency apify-client ^2.17.0.
Trailing newline only
components/beeminder/beeminder.app.mjs, components/lingvanex_translation_api/lingvanex_translation_api.app.mjs
Added trailing newline; no functional changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant App as Apify OAuth App
  participant Client as ApifyClient (with interceptor)
  participant API as Apify API

  User->>App: Invoke action/source
  App->>App: _client() creates ApifyClient<br/>with OAuth token
  Note over App,Client: Registers request interceptor<br/>to add x-apify-integration-platform
  App->>Client: client.request(...)
  Client->>API: HTTP request with Authorization<br/>+ x-apify-integration-platform
  API-->>Client: Response
  Client-->>App: Response
  App-->>User: Result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A hop, a skip—new versions gleam,
Headers now glide in a client stream.
Interceptors tuck notes in flight,
Platform tags set just right.
Dependencies snug, all seams align—
Thump-thump, ship it, feeling fine! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description does not follow the required template, as it lacks the “## WHY” section heading and corresponding explanation of the motivation, instead offering only a brief summary line without adhering to the repository’s template structure. Please update the PR description to include the “## WHY” section from the repository template and provide a clear explanation of why the version bumps and client method changes are necessary.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly indicates that the apify_oauth component is being updated to incorporate upstream Apify changes, concisely reflecting the main purpose of the changeset without unnecessary details or vague language.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-apify_oauth

📜 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 1a7f280 and 499ac3d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • components/beeminder/beeminder.app.mjs (1 hunks)
  • components/lingvanex_translation_api/lingvanex_translation_api.app.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • components/beeminder/beeminder.app.mjs
  • components/lingvanex_translation_api/lingvanex_translation_api.app.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). (5)
  • GitHub Check: Lint Code Base
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Ensure component commits modify component versions
  • GitHub Check: Verify TypeScript components

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

vercel bot commented Sep 24, 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 Sep 29, 2025 2:41pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 29, 2025 2:41pm

@michelle0927 michelle0927 moved this from Doing to Ready for PR Review in Component (Source and Action) Backlog Sep 24, 2025
@michelle0927 michelle0927 removed the request for review from jcortes September 24, 2025 15:42
@michelle0927 michelle0927 moved this from Ready for PR Review to Doing in Component (Source and Action) Backlog Sep 24, 2025
@michelle0927 michelle0927 moved this from Doing to Ready for PR Review in Component (Source and Action) Backlog Sep 24, 2025
@luancazarine luancazarine moved this from Ready for PR Review to In Review in Component (Source and Action) Backlog Sep 25, 2025
luancazarine
luancazarine previously approved these changes Sep 25, 2025
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 @michelle0927, LGTM! Ready for QA!

@luancazarine luancazarine moved this from In Review to Ready for QA in Component (Source and Action) Backlog Sep 25, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to Changes Required in Component (Source and Action) Backlog Sep 26, 2025
@vunguyenhung
Copy link
Collaborator

Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.

Please check the test report below for more information
https://vunguyenhung.notion.site/Apify_oauth-update-to-import-Apify-changes-279bf548bb5e818398d5ef22596ff0d5

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/apify_oauth/apify_oauth.app.mjs (2)

12-24: Consider memoizing the client and validating token.
Prevents repeated instantiation and fails fast when token is missing.

Apply:

-    _client() {
-      return new ApifyClient({
-        token: this.$auth.oauth_access_token,
-        requestInterceptors: [
-          (config) => ({
-            ...config,
-            headers: {
-              ...(config.headers || {}),
-              "x-apify-integration-platform": "pipedream",
-            },
-          }),
-        ],
-      });
-    },
+    _client() {
+      if (this._apifyClient) return this._apifyClient;
+      const token = this.$auth?.oauth_access_token;
+      if (!token) throw new Error("Missing Apify OAuth token");
+      this._apifyClient = new ApifyClient({
+        token,
+        requestInterceptors: [
+          (config) => ({
+            ...config,
+            headers: {
+              ...(config.headers || {}),
+              "x-apify-integration-platform": "pipedream",
+            },
+          }),
+        ],
+      });
+      return this._apifyClient;
+    },

12-24: Add retry/timeout tuning when doing many calls.
Optional: pass maxRetries/minDelayBetweenRetriesMillis for resilience with Apify API.

For example (tune as needed):

-      this._apifyClient = new ApifyClient({
+      this._apifyClient = new ApifyClient({
         token,
+        maxRetries: 3,
+        minDelayBetweenRetriesMillis: 500,
         requestInterceptors: [

Based on learnings

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a7b9a2 and 1a7f280.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • components/apify_oauth/apify_oauth.app.mjs (2 hunks)
  • components/apify_oauth/package.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/apify_oauth/package.json
⏰ 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). (1)
  • GitHub Check: pnpm publish
🔇 Additional comments (3)
components/apify_oauth/apify_oauth.app.mjs (3)

2-2: LGTM: correct ApifyClient import.
Named ESM import matches apify-client v2 API.


12-24: No stale _headers() references remain
components/apify_oauth/apify_oauth.app.mjs only defines and uses _client(), with no _headers() calls found.


12-24: Correct requestInterceptors usage. ApifyClient v2 supports a requestInterceptors array and interceptor functions may return a modified config object as shown here.

@michelle0927 michelle0927 moved this from Changes Required to Ready for QA in Component (Source and Action) Backlog Sep 26, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to In QA in Component (Source and Action) Backlog Sep 29, 2025
@vunguyenhung vunguyenhung moved this from In QA to Ready for QA in Component (Source and Action) Backlog Sep 29, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to In QA in Component (Source and Action) Backlog Sep 29, 2025
@vunguyenhung vunguyenhung moved this from In QA to Ready for QA in Component (Source and Action) Backlog Sep 29, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to Ready for Release in Component (Source and Action) Backlog Sep 29, 2025
@vunguyenhung
Copy link
Collaborator

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

Test report
https://vunguyenhung.notion.site/Apify_oauth-update-to-import-Apify-changes-27dbf548bb5e81d1844ddb3b20defaf5

@michelle0927
Copy link
Collaborator Author

/approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for Release
Development

Successfully merging this pull request may close these issues.

3 participants