jerryshao commented on PR #13724:
URL: https://github.com/apache/gravitino/pull/13724#issuecomment-6096460681

   @yuqi1129 thanks, both points are addressed in 9d2af5a21.
   
   **Kubeconfig validation.** Reproduced with a test first. The kubeconfig must 
now select a context whose cluster has a non-blank `server`, otherwise startup 
fails with an `IllegalArgumentException` that names what is missing. 
`testKubeconfigWithoutUsableCluster` covers: no current context, a current 
context that does not exist, a context without content or without a cluster, an 
undefined cluster, a cluster entry without content, with `cluster: null`, with 
`cluster: {}`, with a blank server, and a file that is not a kubeconfig. The 
default server URL is not rejected: `testKubeconfigSelectingDefaultServer` 
covers a kubeconfig that selects `https://kubernetes.default.svc`.
   
   On using one parsed snapshot: `Config.fromKubeconfig(context, contents, 
path)` is deprecated for removal in fabric8 7.2.0 and fails the build with 
`-Werror`, so the client still loads the file itself. Instead, after loading, 
the executor checks that the API server the client ended up with is the server 
of the selected cluster. That covers a file changed between the two reads, and 
any difference between this check and how fabric8 reads the file.
   
   **Token file warnings.** A failure to read the token file is now logged once 
per run of failures, and logged again only after a successful read in between. 
The file is still checked on every request, so recovery is picked up right away.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to