fix: raise InitializationError for missing client credentials#1200
Open
EngHabu wants to merge 2 commits into
Open
fix: raise InitializationError for missing client credentials#1200EngHabu wants to merge 2 commits into
EngHabu wants to merge 2 commits into
Conversation
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>
04666f4 to
10f327f
Compare
kumare3
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
client_idorclient_credentials_secretis missing,ClientCredentialsAuthenticator.__init__raised a bareValueError("both client_id and client_credentials_secret are required."). On the SelectCluster path this is wrapped asRuntimeError("SelectCluster failed...")→RuntimeSystemErrorand 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 theflyte/_sentry.pyuser-error allowlist) so it is filtered — matching the invalid-auth-mode fix in #1194.Change
ClientCredentialsAuthenticator.__init__raisesInitializationError("InvalidClientCredentials", "user", ...)instead ofValueError.fixes FLYTE-SDK-55
🤖 Generated with Claude Code