Skip to content

feat(gcp): implement native nodes for firestore, gcs, and vertex ai (…#1608

Open
kiet08hogit wants to merge 1 commit into
rocketride-org:developfrom
kiet08hogit:feat/1515-gcp-infrastructure
Open

feat(gcp): implement native nodes for firestore, gcs, and vertex ai (…#1608
kiet08hogit wants to merge 1 commit into
rocketride-org:developfrom
kiet08hogit:feat/1515-gcp-infrastructure

Conversation

@kiet08hogit

@kiet08hogit kiet08hogit commented Jul 16, 2026

Copy link
Copy Markdown

#1515)

Summary

  • Unified GCP Authentication:** Added gcp_auth.py and services.common.gcp.json to handle both Service Account JSON keys and Application Default Credentials (ADC) fallback.
  • Firestore Node (db_firestore):** Created a native NoSQL database node for setting and getting documents from Google Cloud Firestore.
  • Cloud Storage Node (tool_gcs):** Created a native file storage node for listing and securely downloading files from Google Cloud Storage buckets.
  • Vertex AI Node (vectordb_vertex):** Created a native vector database node to perform semantic nearest-neighbor searches against Vertex AI Index Endpoints.

Type

Testing

  • [x ] Tests added or updated
  • [ x] Tested locally
  • [ x] ./builder test passes

Checklist

  • Commit messages follow conventional commits
  • No secrets or credentials included
  • Wiki updated (if applicable)
  • Breaking changes documented (if applicable)

Linked Issue

Fixes #1515, #1511, #1512, #1513

Summary by CodeRabbit

  • New Features

    • Added Google Cloud authentication with service account and Application Default Credentials support.
    • Added Firestore tools to create, update, and retrieve documents.
    • Added Google Cloud Storage tools to list and download files.
    • Added Vertex AI Vector Search with configurable result limits and score filtering.
    • Added configuration options for projects, buckets, collections, regions, and indexes.
  • Documentation

    • Added usage and authentication guidance for all new Google Cloud integrations.

@github-actions github-actions Bot added docs Documentation module:nodes Python pipeline nodes labels Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor
🤖 Internal: Discord sync marker

Auto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Introduces shared GCP authentication supporting service-account JSON and ADC, then adds Firestore, Google Cloud Storage, and Vertex AI Vector Search nodes with lifecycle management, tools, service schemas, dependencies, and documentation.

Changes

GCP data infrastructure

Layer / File(s) Summary
Shared GCP authentication
nodes/src/nodes/core/gcp_auth.py, nodes/src/nodes/core/services.common.gcp.json
Adds service-account and ADC credential resolution with project ID derivation, scopes, validation errors, and conditional authentication configuration.
Firestore node
nodes/src/nodes/db_firestore/...
Adds Firestore client lifecycle handling, connectivity validation, document read/write tools, service metadata, dependencies, and documentation.
Google Cloud Storage node
nodes/src/nodes/tool_gcs/...
Adds GCS client lifecycle handling, bucket validation, file listing and download tools, service metadata, dependencies, and documentation.
Vertex AI Vector Search node
nodes/src/nodes/vectordb_vertex/...
Adds Vertex AI initialization, endpoint validation, vector search with score filtering, service metadata, dependencies, and documentation.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

  • #1511 — Adds the Firestore node described by this issue.
  • #1512 — Adds the Vertex AI Vector Search node described by this issue.
  • #1513 — Adds the GCS node described by this issue.

Suggested labels: builder

Suggested reviewers: jmaionchi, stepmikhaylov, rod-christensen

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: adding native GCP nodes for Firestore, GCS, and Vertex AI.
Linked Issues check ✅ Passed The PR covers the GCP epic's required Firestore, GCS, Vertex, and shared auth functionality.
Out of Scope Changes check ✅ Passed The added docs, schemas, dependencies, and package wiring all support the requested GCP nodes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@nodes/src/nodes/core/gcp_auth.py`:
- Around line 25-29: Use single-quoted string literals throughout the affected
Python code unless a literal contains a single quote: in
nodes/src/nodes/core/gcp_auth.py ranges 25-29, 35-36, 42-43, 49-53, 57-57, and
64-68, update the config keys, auth values, comma, and f-strings; in
nodes/src/nodes/tool_gcs/IGlobal.py ranges 23-24, 34-36, 50-52, and 60-61,
update the ImportError message and f-strings; in
nodes/src/nodes/vectordb_vertex/IGlobal.py ranges 24-25, 33-34, 39-41, 56-58,
and 68-69, update the ImportError message, warning string, and f-strings.
Preserve interpolation and runtime behavior.

In `@nodes/src/nodes/tool_gcs/IInstance.py`:
- Around line 10-70: Update all string literals in the download_file and
list_files methods of nodes/src/nodes/tool_gcs/IInstance.py (lines 10-70) to use
single quotes, and apply the same conversion to all string literals in
nodes/src/nodes/vectordb_vertex/IInstance.py (lines 8-40), preserving the
existing behavior and enforcing the project’s ruff single-quote formatting.
- Around line 33-40: Update the temporary-file handling around
blob.download_to_filename in the download method: if the download fails after
tempfile.mkstemp creates temp_path, remove that file before re-raising so the
outer exception handler still returns the existing error response. Preserve the
successful return path and avoid deleting the file after a successful download.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 407a3f04-d9cd-458c-b761-b1f55b47cdad

📥 Commits

Reviewing files that changed from the base of the PR and between 06c6c58 and 1413b81.

📒 Files selected for processing (20)
  • nodes/src/nodes/core/gcp_auth.py
  • nodes/src/nodes/core/services.common.gcp.json
  • nodes/src/nodes/db_firestore/IGlobal.py
  • nodes/src/nodes/db_firestore/IInstance.py
  • nodes/src/nodes/db_firestore/README.md
  • nodes/src/nodes/db_firestore/__init__.py
  • nodes/src/nodes/db_firestore/requirements.txt
  • nodes/src/nodes/db_firestore/services.json
  • nodes/src/nodes/tool_gcs/IGlobal.py
  • nodes/src/nodes/tool_gcs/IInstance.py
  • nodes/src/nodes/tool_gcs/README.md
  • nodes/src/nodes/tool_gcs/__init__.py
  • nodes/src/nodes/tool_gcs/requirements.txt
  • nodes/src/nodes/tool_gcs/services.json
  • nodes/src/nodes/vectordb_vertex/IGlobal.py
  • nodes/src/nodes/vectordb_vertex/IInstance.py
  • nodes/src/nodes/vectordb_vertex/README.md
  • nodes/src/nodes/vectordb_vertex/__init__.py
  • nodes/src/nodes/vectordb_vertex/requirements.txt
  • nodes/src/nodes/vectordb_vertex/services.json

Comment on lines +25 to +29
auth_type = config.get("gcp.authType", "adc")
project_id = config.get("gcp.projectId")

if auth_type == "service_account":
key_data = config.get("gcp.serviceAccountKey")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use single quotes for string literals.

Double quotes are used for several string literals across the Python files. As per path instructions, use single quotes for string literals in nodes/**/*.py unless the string itself contains a single quote.

  • nodes/src/nodes/core/gcp_auth.py#L25-L29: replace double quotes with single quotes for gcp.authType, adc, gcp.projectId, service_account, gcp.serviceAccountKey.
  • nodes/src/nodes/core/gcp_auth.py#L35-L36: replace double quotes with single quotes for the , character.
  • nodes/src/nodes/core/gcp_auth.py#L42-L43: replace double quotes with single quotes for the f-string.
  • nodes/src/nodes/core/gcp_auth.py#L49-L53: replace double quotes with single quotes for the f-string and project_id.
  • nodes/src/nodes/core/gcp_auth.py#L57-L57: replace double quotes with single quotes for adc.
  • nodes/src/nodes/core/gcp_auth.py#L64-L68: replace double quotes with single quotes for the f-strings.
  • nodes/src/nodes/tool_gcs/IGlobal.py#L23-L24: replace double quotes with single quotes for the ImportError message.
  • nodes/src/nodes/tool_gcs/IGlobal.py#L34-L36: replace double quotes with single quotes for the f-string.
  • nodes/src/nodes/tool_gcs/IGlobal.py#L50-L52: replace double quotes with single quotes for the f-string.
  • nodes/src/nodes/tool_gcs/IGlobal.py#L60-L61: replace double quotes with single quotes for the f-string.
  • nodes/src/nodes/vectordb_vertex/IGlobal.py#L24-L25: replace double quotes with single quotes for the ImportError message.
  • nodes/src/nodes/vectordb_vertex/IGlobal.py#L33-L34: replace double quotes with single quotes for the warning string.
  • nodes/src/nodes/vectordb_vertex/IGlobal.py#L39-L41: replace double quotes with single quotes for the f-string.
  • nodes/src/nodes/vectordb_vertex/IGlobal.py#L56-L58: replace double quotes with single quotes for the f-string.
  • nodes/src/nodes/vectordb_vertex/IGlobal.py#L68-L69: replace double quotes with single quotes for the f-string.
📍 Affects 3 files
  • nodes/src/nodes/core/gcp_auth.py#L25-L29 (this comment)
  • nodes/src/nodes/core/gcp_auth.py#L35-L36
  • nodes/src/nodes/core/gcp_auth.py#L42-L43
  • nodes/src/nodes/core/gcp_auth.py#L49-L53
  • nodes/src/nodes/core/gcp_auth.py#L57-L57
  • nodes/src/nodes/core/gcp_auth.py#L64-L68
  • nodes/src/nodes/tool_gcs/IGlobal.py#L23-L24
  • nodes/src/nodes/tool_gcs/IGlobal.py#L34-L36
  • nodes/src/nodes/tool_gcs/IGlobal.py#L50-L52
  • nodes/src/nodes/tool_gcs/IGlobal.py#L60-L61
  • nodes/src/nodes/vectordb_vertex/IGlobal.py#L24-L25
  • nodes/src/nodes/vectordb_vertex/IGlobal.py#L33-L34
  • nodes/src/nodes/vectordb_vertex/IGlobal.py#L39-L41
  • nodes/src/nodes/vectordb_vertex/IGlobal.py#L56-L58
  • nodes/src/nodes/vectordb_vertex/IGlobal.py#L68-L69
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@nodes/src/nodes/core/gcp_auth.py` around lines 25 - 29, Use single-quoted
string literals throughout the affected Python code unless a literal contains a
single quote: in nodes/src/nodes/core/gcp_auth.py ranges 25-29, 35-36, 42-43,
49-53, 57-57, and 64-68, update the config keys, auth values, comma, and
f-strings; in nodes/src/nodes/tool_gcs/IGlobal.py ranges 23-24, 34-36, 50-52,
and 60-61, update the ImportError message and f-strings; in
nodes/src/nodes/vectordb_vertex/IGlobal.py ranges 24-25, 33-34, 39-41, 56-58,
and 68-69, update the ImportError message, warning string, and f-strings.
Preserve interpolation and runtime behavior.

Source: Path instructions

Comment on lines +10 to +70
@tool_function(
description="Download a file from Google Cloud Storage. Returns a dictionary containing the local temporary path of the downloaded file.",
args={
"file_name": "The name/path of the file in the bucket to download."
}
)
def download_file(self, file_name: str) -> Dict[str, Any]:
client = self.glb.client
if not client:
return {"error": "GCS client is not connected."}

bucket_name = self.glb.bucket_name
if not bucket_name:
return {"error": "Bucket name not configured."}

# Optional prefix prefixing
if self.glb.prefix:
file_name = f"{self.glb.prefix.rstrip('/')}/{file_name.lstrip('/')}"

try:
bucket = client.bucket(bucket_name)
blob = bucket.blob(file_name)

# Download to a temporary file
fd, temp_path = tempfile.mkstemp(prefix="gcs_")
os.close(fd)
blob.download_to_filename(temp_path)

return {"success": True, "local_path": temp_path}
except Exception as e:
return {"error": f"Failed to download file: {e}"}

@tool_function(
description="List files in the configured Google Cloud Storage bucket.",
args={
"prefix": "Optional prefix to filter files.",
"max_results": "Maximum number of files to return (default 10)."
}
)
def list_files(self, prefix: str = "", max_results: int = 10) -> List[str]:
client = self.glb.client
if not client:
return ["Error: GCS client is not connected."]

bucket_name = self.glb.bucket_name
if not bucket_name:
return ["Error: Bucket name not configured."]

# Combine node-level prefix and runtime prefix
full_prefix = ""
if self.glb.prefix:
full_prefix = self.glb.prefix.rstrip('/') + '/'
if prefix:
full_prefix += prefix.lstrip('/')

try:
bucket = client.bucket(bucket_name)
blobs = bucket.list_blobs(prefix=full_prefix, max_results=max_results)
return [blob.name for blob in blobs]
except Exception as e:
return [f"Failed to list files: {e}"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use single quotes for string literals.

Both files use double quotes for string literals, which violates the path instruction requiring single quotes for Python pipeline nodes. Please enforce ruff formatting with single quotes.

  • nodes/src/nodes/tool_gcs/IInstance.py#L10-L70: convert all double-quoted string literals to single quotes.
  • nodes/src/nodes/vectordb_vertex/IInstance.py#L8-L40: convert all double-quoted string literals to single quotes.
📍 Affects 2 files
  • nodes/src/nodes/tool_gcs/IInstance.py#L10-L70 (this comment)
  • nodes/src/nodes/vectordb_vertex/IInstance.py#L8-L40
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@nodes/src/nodes/tool_gcs/IInstance.py` around lines 10 - 70, Update all
string literals in the download_file and list_files methods of
nodes/src/nodes/tool_gcs/IInstance.py (lines 10-70) to use single quotes, and
apply the same conversion to all string literals in
nodes/src/nodes/vectordb_vertex/IInstance.py (lines 8-40), preserving the
existing behavior and enforcing the project’s ruff single-quote formatting.

Source: Path instructions

Comment on lines +33 to +40
# Download to a temporary file
fd, temp_path = tempfile.mkstemp(prefix="gcs_")
os.close(fd)
blob.download_to_filename(temp_path)

return {"success": True, "local_path": temp_path}
except Exception as e:
return {"error": f"Failed to download file: {e}"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Prevent temporary file leak on download failure.

If blob.download_to_filename(temp_path) raises an exception, the 0-byte temporary file created by tempfile.mkstemp remains on disk and is never cleaned up. Wrap the download call in a try...except block to remove the file on failure before re-raising the exception to the outer error handler.

🛠️ Proposed fix
-            # Download to a temporary file
-            fd, temp_path = tempfile.mkstemp(prefix="gcs_")
-            os.close(fd)
-            blob.download_to_filename(temp_path)
-            
-            return {"success": True, "local_path": temp_path}
-        except Exception as e:
-            return {"error": f"Failed to download file: {e}"}
+            # Download to a temporary file
+            fd, temp_path = tempfile.mkstemp(prefix='gcs_')
+            os.close(fd)
+            try:
+                blob.download_to_filename(temp_path)
+                return {'success': True, 'local_path': temp_path}
+            except Exception:
+                if os.path.exists(temp_path):
+                    os.remove(temp_path)
+                raise
+        except Exception as e:
+            return {'error': f'Failed to download file: {e}'}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Download to a temporary file
fd, temp_path = tempfile.mkstemp(prefix="gcs_")
os.close(fd)
blob.download_to_filename(temp_path)
return {"success": True, "local_path": temp_path}
except Exception as e:
return {"error": f"Failed to download file: {e}"}
# Download to a temporary file
fd, temp_path = tempfile.mkstemp(prefix='gcs_')
os.close(fd)
try:
blob.download_to_filename(temp_path)
return {'success': True, 'local_path': temp_path}
except Exception:
if os.path.exists(temp_path):
os.remove(temp_path)
raise
except Exception as e:
return {'error': f'Failed to download file: {e}'}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@nodes/src/nodes/tool_gcs/IInstance.py` around lines 33 - 40, Update the
temporary-file handling around blob.download_to_filename in the download method:
if the download fails after tempfile.mkstemp creates temp_path, remove that file
before re-raising so the outer exception handler still returns the existing
error response. Preserve the successful return path and avoid deleting the file
after a successful download.

@joshuadarron joshuadarron left a comment

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.

Thanks for the contribution — the node structure follows the repo conventions well (shared services.common.* auth file, per-node requirements.txt + depends(), README with generated-params markers). But there are several blocking issues, two of which mean the nodes cannot work at all as shipped.

Blocking (see inline comments for details):

  1. gcp_auth.py reads config keys with the gcp. prefix, but the engine delivers keys with the dotted namespace stripped — authType/serviceAccountKey/projectId. As written, auth always silently falls back to ADC and the service-account path is dead code.
  2. db_firestore calls Client.collections(page_size=1) — that parameter does not exist (verified against google-cloud-firestore 2.28.0: collections(retry, timeout, *, read_time)), so beginGlobal raises TypeError every time and the node can never start.
  3. All three services.json files declare lane wiring (lanes.questions) that no code implements, db_firestore declares an invoke.llm it never uses, and vectordb_vertex uses a classType value ("vector") that doesn't exist in the catalog (vector stores use "store").
  4. The three icon SVGs referenced by services.json (db_firestore.svg, tool_gcs.svg, vertex.svg) are not in the PR.
  5. Ruff fails on the new Python files: 83× Q000 (single quotes are enforced repo-wide) plus 1× D204. All auto-fixable with python -m ruff check --fix.
  6. The PR checklist claims tests were added, but there are none. Other nodes ship suites under nodes/test/ (see nodes/test/tool_gmail/ for a good template using the stub framework — no live GCP needed). At minimum, gcp_auth.get_gcp_credentials key parsing (data-url + raw JSON + error paths) is very testable.

Also: please document the new services.common.gcp.json in nodes/src/nodes/core/README.md alongside the existing AWS/Google Workspace sections (co-located documentation rule).

Happy to re-review once these are addressed — the fixes are mostly mechanical.

except ImportError:
raise GCPAuthError("google-auth library is not installed. Ensure node requirements include 'google-auth'.")

auth_type = config.get("gcp.authType", "adc")

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.

🔴 bug: engine delivers node config with the dotted namespace stripped — keys arrive as authType, projectId, serviceAccountKey (see tool_gmail/IGlobal.py:64 reading cfg.get('authType') for field google.authType, and the comment in db_postgres/IGlobal.py:41). config.get("gcp.authType") never matches → always falls back to adc; the service_account branch is dead code and gcp.projectId is ignored. Fix: read authType / serviceAccountKey / projectId.

# Fail fast connection check
try:
# simple check to verify connectivity/auth
next(self.client.collections(page_size=1), None)

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.

🔴 bug: Client.collections() has no page_size parameter (google-cloud-firestore 2.28.0 signature: collections(retry, timeout, *, read_time)) → TypeError on every beginGlobal; the node can never start. Use next(self.client.collections(), None). Also note: listing collections needs broader IAM than document get/set — a narrowly-scoped SA will fail this check even though the actual tools would work. Consider a cheaper probe (e.g. a no-op doc get).

"icon": "db_firestore.svg",
"documentation": "https://docs.rocketride.org",
"invoke": {
"llm": {

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.

🔴 bug: invoke.llm ("craft NoSQL queries") declared but IInstance never uses an LLM. The db_* nodes get question→query machinery from DatabaseGlobalBase/DatabaseInstanceBase (see db_postgres); this node extends raw IGlobalBase. Same for lanes.questions: ["table", "text", "answers"] below — no writeQuestions handler exists. Either derive from the database base classes or make this a pure tool node: "invoke": {}, "lanes": {} (cf. tool_tavily, tool_slack).

"path": "nodes.db_firestore",
"prefix": "firestore",
"description": ["A processing component that connects to Google Cloud Firestore (Datastore Mode or Native)."],
"icon": "db_firestore.svg",

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.

🔴 bug: db_firestore.svg referenced but not added (same for tool_gcs.svg, vertex.svg). Icon SVG goes next to services.json — docs/README-nodes.md "Adding a New Node" step 4.

"icon": "tool_gcs.svg",
"documentation": "https://docs.rocketride.org",
"invoke": {},
"lanes": {

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.

🔴 bug: lanes.questions declared but no lane handler (writeQuestions) implemented. Pure tool nodes declare "lanes": {} (cf. tool_tavily/services.json, tool_slack/services.json). Same issue in vectordb_vertex/services.json.

{
"title": "Vertex AI Vector Search",
"protocol": "vectordb_vertex://",
"classType": ["vector", "tool"],

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.

🔴 bug: classType "vector" doesn't exist anywhere in the catalog — vector stores use "store" (milvus, pinecone, qdrant, vectordb_postgres). Use ["store", "tool"] or just ["tool"] given only tool functions are implemented.

@@ -0,0 +1,16 @@
# Firestore Node

A standard node for interacting with Google Cloud Firestore (Datastore mode or Native mode).

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.

🟡 risk: google-cloud-firestore only works against Native-mode databases; Datastore mode requires google-cloud-datastore. Drop the "Datastore mode" claim here and in the services.json description.

if response and len(response) > 0:
for neighbor in response[0]:
if score_threshold > 0.0 and neighbor.distance < score_threshold:
continue

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.

🟡 risk: filtering out neighbor.distance < score_threshold keeps far neighbors and drops the closest ones for distance metrics (L2, cosine distance) — only correct for similarity-style metrics (dot product). Either document the metric assumption in the arg description or invert the comparison based on the index's metric.


# Download to a temporary file
fd, temp_path = tempfile.mkstemp(prefix="gcs_")
os.close(fd)

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.

🟡 risk: mkstemp temp files are never cleaned up — they accumulate for the life of the server, and the empty temp file also leaks when download_to_filename fails. Track created paths and remove them in endGlobal; delete the temp file in the except path.

self.deployed_index_id = str((cfg.get('deployedIndexId') or '')).strip()

if not index_endpoint_id or not self.deployed_index_id:
warning("indexEndpointId and deployedIndexId are required for Vertex AI Vector Search.")

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.

🔵 nit: message says "required" but this only warns and continues — node starts with index_endpoint = None and every search() call then errors. Raise here instead, matching the fail-fast behavior of the firestore/gcs beginGlobal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation module:nodes Python pipeline nodes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(nodes): Google Cloud Platform data-infrastructure node suite [EPIC]

2 participants