Problem
The shell completion function compGetResourceList in completion.go currently has no request timeout when fetching API resources. This can cause the shell to hang indefinitely if the Karmada API server is slow or unresponsive, providing a poor user experience during command completion.
Current Behavior
Line 259 in completion.go has a TODO comment: // TODO: Should set --request-timeout=5s
The function uses kubectl's APIResourceOptions to fetch API resources for shell completion
No timeout protection exists, so slow/unresponsive API servers can cause indefinite hangs
Expected Behavior
The completion function should have a reasonable timeout (e.g., 5 seconds) to prevent indefinite waiting
On timeout, the completion should fail gracefully (return empty completion list rather than hanging)
Normal completion operations should continue to work as expected
Problem
The shell completion function compGetResourceList in completion.go currently has no request timeout when fetching API resources. This can cause the shell to hang indefinitely if the Karmada API server is slow or unresponsive, providing a poor user experience during command completion.
Current Behavior
Line 259 in completion.go has a TODO comment: // TODO: Should set --request-timeout=5s
The function uses kubectl's APIResourceOptions to fetch API resources for shell completion
No timeout protection exists, so slow/unresponsive API servers can cause indefinite hangs
Expected Behavior
The completion function should have a reasonable timeout (e.g., 5 seconds) to prevent indefinite waiting
On timeout, the completion should fail gracefully (return empty completion list rather than hanging)
Normal completion operations should continue to work as expected