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

Add bundle size limits and tracking to Github CLI #6222

Merged
merged 7 commits into from
Dec 13, 2024

Conversation

arafatkatze
Copy link
Collaborator

@arafatkatze arafatkatze commented Nov 29, 2024

Add size limit enforcement and historical tracking for extension bundles to prevent unexpected size increases. This helps maintain performance and download speeds for users.
Part of the linear issue for Cody Performance

The purpose of this PR is to have bundle sizing measurements for both the extension and the webview. After having them, integrate them into the CI. If you were to add a dependency that increases the bundle size by a lot, it will fail the CI, therefore you have to be cautious about making reckless changes. If you really have to do it, making changes in the CI would force you to make potential changes with extension bloating carefully. NOTE the limit is set to 10% extra so its unlikely you will hit that limit unless you do some really reckless changes.

NOTE: This PR also puts the size of the bundle in bigquery on every release
image

This PR also tracks the bundle sizes on every pre-release along with the date so we have a record of the time when small changes happened and we can then use the bigquery table to see how the bundle sizes evolved.

Test plan

  • Actually run the Github Actions CI
    The failure mode looks like this and you see this failure mode on the build step so when you do a build and it makes very large bundle then the build fails and you have to talk to team cody core to get permission from Grace/dom before making big changes but for small bundle changes this will pass.
image
  • How did I check if this works with the release github actions?
    Since I couldn't actually run the release github action as that would make the release I decided to make a close approximation in another github action which would entail getting the release version and then making a bigquery request to update a row in the table to mark the date and the sizes of the bundles
image This is the response of my fake requests

This is the workflow file and this is the run.

Changelog

@arafatkatze arafatkatze force-pushed the adding-bundle-size-measures branch from e4d5921 to 7911310 Compare November 29, 2024 09:32
@arafatkatze arafatkatze force-pushed the adding-bundle-size-measures branch from 382c2fa to 9404e1e Compare November 29, 2024 10:27
@arafatkatze arafatkatze closed this Dec 5, 2024
@arafatkatze arafatkatze reopened this Dec 5, 2024
@arafatkatze arafatkatze force-pushed the adding-bundle-size-measures branch 5 times, most recently from cc4e0dc to 9c58e26 Compare December 9, 2024 09:05
@arafatkatze arafatkatze requested a review from kalanchan December 9, 2024 10:00
@kalanchan kalanchan requested a review from a team December 9, 2024 18:30
@arafatkatze arafatkatze force-pushed the adding-bundle-size-measures branch from d27b8aa to 501e933 Compare December 10, 2024 07:46
@arafatkatze arafatkatze force-pushed the adding-bundle-size-measures branch from 9a5cd1e to cb784ad Compare December 12, 2024 18:08
Add size limit enforcement and historical tracking for extension bundles to prevent
unexpected size increases. This helps maintain performance and download speeds for users.
@arafatkatze arafatkatze force-pushed the adding-bundle-size-measures branch from cb784ad to cc98a94 Compare December 12, 2024 18:08
.github/workflows/bundle-size-tracker.yaml Outdated Show resolved Hide resolved
.github/workflows/vscode-insiders-release.yml Outdated Show resolved Hide resolved
@arafatkatze arafatkatze merged commit fd2dcf1 into main Dec 13, 2024
20 of 21 checks passed
@arafatkatze arafatkatze deleted the adding-bundle-size-measures branch December 13, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants