Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Sep 2, 2025

Resolves #18126

Summary by CodeRabbit

  • New Features

    • Added Databricks endpoint management actions: Create, Delete, Get, and List endpoints.
    • Endpoint selection available via a searchable/paginated dropdown; List supports pagination and configurable max results.
    • Actions emit user-facing success summaries (created ID, retrieved/deleted names).
  • Chores

    • Bumped Databricks component version and upgraded platform dependency.
    • Incremented version metadata for multiple Databricks actions.

- Introduced actions for creating, deleting, getting, and listing vector search endpoints.
- Added endpoint name prop for dynamic endpoint selection.
- Updated package version to 0.2.0 and dependencies to the latest version.
- Incremented version for existing actions to 0.0.2 where applicable.
Copy link

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

Copy link
Contributor

coderabbitai bot commented Sep 2, 2025

Warning

Rate limit exceeded

@luancazarine has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 47 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 8c4cf2d and 3db9991.

📒 Files selected for processing (1)
  • components/databricks/package.json (2 hunks)

Walkthrough

Adds Databricks Vector Search endpoint support: app propDefinition and methods for create/get/list/delete endpoints, four new Pipedream actions (create, get, list with pagination, delete), and updates package metadata and dependency versions.

Changes

Cohort / File(s) Summary
Vector Search Endpoint Actions
components/databricks/actions/create-endpoint/create-endpoint.mjs, components/databricks/actions/get-endpoint/get-endpoint.mjs, components/databricks/actions/list-endpoints/list-endpoints.mjs, components/databricks/actions/delete-endpoint/delete-endpoint.mjs
Add actions to create, get, list (paginated), and delete Databricks vector search endpoints; each action calls corresponding app methods and exports concise summaries.
Databricks App Enhancements
components/databricks/databricks.app.mjs
Add endpointName propDefinition (options with pagination) and methods: createEndpoint, getEndpoint, listEndpoints, deleteEndpoint mapping to Databricks Vector Search Endpoints API.
Package Metadata & Versions
components/databricks/package.json, multiple action files under components/databricks/actions/...
Bump package version to 0.2.0, update @pipedream/platform dependency to ^3.1.0, and increment version fields on several existing actions (metadata-only bumps).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Action as Pipedream Action
  participant App as Databricks App
  participant API as Databricks Vector Search API

  rect rgba(230,245,255,0.6)
  note right of Action: Create / Get / Delete endpoint flows
  User->>Action: Invoke (props)
  Action->>App: method(args, $)
  alt Create
    App->>API: POST /vector-search/endpoints
    API-->>App: 201 Created (id,...)
  else Get
    App->>API: GET /vector-search/endpoints/{name}
    API-->>App: 200 OK (details)
  else Delete
    App->>API: DELETE /vector-search/endpoints/{name}
    API-->>App: 200 OK
  end
  App-->>Action: Response
  Action-->>User: Summary + Response
  end
Loading
sequenceDiagram
  autonumber
  actor User
  participant Action as List Endpoints Action
  participant App as Databricks App
  participant API as Databricks Vector Search API

  rect rgba(240,255,240,0.6)
  note right of Action: Paginated listing until no next_page_token or maxResults reached
  User->>Action: Invoke (maxResults)
  loop paginate
    Action->>App: listEndpoints({ page_token })
    App->>API: GET /vector-search/endpoints?page_token=...
    API-->>App: 200 OK (endpoints[], next_page_token)
    App-->>Action: { endpoints[], next_page_token }
    Action->>Action: Accumulate results
  end
  Action-->>User: Summary + endpoints[]
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Assessment against linked issues

Objective Addressed Explanation
Vector Search: endpoints create/get/list/delete (#18126)
Pagination for list endpoints where applicable (#18126)
Add SQL Warehouse operations and other domains (#18126) Only vector search endpoint APIs were added in this PR.
Ensure actions map to official routes with error handling/auth (#18126) Route mapping exists; error handling is inconsistent (some actions throw, others rely on upstream errors); auth not observable from diff.

Out-of-scope changes

Code Change Explanation
Bumped package version and dependency (components/databricks/package.json) Package metadata and dependency version updates are unrelated to implementing the vector search endpoint feature objectives.
Action version increments (multiple components/databricks/actions/*/* files — version field changes) Numerous version-only bumps across actions do not alter functionality and are not required by the vector search endpoints objective.

Suggested labels

User submitted

Suggested reviewers

  • michelle0927

Poem

I nibble code beneath the moon,
New endpoints sprout and hum a tune.
Create, list, fetch, and send away —
A burrowed index for queries to play.
Hop on, deploy — the vectors bloom today. 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch databricks-vector-search-endpoints

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/databricks/actions/list-runs/list-runs.mjs (1)

52-54: Bug: loop condition compares array to number, truncating pagination prematurely.
allRuns < this.maxResults should be allRuns.length < this.maxResults. Current code can exit early even when more pages exist.

-    } while (total === params.limit && allRuns < this.maxResults);
+    } while (total === params.limit && allRuns.length < this.maxResults);
🧹 Nitpick comments (9)
components/databricks/actions/list-runs/list-runs.mjs (1)

42-47: Nice-to-have: respect maxResults when paging to avoid over-fetching.
Throttle params.limit per-iteration to remaining budget.

-    do {
-      const { runs } = await this.databricks.listRuns({
+    do {
+      params.limit = Math.min(this.maxResults - allRuns.length, params.limit);
+      const { runs } = await this.databricks.listRuns({
         params,
         $,
       });
components/databricks/databricks.app.mjs (1)

70-77: Optional: Broaden workspace host support
Hardcoding .cloud.databricks.com restricts this client to AWS; Azure workspaces use *.azuredatabricks.net and GCP uses *.gcp.databricks.com. Accept a full host in $auth.domain if it contains a dot, otherwise append the AWS pattern.

- _baseUrl() {
-   return `https://${this.$auth.domain}.cloud.databricks.com/api/2.0`;
- },
+ _baseUrl() {
+   const host = this.$auth.domain.includes('.')
+     ? this.$auth.domain
+     : `${this.$auth.domain}.cloud.databricks.com`;
+   return `https://${host}/api/2.0`;
+ },
components/databricks/actions/create-endpoint/create-endpoint.mjs (3)

28-31: Harden success summary against missing id

Some responses may not include id (or use a different field). Fall back to the provided name so the summary is still useful.

-      if (response) {
-        $.export("$summary", `Successfully created endpoint with ID ${response.id}.`);
-      }
+      if (response) {
+        const idOrName = response?.id ?? response?.endpoint_id ?? this.name;
+        $.export("$summary", `Successfully created endpoint "${idOrName}".`);
+      }

18-26: Validate input early

Reject empty or whitespace-only names before making the API call.

-  async run({ $ }) {
-    try {
+  async run({ $ }) {
+    const name = this.name?.trim();
+    if (!name) {
+      throw new ConfigurationError("Endpoint Name is required.");
+    }
+    try {
       const response = await this.databricks.createEndpoint({
         data: {
-          name: this.name,
+          name,
           endpoint_type: "STANDARD",
         },
         $,
       });

10-17: Consider exposing endpoint type as a prop (default STANDARD)

Let users pick the endpoint type if Databricks adds more types, while defaulting to "STANDARD".

   props: {
     databricks,
     name: {
       type: "string",
       label: "Endpoint Name",
       description: "The name of the vector search endpoint",
     },
+    endpointType: {
+      type: "string",
+      label: "Endpoint Type",
+      description: "Type of vector search endpoint.",
+      options: [
+        { label: "STANDARD", value: "STANDARD" },
+      ],
+      default: "STANDARD",
+    },
   },

And pass it:

-          endpoint_type: "STANDARD",
+          endpoint_type: this.endpointType,
components/databricks/actions/delete-endpoint/delete-endpoint.mjs (1)

18-26: Wrap in try/catch and return a stable shape

Delete APIs often return empty bodies. Wrap errors for clearer UX and always return a predictable object.

-  async run({ $ }) {
-    const response = await this.databricks.deleteEndpoint({
-      endpointName: this.endpointName,
-      $,
-    });
-
-    $.export("$summary", `Successfully deleted endpoint "${this.endpointName}".`);
-    return response;
-  },
+  async run({ $ }) {
+    try {
+      const response = await this.databricks.deleteEndpoint({
+        endpointName: this.endpointName,
+        $,
+      });
+      $.export("$summary", `Successfully deleted endpoint "${this.endpointName}".`);
+      return response ?? { success: true, endpointName: this.endpointName };
+    } catch (err) {
+      const message = err?.response?.data?.message
+        || err?.message
+        || `Failed to delete endpoint "${this.endpointName}".`;
+      throw new Error(message);
+    }
+  },

Optional: swap Error for ConfigurationError and import it from @pipedream/platform for consistency.

components/databricks/actions/get-endpoint/get-endpoint.mjs (1)

18-29: Add defensive error handling and resilient summary

Guard against missing bodies and surface better errors.

-  async run({ $ }) {
-    const response = await this.databricks.getEndpoint({
-      endpointName: this.endpointName,
-      $,
-    });
-
-    if (response) {
-      $.export("$summary", `Successfully retrieved endpoint "${this.endpointName}".`);
-    }
-
-    return response;
-  },
+  async run({ $ }) {
+    try {
+      const response = await this.databricks.getEndpoint({
+        endpointName: this.endpointName,
+        $,
+      });
+      $.export("$summary", `Successfully retrieved endpoint "${this.endpointName}".`);
+      return response ?? {};
+    } catch (err) {
+      const message = err?.response?.data?.message
+        || err?.message
+        || `Failed to retrieve endpoint "${this.endpointName}".`;
+      throw new Error(message);
+    }
+  },
components/databricks/actions/list-endpoints/list-endpoints.mjs (2)

11-16: Constrain maxResults

Add a minimal bound to avoid confusion from zero or negative values.

     maxResults: {
       type: "integer",
       label: "Max Results",
       description: "Maximum number of endpoints to return",
       default: 100,
+      min: 1,
     },

35-43: Clarify truncation in the summary

Make it explicit when results were truncated to maxResults.

-    $.export("$summary", `Successfully retrieved ${allEndpoints.length} endpoint${allEndpoints.length === 1
-      ? ""
-      : "s"}.`);
+    const truncated = allEndpoints.length > this.maxResults ? " (truncated)" : "";
+    $.export("$summary", `Successfully retrieved ${allEndpoints.length} endpoint${allEndpoints.length === 1 ? "" : "s"}${truncated}.`);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5ee1e8a and a0b5964.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • components/databricks/actions/create-endpoint/create-endpoint.mjs (1 hunks)
  • components/databricks/actions/delete-endpoint/delete-endpoint.mjs (1 hunks)
  • components/databricks/actions/get-endpoint/get-endpoint.mjs (1 hunks)
  • components/databricks/actions/get-run-output/get-run-output.mjs (1 hunks)
  • components/databricks/actions/list-endpoints/list-endpoints.mjs (1 hunks)
  • components/databricks/actions/list-runs/list-runs.mjs (1 hunks)
  • components/databricks/actions/run-job-now/run-job-now.mjs (1 hunks)
  • components/databricks/databricks.app.mjs (2 hunks)
  • components/databricks/package.json (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.

Applied to files:

  • components/databricks/package.json
🧬 Code graph analysis (4)
components/databricks/actions/delete-endpoint/delete-endpoint.mjs (1)
components/databricks/actions/get-endpoint/get-endpoint.mjs (1)
  • response (19-22)
components/databricks/actions/get-endpoint/get-endpoint.mjs (1)
components/databricks/actions/delete-endpoint/delete-endpoint.mjs (1)
  • response (19-22)
components/databricks/actions/list-endpoints/list-endpoints.mjs (2)
components/databricks/actions/list-runs/list-runs.mjs (1)
  • params (33-38)
components/databricks/databricks.app.mjs (1)
  • params (29-32)
components/databricks/actions/create-endpoint/create-endpoint.mjs (2)
components/databricks/actions/delete-endpoint/delete-endpoint.mjs (1)
  • response (19-22)
components/databricks/actions/get-endpoint/get-endpoint.mjs (1)
  • response (19-22)
⏰ 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 (11)
components/databricks/actions/run-job-now/run-job-now.mjs (2)

7-7: Version bump only — looks good.
No behavioral changes detected.


6-6: Update documentation link anchor to “run-now”

- description: "Run a job now and return the id of the triggered run. [See the documentation](https://docs.databricks.com/en/workflows/jobs/jobs-2.0-api.html#runs-list)",
+ description: "Run a job now and return the id of the triggered run. [See the documentation](https://docs.databricks.com/en/workflows/jobs/jobs-2.0-api.html#run-now)",
components/databricks/actions/get-run-output/get-run-output.mjs (1)

7-7: Version bump only — looks good.
No functional changes.

components/databricks/package.json (2)

3-3: Package version bump — OK.
No issues spotted.


16-16: axios export unchanged in @pipedream/platform@^3.1.0
Verified v3.1.0 changelog (PR #5544) adds the Pipedream-wrapped axios export without breaking existing import { axios } from "@pipedream/platform" usage.

components/databricks/databricks.app.mjs (1)

114-121: Confirmed Vector Search endpoints and pagination params: The endpoints map to the correct paths under /api/2.0/vector-search/endpoints (POST for create, GET for list, and GET/DELETE with /{endpoint_name}), and pagination uses page_token in requests with next_page_token in responses.

components/databricks/actions/create-endpoint/create-endpoint.mjs (1)

20-26: Idempotency and conflict UX

If the endpoint already exists, the API may return a 409/conflict. Consider catching that case and turning it into a friendly message instead of a hard failure.

Would you like me to add a small helper that detects conflict status codes and exports a “already exists” summary?

components/databricks/actions/delete-endpoint/delete-endpoint.mjs (1)

3-17: LGTM overall

Props wiring and summary message look consistent with other actions.

components/databricks/actions/get-endpoint/get-endpoint.mjs (1)

3-17: LGTM

Prop definition reuse and action metadata are consistent.

components/databricks/actions/list-endpoints/list-endpoints.mjs (2)

3-17: LGTM

Action metadata and basic pagination approach look consistent with the rest of the suite.


23-31: Optional: pass page size to reduce overfetch

If the Databricks API supports page_size/max_results, set it based on remaining capacity to minimize extra requests.

Would you like me to adjust params to include a dynamic page_size once we confirm the parameter name in the Databricks API?

- Incremented version numbers for multiple Databricks SQL Warehouse actions to 0.0.2 and 0.0.3 as applicable.
- Added missing closing brackets in the `databricks.app.mjs` file.
- Updated the `get-run-output` and `list-runs` actions to version 0.0.3.
- Ensured consistency in action descriptions and documentation links.
@luancazarine luancazarine self-assigned this Sep 3, 2025
@luancazarine luancazarine moved this from Ready for PR Review to Ready for QA in Component (Source and Action) Backlog Sep 4, 2025
@luancazarine luancazarine merged commit a08f3ca into master Sep 5, 2025
10 checks passed
@luancazarine luancazarine deleted the databricks-vector-search-endpoints branch September 5, 2025 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

[ACTION] Databricks API extension
2 participants