Skip to content

fix(controlplane): fallback CAS downloads from invalid backends#3255

Open
waveywaves wants to merge 1 commit into
chainloop-dev:mainfrom
waveywaves:fix/cas-download-backend-fallback
Open

fix(controlplane): fallback CAS downloads from invalid backends#3255
waveywaves wants to merge 1 commit into
chainloop-dev:mainfrom
waveywaves:fix/cas-download-backend-fallback

Conversation

@waveywaves

@waveywaves waveywaves commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fall back from an invalid mapped CAS backend to the org default/fallback backend when minting download credentials
  • apply the same backend selection to browser download redirects
  • add a focused CAS backend use case test

Fixes #3190

Tests

  • SKIP_INTEGRATION=true go test ./app/controlplane/pkg/biz -run TestCASBackend -count=1
  • SKIP_INTEGRATION=true go test ./app/controlplane/internal/service -count=1
  • SKIP_INTEGRATION=true go test ./app/controlplane/internal/service ./app/controlplane/cmd -run TestDoesNotExist -count=1
  • git diff --check

Review in cubic

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 5 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread app/controlplane/pkg/biz/casbackend_test.go
Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
@waveywaves waveywaves force-pushed the fix/cas-download-backend-fallback branch from 40beb87 to c896cf4 Compare June 30, 2026 13:08
@waveywaves

waveywaves commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Updated tests for Cubic's edge-case feedback: nil mapped backend, missing default, missing fallback, and invalid fallback.

Validation:

SKIP_INTEGRATION=true go test ./app/controlplane/pkg/biz -run TestCASBackend -count=1

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.

Fall back to the org's default CAS backend on artifact download failures

1 participant