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

Extract Bundlesize to its own job/check #2667

Merged
merged 11 commits into from
Mar 15, 2021

Conversation

benbowler
Copy link
Collaborator

@benbowler benbowler commented Jan 21, 2021

Extract Bundlesize to its own job/check.

Summary

Addresses issue #2539

Relevant technical choices

I followed these documents to get the head commit message and SHA.

Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 4.7 and PHP 5.6.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

@google-cla google-cla bot added the cla: yes label Jan 21, 2021
@benbowler
Copy link
Collaborator Author

If the context is incorrect we can check is using this action step:

      - name : GITHUB CONTEXT
        env:
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: echo "$GITHUB_CONTEXT"

@aaemnnosttv
Copy link
Collaborator

The request to report the check is failing it seems:
https://github.com/google/site-kit-wp/runs/1761296111?check_suite_focus=true#step:9:16

Not sure what's going on exactly but it's resulting in a 500 Internal server error.

@benbowler
Copy link
Collaborator Author

Hey @aaemnnosttv, I have done some rearch, including following this thread. As we don't have control over the Vercel (now.sh) set up I wasn't able to dig into why this is returning a 500 error.

There is a more actively maintained alternative called bundlewatch with more active commits and a similar web service to https://bundlesize-store.now.sh.

Would you consider switching?

@github-actions
Copy link

github-actions bot commented Jan 30, 2021

Size Change: 0 B

Total Size: 1.17 MB

ℹ️ View Unchanged
Filename Size Change
dist/admin.js 453 B 0 B
dist/adminbar.js 454 B 0 B
dist/assets/js/analytics-advanced-tracking.js 769 B 0 B
dist/assets/js/googlesitekit-activation.6ad8e76915f289873c73.js 39.8 kB 0 B
dist/assets/js/googlesitekit-adminbar.3540e941e1f3bd566fb2.js 64.5 kB 0 B
dist/assets/js/googlesitekit-api.dfa497c8afe75d4ef73f.js 8.4 kB 0 B
dist/assets/js/googlesitekit-base.3c330fef2361a3259ff7.js 1.57 kB 0 B
dist/assets/js/googlesitekit-dashboard-details.76a9d0b9f5d92d2e8fbb.js 82.4 kB 0 B
dist/assets/js/googlesitekit-dashboard-splash.08401b234e16c61d074c.js 53.6 kB 0 B
dist/assets/js/googlesitekit-dashboard.348cbecb001be51d5798.js 83 kB 0 B
dist/assets/js/googlesitekit-data.379e174a3452c48d4179.js 1.52 kB 0 B
dist/assets/js/googlesitekit-datastore-forms.8919ce8466686d194d0a.js 8.07 kB 0 B
dist/assets/js/googlesitekit-datastore-location.dec28028ffcb4c3cc17c.js 1.02 kB 0 B
dist/assets/js/googlesitekit-datastore-site.ce889250d2b3f331f558.js 11.5 kB 0 B
dist/assets/js/googlesitekit-datastore-ui.05212cc07ca890086e44.js 8.04 kB 0 B
dist/assets/js/googlesitekit-datastore-user.44929af54566570e2d77.js 16.3 kB 0 B
dist/assets/js/googlesitekit-i18n.js 3.92 kB 0 B
dist/assets/js/googlesitekit-module.a500afccd1337515fd4e.js 83.2 kB 0 B
dist/assets/js/googlesitekit-modules-adsense.d252af14413732082759.js 54.1 kB 0 B
dist/assets/js/googlesitekit-modules-analytics.2455f1a2292e216f2dbb.js 56.8 kB 0 B
dist/assets/js/googlesitekit-modules-optimize.00c3f306785b0ffa782f.js 16.3 kB 0 B
dist/assets/js/googlesitekit-modules-pagespeed-insights.247d1e6ed04a61f7f66a.js 23.3 kB 0 B
dist/assets/js/googlesitekit-modules-search-console.23190c773787db198f0b.js 19 kB 0 B
dist/assets/js/googlesitekit-modules-tagmanager.b7b2db7723df9545b188.js 30.7 kB 0 B
dist/assets/js/googlesitekit-modules.63956aecf651e115b8dd.js 15.9 kB 0 B
dist/assets/js/googlesitekit-settings.7f8d4508ebf0a20946e6.js 90.6 kB 0 B
dist/assets/js/googlesitekit-user-input.ffe25eb98b6a61dc1f27.js 87.2 kB 0 B
dist/assets/js/googlesitekit-vendor.728ea34dcfee7d74a2e3.js 234 kB 0 B
dist/assets/js/googlesitekit-widgets.e27f361c3d62d9047530.js 10.6 kB 0 B
dist/assets/js/googlesitekit-wp-dashboard.f4a551e88d11ef16499c.js 64.3 kB 0 B
dist/assets/js/runtime.11204cf5d95ff56353f0.js 763 B 0 B
dist/wpdashboard.js 454 B 0 B

compressed-size-action

@aaemnnosttv
Copy link
Collaborator

Thanks @benbowler – it looks like this is working which is great! However one thing I noticed as a feature on the compressed-size-action which is something we'll definitely want to use is the strip-hash option. This is really important for our use since the hash will change any time the resulting file changes which would undermine the whole process of comparing the size from one version to another since without this it would always see them as separate files.

This should be fairly straight forward to add, again because the action offers support for this, we just need to configure it to match our hashes so they can be stripped.

See https://github.com/preactjs/compressed-size-action#dealing-with-hashed-filenames

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

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

Great!

@felixarntz felixarntz merged commit 06882c4 into develop Mar 15, 2021
@felixarntz felixarntz deleted the enhancement/2539-extract-bundlesize branch March 15, 2021 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants