Skip to content

feat(platform): add gcloud WIF credential helper command (PYSDK-146)#689

Open
dima-aignostics wants to merge 4 commits into
mainfrom
feat/PYSDK-146-add-user-token-command
Open

feat(platform): add gcloud WIF credential helper command (PYSDK-146)#689
dima-aignostics wants to merge 4 commits into
mainfrom
feat/PYSDK-146-add-user-token-command

Conversation

@dima-aignostics

Copy link
Copy Markdown
Contributor

Adds aignostics user token CLI command implementing the gcloud pluggable external credential source contract. Outputs an Aignostics id_token as JSON so gcloud can use it for Workload Identity Federation when accessing GCS.

Adds `aignostics user token` CLI command implementing the gcloud pluggable
external credential source contract. Outputs an Aignostics id_token as JSON
so gcloud can use it for Workload Identity Federation when accessing GCS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dima-aignostics dima-aignostics requested a review from a team as a code owner July 1, 2026 10:47
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
src/aignostics/platform/__init__.py 100.00% <100.00%> (ø)
src/aignostics/platform/_cli.py 88.88% <100.00%> (+3.17%) ⬆️

... and 5 files with indirect coverage changes

dima-aignostics and others added 2 commits July 1, 2026 14:30
Replace get_token mock with a real token file on disk so that
get_token's cache-hit path (file existence check, expiry parsing,
5-minute window validation) executes for real.

For success tests: write token:future_expiry to tmp_path and mock
settings at the authentication layer; only _inform_sentry_about_user
is suppressed to avoid JWT network calls.

For failure tests: point settings at a non-existent file so the cache
miss occurs naturally, then mock _authenticate to raise so get_token's
full failure path is exercised without real OAuth flows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove stray backslash line continuation and add missing return type
annotation on _settings_with_token_file staticmethod.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
16.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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