Skip to content

fix: raise InitializationError for missing client credentials#1200

Open
EngHabu wants to merge 2 commits into
mainfrom
fix/sentry-55-client-credentials
Open

fix: raise InitializationError for missing client credentials#1200
EngHabu wants to merge 2 commits into
mainfrom
fix/sentry-55-client-credentials

Conversation

@EngHabu

@EngHabu EngHabu commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

When client_id or client_credentials_secret is missing, ClientCredentialsAuthenticator.__init__ raised a bare ValueError("both client_id and client_credentials_secret are required."). On the SelectCluster path this is wrapped as RuntimeError("SelectCluster failed...")RuntimeSystemError and leaks to Sentry as an SDK crash with no actionable signal (FLYTE-SDK-55).

Missing credentials is a user-config mistake. Raise a typed InitializationError (already in the flyte/_sentry.py user-error allowlist) so it is filtered — matching the invalid-auth-mode fix in #1194.

Change

  • ClientCredentialsAuthenticator.__init__ raises InitializationError("InvalidClientCredentials", "user", ...) instead of ValueError.
  • Added a constructor test (parametrized over missing/empty creds) and a Sentry-filter test covering the wrapped chain.

fixes FLYTE-SDK-55

🤖 Generated with Claude Code

@EngHabu EngHabu added the sentry-fix Fix for an issue surfaced by Sentry label Jun 12, 2026
ClientCredentialsAuthenticator.__init__ raised a bare ValueError when
client_id or client_credentials_secret was missing. On the SelectCluster
path this is wrapped as RuntimeError('SelectCluster failed...') ->
RuntimeSystemError and leaks to Sentry as an SDK crash with no actionable
signal (FLYTE-SDK-55).

Missing creds is a user-config mistake. Raise a typed InitializationError
(already in the flyte/_sentry.py user-error allowlist) so it's filtered,
matching the invalid-auth-mode fix in #1194.

fixes FLYTE-SDK-55

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
@EngHabu EngHabu force-pushed the fix/sentry-55-client-credentials branch from 04666f4 to 10f327f Compare June 13, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sentry-fix Fix for an issue surfaced by Sentry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants