Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce tsh binary size #41743

Merged
merged 3 commits into from
May 21, 2024
Merged

Reduce tsh binary size #41743

merged 3 commits into from
May 21, 2024

Conversation

rosstimothy
Copy link
Contributor

Removes lib/auth and cloud.google.com/go/compute/apiv1 from the tsh dependency tree to reduce tsh by ~15-20MB.

This was done by two changes:

  1. Moving the websocket stream code from lib/web into lib/web/terminal so that lib/benchmark/web, which is consumed by tsh bench, no longer imports lib/web
  2. Moving auth.IsInvalidLocalCredentialError and associated errors into lib/auth/authclient
ls -lah build/
total 1319832
drwxr-xr-x@  7 tim  staff   224B May 17 21:33 ./
drwxr-xr-x@ 76 tim  staff   2.4K May 17 21:12 ../
-rwxr-xr-x@  1 tim  staff   111M May 17 21:33 tsh-master*
-rwxr-xr-x@  1 tim  staff    93M May 17 21:24 tsh-tross/tsh_auth*

Refactors the terminal stream code in lib/web into a subpackage
so that tsh no longer depends on the entire lib/web package.
Refactors invalid credentials errors and helpers into lib/auth/authclient
so that tsh no longer imports lib/auth directly.
@rosstimothy rosstimothy force-pushed the tross/tsh_auth branch 3 times, most recently from 7a55d92 to 1e19e38 Compare May 20, 2024 19:51
@rosstimothy rosstimothy marked this pull request as ready for review May 20, 2024 20:13
@github-actions github-actions bot added desktop-access size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels May 20, 2024
Copy link
Contributor

@probakowski probakowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@rosstimothy
Copy link
Contributor Author

@zmb3 can I get a FTD exclusion?

@zmb3
Copy link
Collaborator

zmb3 commented May 20, 2024

/excludeflake *

@rosstimothy rosstimothy requested a review from zmb3 May 21, 2024 17:28
@rosstimothy rosstimothy added this pull request to the merge queue May 21, 2024
Merged via the queue into master with commit f27f701 May 21, 2024
42 checks passed
@rosstimothy rosstimothy deleted the tross/tsh_auth branch May 21, 2024 20:01
@public-teleport-github-review-bot

@rosstimothy See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Failed

rosstimothy added a commit that referenced this pull request May 21, 2024
* Remove lib/web dependency from tsh

Refactors the terminal stream code in lib/web into a subpackage
so that tsh no longer depends on the entire lib/web package.

* Remove lib/auth dependency from tsh

Refactors invalid credentials errors and helpers into lib/auth/authclient
so that tsh no longer imports lib/auth directly.

* fix find-replace typos
rosstimothy added a commit that referenced this pull request May 23, 2024
* Remove lib/web dependency from tsh

Refactors the terminal stream code in lib/web into a subpackage
so that tsh no longer depends on the entire lib/web package.

* Remove lib/auth dependency from tsh

Refactors invalid credentials errors and helpers into lib/auth/authclient
so that tsh no longer imports lib/auth directly.

* fix find-replace typos
rosstimothy added a commit that referenced this pull request May 23, 2024
* Remove lib/web dependency from tsh

Refactors the terminal stream code in lib/web into a subpackage
so that tsh no longer depends on the entire lib/web package.

* Remove lib/auth dependency from tsh

Refactors invalid credentials errors and helpers into lib/auth/authclient
so that tsh no longer imports lib/auth directly.

* fix find-replace typos
rosstimothy added a commit that referenced this pull request May 23, 2024
* Remove lib/web dependency from tsh

Refactors the terminal stream code in lib/web into a subpackage
so that tsh no longer depends on the entire lib/web package.

* Remove lib/auth dependency from tsh

Refactors invalid credentials errors and helpers into lib/auth/authclient
so that tsh no longer imports lib/auth directly.

* fix find-replace typos
rosstimothy added a commit that referenced this pull request May 23, 2024
* Remove lib/web dependency from tsh

Refactors the terminal stream code in lib/web into a subpackage
so that tsh no longer depends on the entire lib/web package.

* Remove lib/auth dependency from tsh

Refactors invalid credentials errors and helpers into lib/auth/authclient
so that tsh no longer imports lib/auth directly.

* fix find-replace typos
rosstimothy added a commit that referenced this pull request May 24, 2024
* Remove lib/web dependency from tsh

Refactors the terminal stream code in lib/web into a subpackage
so that tsh no longer depends on the entire lib/web package.

* Remove lib/auth dependency from tsh

Refactors invalid credentials errors and helpers into lib/auth/authclient
so that tsh no longer imports lib/auth directly.

* fix find-replace typos
rosstimothy added a commit that referenced this pull request May 24, 2024
* Remove lib/web dependency from tsh

Refactors the terminal stream code in lib/web into a subpackage
so that tsh no longer depends on the entire lib/web package.

* Remove lib/auth dependency from tsh

Refactors invalid credentials errors and helpers into lib/auth/authclient
so that tsh no longer imports lib/auth directly.

* fix find-replace typos
github-merge-queue bot pushed a commit that referenced this pull request May 24, 2024
* Remove lib/web dependency from tsh

Refactors the terminal stream code in lib/web into a subpackage
so that tsh no longer depends on the entire lib/web package.

* Remove lib/auth dependency from tsh

Refactors invalid credentials errors and helpers into lib/auth/authclient
so that tsh no longer imports lib/auth directly.

* fix find-replace typos
github-merge-queue bot pushed a commit that referenced this pull request May 24, 2024
* Remove lib/web dependency from tsh

Refactors the terminal stream code in lib/web into a subpackage
so that tsh no longer depends on the entire lib/web package.

* Remove lib/auth dependency from tsh

Refactors invalid credentials errors and helpers into lib/auth/authclient
so that tsh no longer imports lib/auth directly.

* fix find-replace typos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v14 backport/branch/v15 desktop-access no-changelog Indicates that a PR does not require a changelog entry size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants