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

[infra] Replace lerna run with top-level wireit scripts #3098

Merged
merged 19 commits into from Jun 29, 2022
Merged

Conversation

aomarks
Copy link
Member

@aomarks aomarks commented Jun 28, 2022

Replaces all lerna run scripts with wireit scripts.

Benefits

  • Increased parallelism during build/test.

  • We'll now only be using Lerna for bootstrapping, so we can replace it with npm workspaces in a followup PR.

  • It's now easier to figure out which packages failed, because the log statements will say e.g. [packages/lit-html:build] Failed ... instead of [build] Failed.

Enumerated packages

This does include some long enumerations of packages. Once we have google/wireit#23, we could replace this with something like:

  "wireit": {
    "test": {
      "dependencies": [
        {
          "script": "test",
          "packages": "workspaces"
        }
      ]
    }
  }

However, we currently exclude some packages, e.g. we don't run lit-html/lit-element package tests, because they are subsumed by the tests package. Previously we excluded them with Lerna --ignore flags. Now they are just not in the list.

Maybe once we have the above Wireit feature, we could add test:ci scripts, which would not be present in the case of packages whose tests we don't want to run in CI.

Also

  • Fixes an incorrect virtualizer output path.

  • Fixes an output issue where the lit-html build:version-stability-test config was emitting polyfill-support.js, which collided with the same file emitted by build:rollup.

  • Bumps the wtr tests finished timeout. Running both the SSR and main browser tests in parallel makes tests take longer. I guess because of resource starvation.

  • Added some additional dependencies to the new testing package.

Fixes #2724
Part of #3093

@changeset-bot
Copy link

changeset-bot bot commented Jun 28, 2022

🦋 Changeset detected

Latest commit: 9843932

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

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

Not sure what this means? Click here to learn what changesets are.

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

@github-actions
Copy link
Contributor

github-actions bot commented Jun 28, 2022

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -2% - +1% (-0.45ms - +0.35ms)
    this-change vs tip-of-tree

