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

Use c8's --merge-async option when generating coverage from the root #18910

Merged
merged 3 commits into from Dec 19, 2023

Conversation

Abe27342
Copy link
Contributor

@Abe27342 Abe27342 commented Dec 19, 2023

Description

This should resolve the intermittent OOM issues we've been seeing on CI. The cause of them appears was this issue, as by default c8 attempts to merge coverage reports by loading them all into memory at the same time. Our root c8 config includes many files, so this can trigger OOM issues.

I've updated the repo to c8@8.0.1, since we needed to bump the c8 dependency anyway to use the merge-async option and the only breaking change between 7 and 8 was dropping node 10 support.

@Abe27342 Abe27342 requested review from msfluid-bot and a team as code owners December 19, 2023 17:31
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: propertydds area: dds: sharedstring area: dds: tree area: dev experience Improving the experience of devs building on top of fluid area: driver Driver related issues area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: loader Loader related issues area: odsp-driver area: runtime Runtime related issues area: server Server related issues (routerlicious) area: tests Tests to add, test infrastructure improvements, etc dependencies Pull requests that update a dependency file base: main PRs targeted against main branch labels Dec 19, 2023
Copy link
Contributor

@alexvy86 alexvy86 left a comment

Choose a reason for hiding this comment

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

Tangent to this PR: I question a bit if we should have c8 as a devDependency on every package? The way we do test coverage is by running with c8 from the root package.json and just running test:mocha or similar on each package. Some packages do have a test:coverage script that uses c8 but AFAIK we don't leverage them?

@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Dec 19, 2023

@fluid-example/bundle-size-tests: +253 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 734.91 KB 734.96 KB +44 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 533.55 KB 533.57 KB +22 Bytes
loader.js 178.56 KB 178.58 KB +22 Bytes
map.js 552.1 KB 552.13 KB +33 Bytes
matrix.js 651.61 KB 651.64 KB +33 Bytes
odspDriver.js 99.31 KB 99.34 KB +22 Bytes
odspPrefetchSnapshot.js 52.39 KB 52.41 KB +11 Bytes
sharedString.js 669.3 KB 669.33 KB +33 Bytes
sharedTree.js 780.39 KB 780.41 KB +22 Bytes
Total Size 4.27 MB 4.27 MB +253 Bytes

Baseline commit: 837c4ba

Generated by 🚫 dangerJS against f5ceeac

@Abe27342 Abe27342 requested review from a team as code owners December 19, 2023 18:22
@Abe27342
Copy link
Contributor Author

Tangent to this PR: I question a bit if we should have c8 as a devDependency on every package? The way we do test coverage is by running with c8 from the root package.json and just running test:mocha or similar on each package. Some packages do have a test:coverage script that uses c8 but AFAIK we don't leverage them?

yeah. it seems weird to me too.

@Abe27342 Abe27342 merged commit 646263a into microsoft:main Dec 19, 2023
33 checks passed
@Abe27342 Abe27342 deleted the fix-coverage branch December 19, 2023 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds: propertydds area: dds: sharedstring area: dds: tree area: dds Issues related to distributed data structures area: dev experience Improving the experience of devs building on top of fluid area: driver Driver related issues area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: loader Loader related issues area: odsp-driver area: runtime Runtime related issues area: server Server related issues (routerlicious) area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants