You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make GCP test credentials explicit and scoped - #225
Google integration tests require explicit local ADC files instead of retrieving keys from AWS, decoding environment keys, or discovering home-directory credentials. Typed BigQuery identities select restricted key files or impersonation targets; workload mode requires federated ADC.
Credential setup follows test skip selection and precedes resource fixtures. The base identity survives worker teardown, each test restores credential environment and GCS client cache, and input files remain unchanged. Mixed local invocations that already started DiskGraph workers fail with instructions to use a separate invocation. Depends on #224; production connector authentication semantics and existing check names are preserved.
Connector/config: 1915 passed, 41 skipped, 1 xfailed. Both restricted BigQuery permission tests executed and passed.
Real Snowflake filesystem invocation with invalid encoded GCP credentials: 104 tests skip without credential resolution.
The Snowflake connector job still fails one assertion because metadata includes static shared HM_SAMPLED.TEST_TABLE. This identical failure predates these PRs on main. Its creation/cleanup ownership has not been established; leftover state and permission drift remain hypotheses. The assertion is retained pending a supported fixture/contract fix.
No actionable comments were generated in the recent review.
Walkthrough
BigQuery credential setup now validates an explicit local ADC file, resolves the requested identity, and scopes credential environment changes to a context. GCS setup reuses that context. Pytest hooks manage session and per-test credential contexts and reject GCP test setup after workers start. Tests and integration prerequisites now use the explicit ADC and identity model.
No actionable merge-blocking code risk is established. The PR change-table validation failure still needs diagnosis.
Architecture risk: Low · up to c9a24
The change affects 2 systems.
Changed systems:test, kumo
Architecture concerns
No architecture-level concerns identified.
Review details
Systems and components
observed — test (service) was modified; 8 changed files map to changed impact.
observed — kumo (service) was modified; 2 changed files map to changed impact.
Before / after behavior
observed — Modified behavior in kumo/testing/bigquery.py: Imports and credential configuration declarations are replaced: secret retrieval, logging, legacy key identifiers, and key-to-impersonation mapping are removed. New environment-variable names, a pytest stash key, credential environment-variable list, and BigQueryIdentity and CredentialKind enums define explicit identity and credential types.
observed — Modified behavior in kumo/testing/bigquery.py: credential_kind validates that the path is local, exists, and is not a directory, then parses a JSON object and maps its type to CredentialKind. Invalid JSON structure, unsupported types, or invalid paths raise RuntimeError.
observed — Modified behavior in kumo/testing/bigquery.py: resolve_credentials requires a BigQueryIdentity and an explicit ADC path, validates its credential type, and requires federated ADC when workload exchange is enabled. DEFAULT uses that ADC directly. For NO_TABLE and NO_JOB, service-account-key ADC requires the corresponding restricted credential-file environment variable containing another key; other credential types require the matching impersonation target and return the original ADC path with that target.
observed — Modified behavior in kumo/testing/bigquery.py: setup_bigquery_credentials changes from configuring global environment and retrieving/writing secret-backed keys when ADC setup fails to a context manager that resolves credentials and temporarily applies ADC, impersonation, bucket, and project settings. It restores the environment on context exit; credential input files remain read-only.
Pre-merge checks: 2 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Change Map Design Review
The marked change map and linked problem are not available for review. The supplied summary does not show the comment's rationale, verification, or stopping condition. The diff has 834 changed lines a…
Provide the full comment starting with <!-- kumo-pr-change-map --> and the linked problem or release requirement. Review the comment against the diff and existing behavior.
Passed checks: 2 passed
Check name
Status
Explanation
Pr Size
The pull request changes 10 files. This is below the limit of 40 files.
Public Resource Access
The changed lines add no applicable external resource references. The added S3 and GCS URLs are test inputs for rejected remote credentials.
Full details: Change Map Design Review
Explanation
The marked change map and linked problem are not available for review. The supplied summary does not show the comment's rationale, verification, or stopping condition. The diff has 834 changed lines and replaces credential fallback with scoped explicit credentials, but code alone cannot establish what the comment explains.
Resolution
Provide the full comment starting with <!-- kumo-pr-change-map --> and the linked problem or release requirement. Review the comment against the diff and existing behavior.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
Verify explicit configuration and eliminate fallback-only tests.
test/testing/test_gcs_credentials.py
Cache and real pytest lifecycle regressions
Verify collection performs no authentication, cache restoration, skip/setup/test/teardown ordering, late-worker rejection and real mixed-parameter collection.
Protect credential lifetime across resource failures and provider selection.
test/rest/integ/test_bigquery_diskgraph_e2e.py
Module prerequisites
Replace obsolete AWS secret instructions with explicit local ADC and workload credential requirements.
Keep the training test setup instructions consistent with the removed fallback.
Replace obsolete AWS/encoded fallback instructions with explicit ADC requirements.
Keep ingestion test setup instructions consistent with the credential policy.
Requested requirement: consolidate explicit Google test credentials and remove automatic stored-key fallback after minimal NVIDIA CI enablement. Production authentication and broad provider-environment isolation are outside this change.
Use an independent mechanism to isolate the environment in test_environment_restored.
The test writes 'changed-by-test' directly into os.environ for every name in _CREDENTIAL_ENV_VARS. It relies on setup_bigquery_credentials to undo those writes. The outer monkeypatch only snapshots GOOGLE_APPLICATION_CREDENTIALS, GCP_PROJECT_ID and ENV_GOOGLE_CREDENTIALS_JSON.
If the restore logic regresses, the assertion fails. The values for GOOGLE_IMPERSONATE_SERVICE_ACCOUNT and the bucket variable then stay in the process. Later tests in the same session inherit them.
Give the test its own safety net. Replace os.environ with a copy for the duration of the test. Compute before after that replacement.
♻️ Proposed change
def test_environment_restored(monkeypatch, explicit_adc, failure):
names = testing_bigquery._CREDENTIAL_ENV_VARS
+ # Independent isolation: a restore bug must not leak into later tests.+ monkeypatch.setattr(os, 'environ', os.environ.copy())
monkeypatch.setenv('GCP_PROJECT_ID', 'previous-project')
Verify that the code under test and monkeypatch.setenv both work with a plain-dict os.environ. Both use item access only.
Based on learnings: "do not use that same function (or its mechanism) to set up, tear down, or safeguard the test."
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.
## Summary
Enable NVIDIA's federated GCP authentication in the existing
GCP-containing general shards and GCS integration workflow. Remove
Google login from Snowflake, whose selected tests do not need GCP and
whose workflow is excluded by the provider policy.
GCS credential setup runs after pytest skip selection and before
resource fixtures, including session workers. Explicit ADC takes
precedence; BigQuery workload mode requires federated ADC. Existing test
shards, coverage commands, and check names are preserved. GCS runs for
every PR and exposes failures; general tests skip only known
documentation changes. Credential lifetime/type cleanup follows in #225.
## Change map
[Change
map](#224 (comment))
## Validation
Signed head `386c680b` includes main's merged #174 Rust action fix.
- 58 focused local tests pass; changed-file flake8/isort and diff checks
pass. General/GCS actionlint passes; Snowflake retains ten pre-existing
missing-step references.
- [GPU CI
passes](https://github.com/NVIDIA/kumo-engine/actions/runs/42147408907/job/127662279622).
- [Testing and Coverage
passes](https://github.com/NVIDIA/kumo-engine/actions/runs/42147407662),
including every pytest shard, package suites, native checks, and
aggregate coverage.
- [All three GCP integration jobs
pass](https://github.com/NVIDIA/kumo-engine/actions/runs/42147407538):
10 tests across GCS, BigQuery + S3, and BigQuery ingestion.
-
[Connector/config](https://github.com/NVIDIA/kumo-engine/actions/runs/42147407662/job/127662203622):
1915 passed, 41 skipped, 1 xfailed. Both restricted BigQuery permission
tests executed and passed.
- Real-source Snowflake collection with invalid encoded GCP credentials
succeeds: 104 filesystem tests skip without credential resolution;
connector/REST collection includes 1513 nodes.
The [Snowflake connector
job](https://github.com/NVIDIA/kumo-engine/actions/runs/42147407528/job/127662134899)
still fails one assertion because metadata includes static shared
`HM_SAMPLED.TEST_TABLE`. This identical failure predates these PRs on
[main](https://github.com/NVIDIA/kumo-engine/actions/runs/41911685209/job/126860619478).
Its creation/cleanup ownership has not been established; leftover state
and permission drift remain hypotheses. The assertion is retained
pending a supported fixture/contract fix. Existing mixed-shard
continue-on-error behavior and broader provider isolation remain outside
scope.
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
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.
Summary
Google integration tests require explicit local ADC files instead of retrieving keys from AWS, decoding environment keys, or discovering home-directory credentials. Typed BigQuery identities select restricted key files or impersonation targets; workload mode requires federated ADC.
Credential setup follows test skip selection and precedes resource fixtures. The base identity survives worker teardown, each test restores credential environment and GCS client cache, and input files remain unchanged. Mixed local invocations that already started DiskGraph workers fail with instructions to use a separate invocation. Depends on #224; production connector authentication semantics and existing check names are preserved.
Change map
Change map
Validation
Signed head
9920279cincludes main's merged #174 Rust action fix through #224.The Snowflake connector job still fails one assertion because metadata includes static shared
HM_SAMPLED.TEST_TABLE. This identical failure predates these PRs on main. Its creation/cleanup ownership has not been established; leftover state and permission drift remain hypotheses. The assertion is retained pending a supported fixture/contract fix.