Skip to content

fix[ci]: add id-token:write to cpp-tests-classification.yml#2100

Merged
DmitryMalishev merged 2 commits into
mainfrom
fix/classification-ggml-cpp-tests-oidc
May 19, 2026
Merged

fix[ci]: add id-token:write to cpp-tests-classification.yml#2100
DmitryMalishev merged 2 commits into
mainfrom
fix/classification-ggml-cpp-tests-oidc

Conversation

@DmitryMalishev

Copy link
Copy Markdown
Contributor

This is a fix. The test-cpp job in cpp-tests-classification.yml calls setup-aws-prebuild (which assumes an AWS IAM role via OIDC) and setup-vcpkg (which configures the S3-backed vcpkg binary cache via VCPKG_BINARY_SOURCES=x-aws,s3://...). Both actions require GitHub to issue an OIDC token for the job, which only happens when the job (or its workflow) declares id-token: write.

The workflow's top-level permissions block only has contents: read. Without id-token: write, aws-actions/configure-aws-credentials cannot exchange a GitHub OIDC token for AWS credentials, so every test-cpp matrix leg fails immediately with:

Credentials could not be loaded, please check your action inputs:
Could not load credentials from any providers

This bug was hidden until now because the label-gate that was added in #2087 was missing from the original addon PR (#1727), so the cpp-tests job had always been skipped on PRs.

Fix: add a job-level permissions block with id-token: write on the test-cpp job. This matches the existing pattern in cpp-test-coverage-tts-ggml.yml, which has the same AWS OIDC requirement and declares the permission identically.

Other cpp-tests workflows (embed, llm, diffusion) are not affected: they bootstrap vcpkg directly from GitHub and do not use the S3 binary cache, so they have no OIDC dependency.

The `test-cpp` job in `cpp-tests-classification.yml` calls
`setup-aws-prebuild` (which assumes an AWS IAM role via OIDC) and
`setup-vcpkg` (which configures the S3-backed vcpkg binary cache via
`VCPKG_BINARY_SOURCES=x-aws,s3://...`). Both actions require GitHub to
issue an OIDC token for the job, which only happens when the job (or its
workflow) declares `id-token: write`.

The workflow's top-level `permissions` block only has `contents: read`.
Without `id-token: write`, `aws-actions/configure-aws-credentials` cannot
exchange a GitHub OIDC token for AWS credentials, so every `test-cpp`
matrix leg fails immediately with:

  Credentials could not be loaded, please check your action inputs:
  Could not load credentials from any providers

This bug was hidden until now because the label-gate that was added in
#2087 was missing from the original addon PR (#1727), so the `cpp-tests`
job had always been skipped on PRs.

Fix: add a job-level `permissions` block with `id-token: write` on the
`test-cpp` job. This matches the existing pattern in
`cpp-test-coverage-tts-ggml.yml`, which has the same AWS OIDC requirement
and declares the permission identically.

Other cpp-tests workflows (embed, llm, diffusion) are not affected: they
bootstrap vcpkg directly from GitHub and do not use the S3 binary cache,
so they have no OIDC dependency.

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

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Tier-based Approval Status

**PR Tier:** TIER1

**Current Status:** ✅ APPROVED

**Requirements:**
- 1 Team Member approval ✅ (1/1)
- 1 Team Lead OR Management approval ✅ (1/1)



---
*This comment is automatically updated when reviews change.*

@kinsta

kinsta Bot commented May 19, 2026

Copy link
Copy Markdown

Preview deployments for qvac-docs-staging ⚡️

Status Branch preview Commit preview
🔁 Deploying... N/A N/A

Commit: 5c940694b2e32a5c14a9a44ed78977ead59d19b1

Deployment ID: 0e8b45d3-96d7-4e36-8878-382222a22cf6

Static site name: qvac-docs-staging-fazwv

@DmitryMalishev

Copy link
Copy Markdown
Contributor Author

/review

@DmitryMalishev DmitryMalishev merged commit 6024bb2 into main May 19, 2026
7 checks passed
@DmitryMalishev DmitryMalishev deleted the fix/classification-ggml-cpp-tests-oidc branch May 19, 2026 08:28
Proletter pushed a commit that referenced this pull request May 24, 2026
The `test-cpp` job in `cpp-tests-classification.yml` calls
`setup-aws-prebuild` (which assumes an AWS IAM role via OIDC) and
`setup-vcpkg` (which configures the S3-backed vcpkg binary cache via
`VCPKG_BINARY_SOURCES=x-aws,s3://...`). Both actions require GitHub to
issue an OIDC token for the job, which only happens when the job (or its
workflow) declares `id-token: write`.

The workflow's top-level `permissions` block only has `contents: read`.
Without `id-token: write`, `aws-actions/configure-aws-credentials` cannot
exchange a GitHub OIDC token for AWS credentials, so every `test-cpp`
matrix leg fails immediately with:

  Credentials could not be loaded, please check your action inputs:
  Could not load credentials from any providers

This bug was hidden until now because the label-gate that was added in
#2087 was missing from the original addon PR (#1727), so the `cpp-tests`
job had always been skipped on PRs.

Fix: add a job-level `permissions` block with `id-token: write` on the
`test-cpp` job. This matches the existing pattern in
`cpp-test-coverage-tts-ggml.yml`, which has the same AWS OIDC requirement
and declares the permission identically.

Other cpp-tests workflows (embed, llm, diffusion) are not affected: they
bootstrap vcpkg directly from GitHub and do not use the S3 binary cache,
so they have no OIDC dependency.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants