-
Notifications
You must be signed in to change notification settings - Fork 3
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
[GH Request] Add support for bundle size CI checks #837
Comments
Thank you for your report! @openedx/axim-oncall will triage within a business day. Simple requests usually take 2-3 business days to resolve; more complex requests could take longer. |
@arbrandes, @brian-smith-tcril: Any thoughts on this particular integration? This certainly seems reasonable to me, but I'm not knowledgable about the frontend ecosystem. |
After some discovery and discussion, I think we have a decent sense of what a path forward for this looks like.
There was also discussion around having all of the repos reference one workflow. I'm not sure how that fits in with the commented-out edit: should just be able to pass a bool through to jobs:
bundlewatch:
continue-on-error: true
uses: openedx/.github/.github/workflows/bundlewatch.yml@master or if that doesn't work, we can try using jobs:
bundlewatch:
uses: openedx/.github/.github/workflows/bundlewatch.yml@master
with:
shouldContinueOnError: true and have the shared workflow use continue-on-error: shouldContinueOnError |
@PKulkoRaccoonGang requested https://www.codechecks.io/ couple notable things about CodeChecks from the https://www.codechecks.io/ homepage:
from https://github.com/codechecks/docs
|
I drafted an ADR for this openedx/open-edx-proposals#515 |
@adamstankiewicz can you review openedx/open-edx-proposals#515 and see if it meets your needs. Once we have agreement and the decision lands, we can figure out the implementation steps. |
@feanil @brian-smith-tcril Left a few comments, but overall LGTM; approved! |
@brian-smith-tcril is there more to be done on this ticket? |
I believe the next step would be to choose a repo to pilot the integration with. I think that could work as a separate request, so closing this one seems reasonable to me. |
Firm Name
2U
Urgency
Low (2 weeks)
Problem/Request
Open edX has not had a large focus on optimizing MFE performance in terms of best practices such as bundle and code splitting. Keeping an eye on bundle size is easily forgotten and, if not managed, can become a performance bottleneck for users.
One potential way to mitigate this is to make use of CI checks around bundle size, to alert developers when their contributions have negative affects on the standards set (per repo) related to asset size in the resulting output in the
dist
directory from runningnpm run build
.For example, the two primary tools for this are bundlewatch and bundlesize.
I believe both would require a CI auth variable to be set up for the GitHub organization, for example:
By exposing the
BUNDLEWATCH_GITHUB_TOKEN
auth variable (if we opted forbundlewatch
), maintainers of repos could:bundlewatch.config.js
) to define the rules around bundle size for their specific repo and use cases.package.json
to runbundlewatch
CLI.This request is primarily to make it possible to use a tool such as bundlewatch/bundlesize in the
openedx
GitHub organization; the decision to use it would remain with maintainers/owning teams of repos; though if we find value in it, could recommend its use more broadly.Reasoning
Hypothesis: more proactive observability around frontend repos' bundle size for production builds should lead to more focus on frontend performance in terms of bundle/code splitting to keep the bundle/asset size for owned repos in check. Failing a PR's CI due to a contribution's code leading to file(s) going over a predefined, reasonable limit should help frontend engineers more proactively consider the performance impacts of their code.
The text was updated successfully, but these errors were encountered: