Skip to content

Conversation

@manzoorwanijk
Copy link
Member

@manzoorwanijk manzoorwanijk commented May 11, 2022

After the introduction of TypeScript, we need to ensure that no PR breaks any TS types like #24276 (comment) did.

Changes proposed in this Pull Request:

  • Add build script to js-packages/components
  • Add TS check to build process for js-packages/components, plugins/boost and plugins/jetpack for now.
  • Use concurrently for TS checks to avoid it increasing build time

Jetpack product discussion

See Next Steps and the related discussion in comments in #24294

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Add a TS error on purpose in some TS component in js-packages
    • For example use clasName instead of className in projects/js-packages/components/components/record-meter-bar/index.tsx
  • Run jetpack build js-packages/components -v
  • Confirm that you see the TS error introduced above
  • Do something similar in projects/plugins/jetpack/_inc/client/at-a-glance/backup-upgrade/bar-chart.tsx
  • Run jetpack build plugins/jetpack -v
  • Confirm that you see the TS error
  • Remove any introduced TS errors
  • Run the above build commands again
  • Run jetpack build --all
  • Confirm that there is no TS error

Note: Initially the build should fail because we have TS errors in master which are being fixed in #24294
So, we need to fix those TS errors and merge into master before this PR can be merged.

@manzoorwanijk manzoorwanijk added the [Status] Needs Review This PR is ready for review. label May 11, 2022
@manzoorwanijk manzoorwanijk requested review from a team and anomiex May 11, 2022 08:47
@manzoorwanijk manzoorwanijk self-assigned this May 11, 2022
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello manzoorwanijk! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D80527-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@github-actions github-actions bot added [JS Package] Components [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Admin Page React-powered dashboard under the Jetpack menu RNA labels May 11, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 11, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: June 7, 2022.
  • Scheduled code freeze: May 31, 2022.

Boost plugin:

  • Next scheduled release: June 7, 2022.
  • Scheduled code freeze: May 30, 2022.

Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Build changes seem ok, but we'll have to wait until the build is actually passing to get any idea of the effect of this change on the build time.

@anomiex anomiex added [Status] In Progress and removed [Status] Needs Review This PR is ready for review. labels May 12, 2022
@github-actions github-actions bot added the [Plugin] Boost A feature to speed up the site and improve performance. label May 18, 2022
@manzoorwanijk manzoorwanijk requested a review from anomiex May 18, 2022 07:38
@manzoorwanijk manzoorwanijk added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels May 18, 2022
@manzoorwanijk
Copy link
Member Author

Build changes seem ok, but we'll have to wait until the build is actually passing to get any idea of the effect of this change on the build time.

@anomiex may be have a look at this now since the build is all green?

* The formatting style for legend item display. If not provided, it defaults to showing legend label after count
*/
showLegendLabelBeforeCount: boolean;
showLegendLabelBeforeCount?: boolean;
Copy link
Member Author

Choose a reason for hiding this comment

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

More info here #24474 (comment)

Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Looks like it adds ~8 seconds of work for js-packages/components (plus a bunch more for the composer update, sigh), ~8 seconds of work for plugins/boost, and ~65 for plugins/jetpack. The last is most unfortunate, since the high degree of parallelism already in Jetpack's build probably means the CPUs are already maxed out.

As for actual timing, it's hard to tell. The latest run on this PR took 9 minutes for the build step versus 8 for master on the parent branch (fortunately this PR built everything so those are directly comparable). Other builds of the branch have ranged from 8:30 to 11. But due to whatever random factors are involved I see other recent master builds have ranged even higher. So 🤷

@manzoorwanijk manzoorwanijk merged commit eb821d5 into master May 26, 2022
@manzoorwanijk manzoorwanijk deleted the update/add-ts-check-to-build-process branch May 26, 2022 15:57
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D80527-code, and deploy it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label May 26, 2022
@manzoorwanijk
Copy link
Member Author

r246416-wpcom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Page React-powered dashboard under the Jetpack menu [JS Package] Components [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ RNA Touches WP.com Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants