Jose Garcia
bbea5ac95e
codespace: progress indication, logging ( #4555 )
...
* Rework logging, showing progress, and printing from `codespace` commands
* Change rendering of the general progress indicator so that it's visible on both dark and light backgrounds
* The progress indicator now "spins" faster
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-10-21 18:04:04 +02:00
Jose Garcia
3544275c2f
Implement new API payload for a Codespace
2021-10-14 09:10:15 -04:00
Jose Garcia
97b52b30fc
Merge branch 'trunk' of github.com:cli/cli into jg/liveshare-keepalive
2021-10-13 10:45:40 -04:00
Jose Garcia
77a86e8611
Fix for API response body change
...
- Connection is now embedded within the top level of the Codespace
payload instead of inside the environment.
2021-10-13 08:07:59 -04:00
Jose Garcia
5170a2931f
Switch to standard lib log.Logger & support dfile
...
- --debug-file flag can now be used in conjuction with --debug to
specify the debug file path
- Push out logger concerns to callers of liveshare
2021-10-12 15:45:05 -04:00
Jose Garcia
55f4fcf05c
Live Share session activity detection
...
- Session now accepts two new options: ClientName and Logger
- Port forwarder now supports a keepAlive parameter which when true,
instructs the PF to call the session's keepAlive method.
- Port forwarder uses a new traffic monitor to detect I/O traffic and
notify the session when applicable.
- The SSH command introduces a new debug flag which enables the command
to log to a new temporary file. The file path is printed to the user.
2021-10-07 10:42:06 -04:00
Jose Garcia
8135fdbd99
Switch GetCodespace to new API endpoint
...
- Drop GetCodespaceToken as it is no longer necessary
- Introduces new behavior with the API to optionally include connection
details in the GET request. Ommitting to do so results in a faster
response
2021-10-06 08:50:42 -04:00
Jose Garcia
a3efb53c44
Update API.StartCodespace to use new API endpoint
...
- Switch to using name instead of GUID
- Remove GUID from the code since it is not used anywhere else
- Add docs to the api client methods
- Re-gen mocked client
2021-10-04 08:32:02 -04:00
Jose Garcia
94953ed3fc
Merge branch 'trunk' of github.com:cli/cli into jg/move-codespace-api
2021-09-30 11:52:22 -04:00
Jose Garcia
b5bbb442fd
Move internal/api to internal/codespaces/api
2021-09-30 11:06:43 -04:00
Jose Garcia
f4a5f82312
Move internal/liveshare to pkg/liveshare
2021-09-30 10:34:27 -04:00
Jose Garcia
5b5c3da393
Validate host public keys
2021-09-30 08:16:28 -04:00
Mislav Marohnić
f749590e87
Replace old "github/ghcs" import statements
2021-09-28 16:57:56 +02:00
Mislav Marohnić
ca0f89d3bc
Introduce an App struct that executes core business logic
...
The Cobra commands are now a light wrapper around the App struct.
Co-authored-by: Jose Garcia <josebalius@github.com>
2021-09-24 17:20:34 +02:00
Jose Garcia
f4396e8f1a
Inline go-liveshare with history
2021-09-23 11:28:04 -04:00
Jose Garcia
f1c35ba9da
Update docs
2021-09-23 10:21:01 -04:00
Jose Garcia
9654dc4bd3
Update to go-liveshare v0.20.0
2021-09-23 10:07:14 -04:00
Jose Garcia
e8e914c220
PR Feedback
...
- Upgrade to go-liveshare v0.19.0
- Remove export helper method
- Use local implementation
2021-09-21 10:05:48 -04:00
Jose Garcia
a83b3c0816
Update to go-livesare v0.18.0
...
- Only set err if closeErr is non-nil
2021-09-21 08:46:32 -04:00
Jose Garcia
7f682f9c39
Close Live Share sessions
...
- New helper method codespaces.CloseSession to be used using defer
- Upgrade to go-liveshare v0.17.0
2021-09-20 16:56:57 -04:00
Mislav Marohnić
dbb4e0c177
Merge remote-tracking branch 'origin' into ruleguard
2021-09-16 11:46:50 +02:00
Alan Donovan
06719866c9
move api to internal/
2021-09-15 13:13:10 -04:00
Mislav Marohnić
fb5a35568c
Ensure original errors are wrapped with "%w" instead of "%v"
2021-09-15 13:58:41 +02:00
Alan Donovan
cbb8253544
consolidate survey functions
2021-09-09 11:57:37 -04:00
Alan Donovan
4e2c20606a
Merge branch 'main' into join-session
2021-09-02 15:57:34 -04:00
Alan Donovan
8570f4111d
sketch after API changes in go-liveshare#11
2021-09-02 12:38:27 -04:00
Alan Donovan
49ccdd3d21
use correct correct spelling of codespace
2021-09-01 17:26:26 -04:00
Alan Donovan
bbcf2dd321
spell product names (Codespaces, Live Share) correctly
2021-08-31 11:15:26 -04:00
Jose Garcia
634796e8a8
merge main
2021-08-27 18:18:30 -04:00
Jose Garcia
1e8a8370fe
initial round of PR feedback
2021-08-27 16:29:02 -04:00
Jose Garcia
2cc91c224e
add comment for improvements
2021-08-27 12:53:27 -04:00
Jose Garcia
cb6552f4ca
more efficient impl for processing states
2021-08-27 12:50:32 -04:00
Alan Donovan
38ff786a7d
cmd/ghcs: style tweaks
2021-08-27 12:03:20 -04:00
Jose Garcia
46ee45bcdd
simplify the state iteration
2021-08-24 17:46:24 -04:00
Jose Garcia
55f0dad3db
merge upstream
2021-08-19 18:30:10 +00:00
Mislav Marohnić
20d75f0ff9
Normalize logging, output, and error reporting
...
- Return errors as errors, not print to stdout and return nil
- Ensure errors and warnings are always written to stderr, not stout
- Do not print progress to stdout unless stdout is a terminal
2021-08-12 14:37:23 +02:00
Jose Garcia
76aca39f5b
Create status support
2021-08-04 17:35:11 +00:00
Jose Garcia
58a055609d
logs cmd spike and refactor of ssh tunnel methods
2021-07-29 10:57:51 -04:00
Jose Garcia
9544f8acc9
Commit vendors
2021-07-28 09:05:58 -04:00
Jose Garcia
798413848b
Portfowarding private/public/forward now supported
2021-07-17 20:32:47 -04:00