Skip to content

test(bundlers): add node webpack tests, expand edge coverage, assert known protobuf failures#6482

Merged
overbalance merged 8 commits intoopen-telemetry:mainfrom
embrace-io:overbalance/add-more-webpack-tests
Mar 24, 2026
Merged

test(bundlers): add node webpack tests, expand edge coverage, assert known protobuf failures#6482
overbalance merged 8 commits intoopen-telemetry:mainfrom
embrace-io:overbalance/add-more-webpack-tests

Conversation

@overbalance
Copy link
Copy Markdown
Contributor

@overbalance overbalance commented Mar 7, 2026

Which problem is this PR solving?

The existing webpack bundler tests use browser-based HTML testing which is unnecessarily complex. Additionally, there is no test coverage for Node.js webpack bundles. The Next.js edge bundler tests also had limited OTel package coverage.

Depends on #6481

Short description of the changes

  • Simplify existing browser webpack 4/5 bundler tests: replace HTML/browser-based testing with programmatic bundle validation
  • Add new Node.js webpack 4/5 bundler test packages (bundler-tests/node/webpack-4, bundler-tests/node/webpack-5)
  • Expand OTel package coverage in the Next.js 15/16 edge bundler tests to match the webpack tests (api, api-logs, sdk-logs, exporter-logs-otlp-http)
  • Assert known protobuf dynamic-require failures in nextjs-15-edge and node/webpack-4: tests now pass while the bug is present and will break when it is fixed, prompting cleanup

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • npm run test:bundle

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@overbalance overbalance requested review from a team as code owners March 7, 2026 19:36
@overbalance overbalance added the browser Browser-specific additions or benefits label Mar 7, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.73%. Comparing base (dc93ed4) to head (8848ca9).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6482   +/-   ##
=======================================
  Coverage   95.73%   95.73%           
=======================================
  Files         364      364           
  Lines       12104    12104           
  Branches     2887     2887           
=======================================
  Hits        11588    11588           
  Misses        516      516           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@overbalance overbalance marked this pull request as draft March 10, 2026 02:20
@overbalance
Copy link
Copy Markdown
Contributor Author

Putting back into Draft because #6481 didn't address all the webpack errors found with the new tests in this PR.

@overbalance overbalance changed the title test(bundlers): simplify and add more webpack test packages WIP test(bundlers): simplify and add more webpack test packages Mar 17, 2026
@overbalance overbalance force-pushed the overbalance/add-more-webpack-tests branch from ae3eb67 to 137d5de Compare March 23, 2026 23:16
@overbalance overbalance force-pushed the overbalance/add-more-webpack-tests branch from 137d5de to 0e1b726 Compare March 23, 2026 23:36
@overbalance overbalance changed the title WIP test(bundlers): simplify and add more webpack test packages test(bundlers): add node webpack tests, expand edge coverage, assert known protobuf failures Mar 24, 2026
@overbalance overbalance marked this pull request as ready for review March 24, 2026 00:44
Copy link
Copy Markdown
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

thx! great to have node bundler tests too now 🙌

@overbalance overbalance added this pull request to the merge queue Mar 24, 2026
Merged via the queue into open-telemetry:main with commit b842717 Mar 24, 2026
27 checks passed
@overbalance overbalance deleted the overbalance/add-more-webpack-tests branch March 24, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

browser Browser-specific additions or benefits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants