-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
bugSomething isn't workingSomething isn't workingcodespacesgh-codespacerelating to the gh codespace commandrelating to the gh codespace commandp3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
There's some faulty logic in waitUntilCodespaceConnectionReady where it initially checks if the codespace is not ready and attempts to start it once if it's not.
The problem is: if the codespace is currently shutting down, rebuilding, or some other non-shutdown state, this start call will silently no-op and we won't try it again later - so the CLI will just poll until it eventually times out.
Steps to reproduce the behavior
- Create a codespace
gh cs stop -c <name>- Immediately
gh cs ssh -c <name> - Observe CLI waits for the codespace to become ready
gh cs lsin another terminal- Observe that codespace eventually becomes
Shutdown - The original
gh cs sshis still polling, but does not attempt to start the codespace and the codespace remainsShutdown
Expected vs actual behavior
The state polling should properly handle waiting for the Shutdown state before attempting to restart
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcodespacesgh-codespacerelating to the gh codespace commandrelating to the gh codespace commandp3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic