Skip to content

chore(snowflake): drop the local write caps in favor of the shared limit - #6461

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/snowflake-drop-local-write-caps
Aug 8, 2026
Merged

chore(snowflake): drop the local write caps in favor of the shared limit#6461
waleedlatif1 merged 1 commit into
stagingfrom
fix/snowflake-drop-local-write-caps

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • remove the local 1000-row and 1 MB bound-value caps from the Snowflake write path
  • drop the descriptions and tests that promised those limits

These duplicated the shared 10MB tool request body gate (tools/index.ts:2296validateRequestBodySize, which measures the same UTF-8 bytes) on the same axis, just at a lower threshold. Nothing fails between the two thresholds — Snowflake's 1 MB figure is a recommendation about query-text retention in the metadata store, not a hard limit, and statements above it still execute. The row array is already resident before the statement is built, so the caps bounded no allocation the request body did not already bound.

They were removed once before in 624b737 and should have stayed removed; I reintroduced one of them under the same name during the #6407 review. SNOWFLAKE_MAX_RESPONSE_BYTES stays — that one guards the response side, where get_statement can fetch a partition Sim never sized.

Type of Change

  • Chore

Testing

40 tests / 2 files (was 43 — the three removed tests only pinned the removed caps). Repo lint, type-check, and all audit scripts pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

The 1000-row and 1 MB bound-value caps duplicated the shared 10MB tool request
body gate on the same axis, at a lower threshold. Nothing fails between the two
thresholds: Snowflake's 1 MB guidance is a recommendation about metadata
retention rather than a hard limit, and statements above it still execute. The
row array is already resident before the statement is built, so the caps also
bounded no allocation the request body did not already bound.

These were removed once before in 624b737 and should have stayed removed.
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 8, 2026 11:51pm

Request Review

@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Docs and metadata only in the visible diff; write size is still bounded by the existing global request body limit, with no auth or data-path changes.

Overview
Removes Snowflake-specific write limits (1000 rows and 1 MB bound data) from user-facing docs and block metadata for Insert/Update/Upsert Rows, pointing users to Load Data for bulk ingest instead.

The rows parameter text no longer promises those caps; it now matches the shared 10 MB tool request body check. Generated tool metadata is refreshed accordingly.

Reviewed by Cursor Bugbot for commit 064d73a. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes Snowflake’s duplicated local structured-write row and bound-value caps, relying instead on the shared tool request-body limit.

  • Removes the 1,000-row and 1 MB validations from Snowflake SQL builders and explicit binding normalization.
  • Updates Snowflake tool, block, generated metadata, and documentation descriptions.
  • Removes tests that asserted the deleted local limits while retaining response-side limits.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

The removed checks duplicate the shared serialized request-body gate, the affected descriptions are aligned across runtime and documentation surfaces, and no repository-backed blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/tools/snowflake/sql.ts Removes cumulative binding-byte accounting and the structured-write row-count rejection while preserving row-shape validation.
apps/sim/tools/snowflake/sql.test.ts Removes tests dedicated to the deleted local caps without changing unrelated SQL-builder coverage.
apps/sim/tools/snowflake/insert_rows.ts Updates the rows parameter description to recommend Load Data for bulk ingestion without promising numeric caps.
apps/sim/tools/snowflake/update_rows.ts Aligns update-row tool metadata with the removal of local write caps.
apps/sim/tools/snowflake/upsert_rows.ts Aligns upsert-row tool metadata with the removal of local write caps.
apps/sim/blocks/blocks/snowflake.ts Updates the block’s user-facing structured-row description consistently with the tool behavior.
apps/docs/content/docs/en/integrations/snowflake.mdx Removes obsolete numeric write limits from insert, update, and upsert documentation.
apps/sim/tools/generated/tool-metadata.ts Regenerates serialized tool metadata to reflect the updated Snowflake parameter descriptions.

Reviews (1): Last reviewed commit: "chore(snowflake): drop the local write c..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 merged commit 76b535f into staging Aug 8, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/snowflake-drop-local-write-caps branch August 8, 2026 23:52
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.

1 participant