render

  • lit-element-list: unsure 🔍 -1% - +2% (-0.76ms - +1.30ms)
    this-change vs tip-of-tree
  • lit-html-kitchen-sink: unsure 🔍 -1% - +0% (-0.23ms - +0.13ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -2% - +2% (-0.24ms - +0.19ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -2% - +2% (-1.20ms - +1.05ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +2% (-0.73ms - +1.07ms)
    this-change vs tip-of-tree

update

  • lit-element-list: unsure 🔍 -0% - +1% (-1.72ms - +6.42ms)
    this-change vs tip-of-tree
  • lit-html-kitchen-sink: unsure 🔍 -3% - +3% (-2.06ms - +2.40ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -1% - +1% (-3.33ms - +3.23ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -1% - +2% (-0.94ms - +1.90ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -0% - +1% (-3.12ms - +6.71ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: unsure 🔍 -0% - +1% (-2.71ms - +6.45ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -2% - +0% (-16.53ms - +2.43ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
72.61ms - 73.78ms-unsure 🔍
-1% - +2%
-0.76ms - +1.30ms
faster ✔
20% - 22%
18.69ms - 20.84ms
tip-of-tree
tip-of-tree
72.08ms - 73.78msunsure 🔍
-2% - +1%
-1.30ms - +0.76ms
-faster ✔
20% - 23%
18.79ms - 21.27ms
previous-release
previous-release
92.06ms - 93.86msslower ❌
25% - 29%
18.69ms - 20.84ms
slower ❌
26% - 29%
18.79ms - 21.27ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
689.28ms - 695.59ms-unsure 🔍
-0% - +1%
-1.72ms - +6.42ms
faster ✔
6% - 7%
42.63ms - 52.51ms
tip-of-tree
tip-of-tree
687.51ms - 692.66msunsure 🔍
-1% - +0%
-6.42ms - +1.72ms
-faster ✔
6% - 7%
45.32ms - 54.52ms
previous-release
previous-release
736.20ms - 743.81msslower ❌
6% - 8%
42.63ms - 52.51ms
slower ❌
7% - 8%
45.32ms - 54.52ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
706.02ms - 713.30ms-unsure 🔍
-0% - +1%
-2.71ms - +6.45ms
faster ✔
4% - 5%
28.79ms - 37.67ms
tip-of-tree
tip-of-tree
705.01ms - 710.57msunsure 🔍
-1% - +0%
-6.45ms - +2.71ms
-faster ✔
4% - 5%
31.33ms - 38.87ms
previous-release
previous-release
740.34ms - 745.44msslower ❌
4% - 5%
28.79ms - 37.67ms
slower ❌
4% - 6%
31.33ms - 38.87ms
-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
28.36ms - 28.59ms-unsure 🔍
-1% - +0%
-0.23ms - +0.13ms
faster ✔
14% - 18%
4.75ms - 6.38ms
tip-of-tree
tip-of-tree
28.38ms - 28.66msunsure 🔍
-0% - +1%
-0.13ms - +0.23ms
-faster ✔
14% - 18%
4.70ms - 6.33ms
previous-release
previous-release
33.23ms - 34.84msslower ❌
17% - 22%
4.75ms - 6.38ms
slower ❌
16% - 22%
4.70ms - 6.33ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
77.80ms - 80.99ms-unsure 🔍
-3% - +3%
-2.06ms - +2.40ms
faster ✔
1% - 8%
1.13ms - 6.71ms
tip-of-tree
tip-of-tree
77.66ms - 80.78msunsure 🔍
-3% - +3%
-2.40ms - +2.06ms
-faster ✔
2% - 8%
1.32ms - 6.87ms
previous-release
previous-release
81.03ms - 85.61msslower ❌
1% - 9%
1.13ms - 6.71ms
slower ❌
2% - 9%
1.32ms - 6.87ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
25.96ms - 26.38ms-unsure 🔍
-2% - +1%
-0.45ms - +0.35ms
faster ✔
11% - 14%
3.10ms - 4.09ms
tip-of-tree
tip-of-tree
25.88ms - 26.57msunsure 🔍
-1% - +2%
-0.35ms - +0.45ms
-faster ✔
10% - 14%
2.97ms - 4.11ms
previous-release
previous-release
29.31ms - 30.21msslower ❌
12% - 16%
3.10ms - 4.09ms
slower ❌
11% - 16%
2.97ms - 4.11ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
10.31ms - 10.62ms-unsure 🔍
-2% - +2%
-0.24ms - +0.19ms
faster ✔
9% - 12%
1.08ms - 1.41ms
tip-of-tree
tip-of-tree
10.34ms - 10.64msunsure 🔍
-2% - +2%
-0.19ms - +0.24ms
-faster ✔
9% - 12%
1.06ms - 1.38ms
previous-release
previous-release
11.64ms - 11.77msslower ❌
10% - 14%
1.08ms - 1.41ms
slower ❌
10% - 13%
1.06ms - 1.38ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
272.96ms - 277.65ms-unsure 🔍
-1% - +1%
-3.33ms - +3.23ms
faster ✔
26% - 28%
97.75ms - 104.18ms
tip-of-tree
tip-of-tree
273.07ms - 277.64msunsure 🔍
-1% - +1%
-3.23ms - +3.33ms
-faster ✔
26% - 28%
97.74ms - 104.08ms
previous-release
previous-release
374.07ms - 378.46msslower ❌
35% - 38%
97.75ms - 104.18ms
slower ❌
35% - 38%
97.74ms - 104.08ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
52.49ms - 53.75ms-unsure 🔍
-2% - +2%
-1.20ms - +1.05ms
faster ✔
17% - 20%
10.58ms - 13.47ms
tip-of-tree
tip-of-tree
52.26ms - 54.12msunsure 🔍
-2% - +2%
-1.05ms - +1.20ms
-faster ✔
16% - 21%
10.36ms - 13.55ms
previous-release
previous-release
63.85ms - 66.44msslower ❌
20% - 25%
10.58ms - 13.47ms
slower ❌
19% - 26%
10.36ms - 13.55ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
112.41ms - 114.56ms-unsure 🔍
-1% - +2%
-0.94ms - +1.90ms
faster ✔
13% - 16%
17.60ms - 21.01ms
tip-of-tree
tip-of-tree
112.07ms - 113.94msunsure 🔍
-2% - +1%
-1.90ms - +0.94ms
-faster ✔
14% - 16%
18.16ms - 21.41ms
previous-release
previous-release
131.46ms - 134.11msslower ❌
15% - 19%
17.60ms - 21.01ms
slower ❌
16% - 19%
18.16ms - 21.41ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
53.97ms - 55.47ms-unsure 🔍
-1% - +2%
-0.73ms - +1.07ms
unsure 🔍
-1% - +2%
-0.39ms - +1.30ms
tip-of-tree
tip-of-tree
54.06ms - 55.04msunsure 🔍
-2% - +1%
-1.07ms - +0.73ms
-unsure 🔍
-1% - +2%
-0.35ms - +0.92ms
previous-release
previous-release
53.87ms - 54.66msunsure 🔍
-2% - +1%
-1.30ms - +0.39ms
unsure 🔍
-2% - +1%
-0.92ms - +0.35ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
691.89ms - 698.93ms-unsure 🔍
-0% - +1%
-3.12ms - +6.71ms
unsure 🔍
-0% - +1%
-1.93ms - +8.22ms
tip-of-tree
tip-of-tree
690.19ms - 697.04msunsure 🔍
-1% - +0%
-6.71ms - +3.12ms
-unsure 🔍
-1% - +1%
-3.66ms - +6.36ms
previous-release
previous-release
688.61ms - 695.92msunsure 🔍
-1% - +0%
-8.22ms - +1.93ms
unsure 🔍
-1% - +1%
-6.36ms - +3.66ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
783.79ms - 798.96ms-unsure 🔍
-2% - +0%
-16.53ms - +2.43ms
unsure 🔍
-2% - +1%
-14.19ms - +4.58ms
tip-of-tree
tip-of-tree
792.74ms - 804.11msunsure 🔍
-0% - +2%
-2.43ms - +16.53ms
-unsure 🔍
-1% - +1%
-5.68ms - +10.17ms
previous-release
previous-release
790.66ms - 801.71msunsure 🔍
-1% - +2%
-4.58ms - +14.19ms
unsure 🔍
-1% - +1%
-10.17ms - +5.68ms
-

tachometer-reporter-action v2 for Benchmarks

@@ -226,7 +226,7 @@ const config: TestRunnerConfig = {
// enough so that blocked tests have time to wait for all previous test files
// to run to completion.
testsStartTimeout: 60000 * 10, // default 120000
testsFinishTimeout: 120000, // default 20000
testsFinishTimeout: 180000, // default 20000
Copy link
Collaborator

Choose a reason for hiding this comment

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

why would this change require a longer timeout?

Copy link
Member Author

@aomarks aomarks Jun 28, 2022

Choose a reason for hiding this comment

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

See PR description. I think it's because both tests:test and labs/ssr:test are now running in parallel, so there must be some resource starvation that causes the test to take longer. It seemed to particularly affect Firefox.

Copy link
Member Author

Choose a reason for hiding this comment

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

I bumped it even higher, to make it pass reliably. I think this is just a contention thing. But the good news is that overall test time seems lower: latest full run of the test step was 7m28s, compared to 9m58s on the most recent commit on main.

Copy link
Member

@augustjk augustjk left a comment

Choose a reason for hiding this comment

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

This is great!

@aomarks
Copy link
Member Author

aomarks commented Jun 28, 2022

Also added these items:

  • Fixes an output issue where the lit-html build:version-stability-test config was emitting polyfill-support.js, which collided with the same file emitted by build:rollup.

  • Temporarily skip a flaky virtualizer test ([labs/virtualizer] flaky indices test #3099).

@aomarks
Copy link
Member Author

aomarks commented Jun 28, 2022

Oh and also:

@aomarks aomarks closed this Jun 28, 2022
@aomarks
Copy link
Member Author

aomarks commented Jun 28, 2022

Oops, did not mean to close.

@aomarks aomarks reopened this Jun 28, 2022
@aomarks aomarks force-pushed the root-wireit branch 2 times, most recently from 47fd60f to 9843932 Compare June 29, 2022 20:19
@aomarks
Copy link
Member Author

aomarks commented Jun 29, 2022

@augustjk I also included some tweaks to the new testing package wireit config to add some extra dependencies. Also added it to the top-level scripts. PTAL!

@aomarks aomarks requested a review from augustjk June 29, 2022 20:20
Copy link
Member

@augustjk augustjk left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the labs/testing wireit configs!

@aomarks aomarks merged commit d705af4 into main Jun 29, 2022
@aomarks aomarks deleted the root-wireit branch June 29, 2022 20:48
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.

[infra] Convert Lit monorepo to Wireit
3 participants