Skip to content

fix: read workload token as utf-8#3302

Open
Ghraven wants to merge 1 commit into
openai:mainfrom
Ghraven:fix/workload-token-utf8
Open

fix: read workload token as utf-8#3302
Ghraven wants to merge 1 commit into
openai:mainfrom
Ghraven:fix/workload-token-utf8

Conversation

@Ghraven
Copy link
Copy Markdown

@Ghraven Ghraven commented May 24, 2026

Summary

  • read the Kubernetes workload identity subject token file with explicit UTF-8 encoding
  • update the matching test fixture write to use the same encoding

Before / after

Before, k8s_service_account_token_provider() used the platform default text encoding when reading the mounted token file.
After, it reads the token as UTF-8 explicitly, matching the text-file behavior expected by the test.

Verification

  • python -m py_compile src/openai/auth/_workload.py tests/test_auth.py
  • git diff --check

@Ghraven Ghraven requested a review from a team as a code owner May 24, 2026 02:57
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