Add command_ci_auth_type telemetry field for CI/CD integrations#3128
Open
sfc-gh-olorek wants to merge 1 commit into
Open
Add command_ci_auth_type telemetry field for CI/CD integrations#3128sfc-gh-olorek wants to merge 1 commit into
sfc-gh-olorek wants to merge 1 commit into
Conversation
This was referenced Jun 22, 2026
Record the authentication type the official Snowflake CI/CD integrations configure (currently "oidc") in a new command_ci_auth_type telemetry field, read from the SF_CICD_AUTH_TYPE environment variable. Mirrors the existing SF_CICD_INTEGRATION_VERSION / command_ci_integration_version pattern. _get_ci_auth_type() is the single resolution point so the value set can later be extended (e.g. inferred from the resolved connection) without changing the integrations.
9b14e58 to
813b9a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-review checklist
command_ci_integration_versionfield, which is unit-tested only.RELEASE-NOTES.md. — not included for now; happy to add a "New additions" bullet if maintainers want one.Changes description
Adds a new
command_ci_auth_typetelemetry field that records the authentication type the official Snowflake CI/CD integrations configure, so we can measure OIDC adoption across CI/CD.CLITelemetryField.COMMAND_CI_AUTH_TYPEand helper_get_ci_auth_type()insrc/snowflake/cli/_app/telemetry.py, wired intogenerate_telemetry_data_dict.SF_CICD_AUTH_TYPEenvironment variable (lower-cased + trimmed), exactly mirroring the existingSF_CICD_INTEGRATION_VERSION→command_ci_integration_versionmechanism. The integrations set it tooidcon their OIDC/workload-identity path; credential fallbacks the integration never configures leave it unset (empty string).oidc,key_pair,password,externalbrowser,oauth,programmatic_access_token) documented next to the helper; unknown values are recorded rather than dropped._get_ci_auth_type()is the single resolution point, so a later change can fall back to inferring the real authenticator from the resolved connection without touching the integrations or the field.Companion PRs set
SF_CICD_AUTH_TYPE=oidcin the integrations: snowflakedb/snowflake-actions#10, snowflakedb/snowflake-ado-extension#21, and the GitLab snowflake-cicd-component (MR !13). Those are forward-compatible and can merge in any order; this PR is the consumer that activates the signal.Tests
hatch run pytest tests/app/test_telemetry.py— 59 passed (4 new: value-when-set, empty-when-unset, normalization, and end-to-end payload).