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

C3: E2E logging refactor #4164

Merged
merged 10 commits into from
Oct 18, 2023
Merged

C3: E2E logging refactor #4164

merged 10 commits into from
Oct 18, 2023

Conversation

jculvey
Copy link
Contributor

@jculvey jculvey commented Oct 12, 2023

What this PR solves / how to test:

This is a long overdue rework of how we handle logging in c3 e2e tests.

The current e2e logging situation is extremely annoying. The test runner pipes output directly to stdout with minimal filtering, and since the output contains interactive cli commands it's usually cluttered with various animations and terminal escape codes. To make matters worse, tests are run in parallel and output to the same stdout, which means that the output of multiple frameworks are interleaved with one another, making almost impossible to discern where the output of the problematic test begins and ends.

This PR changes things by:

  • Formatting the output in a simpler way for non-interactive terminals (which happens to be useful outside of testing as well)
  • Giving each test its own dedicated output log. Each file gets it's own folder, and each test attempt gets its own file. If a test is retried, each attempt gets its own file
  • Fixes an issue where the cleanup script was being run as a side effect of import, often running the cleanup script more often than was required

Associated docs issue(s)/PR(s):

  • [insert associated docs issue(s)/PR(s)]

Author has included the following, where applicable:

Reviewer is to perform the following, as applicable:

  • Checked for inclusion of relevant tests
  • Checked for inclusion of a relevant changeset
  • Checked for creation of associated docs updates
  • Manually pulled down the changes and spot-tested

Note for PR author:

We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label highlight pr review so future reviewers can take inspiration and learn from it.

@jculvey jculvey requested review from a team as code owners October 12, 2023 18:35
@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2023

⚠️ No Changeset found

Latest commit: 3441e18

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

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

Click here to learn what changesets are, and how to add one.

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 12, 2023

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6563772933/npm-package-wrangler-4164

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6563772933/npm-package-wrangler-4164

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6563772933/npm-package-wrangler-4164 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6563772933/npm-package-cloudflare-pages-shared-4164

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.13.2 includes the following runtime dependencies:

Package Constraint Resolved
miniflare 3.20231016.0 3.20231016.0
workerd 1.20231016.0 1.20231016.0
workerd --version 1.20231016.0 2023-10-16

|

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #4164 (f2a347a) into main (c2457cb) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is n/a.

❗ Current head f2a347a differs from pull request most recent head 3441e18. Consider uploading reports for the commit 3441e18 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4164   +/-   ##
=======================================
  Coverage   75.37%   75.37%           
=======================================
  Files         223      223           
  Lines       12217    12217           
  Branches     3159     3159           
=======================================
  Hits         9209     9209           
  Misses       3008     3008           

@jculvey jculvey merged commit af92f9b into main Oct 18, 2023
24 checks passed
@jculvey jculvey deleted the c3-e2e-logging-refactor branch October 18, 2023 17: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.

3 participants