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

Proof of Concept: Monitor Component bundle sizes #2005

Draft
wants to merge 44 commits into
base: main
Choose a base branch
from

Conversation

jamieomaguire
Copy link
Contributor

@jamieomaguire jamieomaguire commented Oct 18, 2024

Describe your changes (can list changeset entries if preferable)

Allows us to set max limits (in KB) for each of our components, and runs a CI check that fails if any exceed the limits. If they do, all components will be mentioned in a PR comment which contains the failures in a table. It also logs out the gzip and brotli compressed sizes.

I wrote the package to prototype it quickly however there's no reason we can't fork it and move into the monorepo if we wish.

CI Behaviour:

  • Lists all failing components
  • Adds a comment on failiure
  • Updates the existing comment if previous runs added one
  • Deletes the existing comment if it previously failed and now passes

Illustrations:

The new CI steps (only run on the Ubuntu Node 20 build)

Screenshot 2024-11-01 at 10 53 24

When all components pass

Screenshot 2024-11-01 at 10 20 18

PR Comment left when components fail

Screenshot 2024-11-01 at 10 36 58

CI logs when a component fails

Screenshot 2024-11-01 at 10 59 14

Copy link

changeset-bot bot commented Oct 18, 2024

⚠️ No Changeset found

Latest commit: 9e93da3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@maledr5 maledr5 left a comment

Choose a reason for hiding this comment

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

Looking good thanks for putting this together. My only nitpick is I wonder if we could have all the config in 1 file per component and not 2. But other than that looks like a good approach 👍

@github-actions github-actions bot temporarily deployed to pie-storybook-pr-2005 November 1, 2024 11:27 Inactive
@jamieomaguire jamieomaguire changed the title POC - install and setup compsizer Proof of Concept: Monitor Component bundle sizes Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants