Fix hyp create ray-dashboard-connection command to load credentials through load_kubeconfig - #458
Open
jchatter321 wants to merge 1 commit into
Open
Conversation
psnilesh
approved these changes
Sep 2, 2026
rsareddy0329
approved these changes
Sep 2, 2026
zhaoqizqwang
approved these changes
Sep 2, 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.
Problem
hyp create ray-dashboard-connectionsends the request unauthenticated on fresh install not using K8s version 36.0.0. The EKS API server seessystem:anonymousand rejects it with 403 (or 401, depending on cluster auth config).Root cause
_get_eks_api_client()reads the bearer token by name from a detached config copy, then clearsapi_keyunconditionally:load_kube_config()names that entry differently across kubernetes-client releases —authorizationin 36.0.0,BearerTokenin 36.0.3. On 36.0.3 the lookup misses, noAuthorizationheader is attached, and the clear discards the token that was loaded. The client ends up with no credentials.setup.pydeclareskubernetes>=33.1.0,!=36.0.0, excluding the only version the code works on, so every fresh resolve is broken.Fix
Delete
_get_eks_api_client()and use the default client, asHPSpacealready does forspace_access:The default
ApiClientreads theConfigurationthatload_kube_config()populated, so auth resolves via the library's ownauth_settings()regardless of key name, and the exec-credential refresh hook is preserved.Testing
Verified on 36.0.3 (the breaking version) and 36.0.0: the command authenticates as the caller's IAM role and returns a valid presigned URL whose JWT
submatches. Updated the 7 unit tests that patched the removed function; request-body assertions unchanged.