Skip to content

scripts: pin the opentelemetry-proto revision used by codegen - #75

Merged
sfc-gh-vpalekar merged 1 commit into
snowflakedb:mainfrom
sfc-gh-eukim:proto-codegen-commit-pin
Sep 15, 2026
Merged

sfc-gh-vpalekar merged 1 commit into
snowflakedb:mainfrom
sfc-gh-eukim:proto-codegen-commit-pin

Conversation

@sfc-gh-eukim

Copy link
Copy Markdown
Contributor

Summary

Refine the proto code-generation setup:

  • Pin the opentelemetry-proto source to a full commit hash
    (PROTO_REPO_COMMIT) instead of a branch or tag, and verify the
    checkout resolves to exactly that commit before generating code.
  • Collect discovered proto paths into a quoted bash array so each file
    is passed to protoc as a single argument, regardless of whitespace or
    special characters in filenames.
  • Factor the shared logic into scripts/codegen_lib.sh (no side effects
    when sourced) and cover it with unit tests.

Tests

tests/test_proto_codegen_revision_pin.py covers the pinned-checkout
behavior (tag moves, unknown commits, and tag rejection).

@sfc-gh-eukim
sfc-gh-eukim requested a review from a team as a code owner September 10, 2026 19:57
Comment thread tests/test_proto_codegen_arg_injection.py Outdated
Pin the upstream source to a full commit hash (PROTO_REPO_COMMIT) and
verify the checkout resolves to exactly that commit before generating
code. Collect discovered proto paths into a quoted bash array so each
file is passed to protoc as a single argument, and cover the pinned
checkout and path-handling behavior with unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sfc-gh-eukim
sfc-gh-eukim force-pushed the proto-codegen-commit-pin branch from 0075743 to 26a735d Compare September 14, 2026 21:40

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

@sfc-gh-vpalekar
sfc-gh-vpalekar merged commit 8989466 into snowflakedb:main Sep 15, 2026
9 checks passed
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.

3 participants