Repository navigation
Replies: 1 comment 1 reply
|
Thanks for finding this. I'll look at auto supressing the update text in proxy mode; the update text is already suprressed in some commands and adding ssh to that list should be easy. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Posting here per CONTRIBUTING.
Summary
When a newer release is cached,
colab ssh --proxy-modeprints the upgrade banner to stdout. In proxy mode stdout is the SSH byte stream, so every OpenSSHProxyCommandconnection breaks during the banner exchange.docs/06_ssh_access.mdpromises the opposite ("stdout stays the clean ssh byte stream").The nasty part is timing: a setup that works today breaks silently on the day the next version is published, without any local change.
Reproduction (v0.7.4, macOS; no runtime needed)
Use a throwaway
HOMEwhose cachedlatest_versionis newer than the installed one:stdout:
With
"enable_update_check": false, the banner lines are gone. (The trailing error is expected here because there is no session; with a live session that line is not printed, but the banner still comes first.)Cause
cli.py: the global callback runsauto_update.run_background_check()for every subcommand not in_AUTO_UPDATE_SUPPRESSED.sshis not in that set.auto_update.py:announce_upgrade()/maybe_show_cached_banner()print withtyper.echo(...)(stdout).Suggested fix
Either of these would do it:
--proxy-modeis set (or addsshto_AUTO_UPDATE_SUPPRESSED).typer.echo(..., err=True). That also keeps it out ofcolab execoutput that people pipe into other tools.Workaround
Set
"enable_update_check": falsein~/.config/colab-cli/settings.json. We now set it automatically before usingcolab ssh --proxy-modeas aProxyCommandin an unattended pipeline.All reactions