Skip to content

fix: return error for unreadable bearer token file#3177

Open
immanuwell wants to merge 1 commit into
parca-dev:mainfrom
immanuwell:fix/bearer-token-file-error
Open

fix: return error for unreadable bearer token file#3177
immanuwell wants to merge 1 commit into
parca-dev:mainfrom
immanuwell:fix/bearer-token-file-error

Conversation

@immanuwell
Copy link
Copy Markdown

What

Small fix for a sharp edge in remote store auth. If --remote-store-bearer-token-file points at a missing/unreadable file, setup currently panics.

Now it returns the wrapped error like the TLS setup path does. Tiny thing, but no random crashy vibes.

Repro

Before this patch:
go test ./flags -run TestSetupGrpcConnectionReturnsErrorForUnreadableBearerTokenFile -count=1

It panics from setupGrpcConnection.

Checks

go test ./flags -run TestSetupGrpcConnectionReturnsErrorForUnreadableBearerTokenFile -count=1

go test ./...

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 7, 2026

CLA assistant check
All committers have signed the CLA.

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.

2 participants