You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation retries port-forwarding regardless of the exit code returned by the kubectl port-forward command. This behavior leads to unnecessary retries, especially when the exit code is 1, which indicates that the kubectl command itself was successful but the port-forwarding operation failed due to permissions or other non-retryable reasons.
If the exit code for the kubectl port-forward command is 1, the program should stop retrying and possibly alert the user, as this is typically a non-recoverable issue.
The text was updated successfully, but these errors were encountered:
@sunsided do we really want to handle these separately ? Again, I feel like these are non-recoverable errors that we can just ignore with a message.
TODO: Handle `Error from server (NotFound): pods "foo-78b4c5d554-6z55j" not found")`
TODO: Handle `Unable to listen on port 5012: Listeners failed to create with the following errors: [unable to create listener: Error listen tcp4 127.1.0.1:5012: bind: address already in use]`
Currently my PR handles these as well, while also providing a descriptive error message
Spawning child processes:
#2: Unable to listen on port 5010: Listeners failed to create with the following errors: [unable to create listener: Error listen tcp4 127.0.0.1:5010: bind: address already in use]
#2: error: unable to listen on any of the requested ports: [{5010 80}]
#2: Process exited with exit status: 1 - shutting process down
The core issue is that of forwarding to a service, not a pod directly. If all the available pods of a service disappear temporarily, say because they are recreated, then we do want to keep retrying until they're back. If we can guarantee that kubectl does not exit with code 1 (or exits with a different nonzero) when it could indeed recover from this situation, we're good. Otherwise we may want to introduce an option / configuration --max-retries=N or similar.
The current implementation retries port-forwarding regardless of the exit code returned by the
kubectl port-forward
command. This behavior leads to unnecessary retries, especially when the exit code is 1, which indicates that thekubectl
command itself was successful but the port-forwarding operation failed due to permissions or other non-retryable reasons.If the exit code for the
kubectl port-forward
command is 1, the program should stop retrying and possibly alert the user, as this is typically a non-recoverable issue.The text was updated successfully, but these errors were encountered: