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

Log file fixes #4488

Merged
merged 7 commits into from
Nov 22, 2023
Merged

Log file fixes #4488

merged 7 commits into from
Nov 22, 2023

Conversation

RamIdeas
Copy link
Contributor

Fixes #4482.

What this PR solves / how to test:

Changes the default directory wrangler writes log files to.

Also writes the log file location to stderr (as warning) to avoid polluting stdout (some commands print json to stdout). Further, now only prints when the log file contains an error message to avoid pointing the user to this file unnecessarily.

Author has addressed the following:

  • Tests
    • Included
    • Not necessary because: minor changes
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because:
  • Associated docs
    • Issue(s)/PR(s):
    • Not necessary because:

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.

instead of project root .wrangler
frameworks may be watching the project root .wrangler dir for changes
causing an infinite loop of update logs
e.g. #4482
+ update log emoji to 🪵 instead of 🐛
since it's not just a debug log file anymore
@RamIdeas RamIdeas requested a review from a team as a code owner November 22, 2023 14:09
Copy link

changeset-bot bot commented Nov 22, 2023

🦋 Changeset detected

Latest commit: b953b3f

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

This PR includes changesets to release 1 package
Name Type
wrangler Patch

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

Copy link
Contributor

github-actions bot commented Nov 22, 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/6961188089/npm-package-wrangler-4488

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.17.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20231030.1
workerd 1.20231030.0 1.20231030.0
workerd --version 1.20231030.0 2023-10-30

|

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

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Merging #4488 (b953b3f) into main (382ef8f) will decrease coverage by 0.02%.
Report is 1 commits behind head on main.
The diff coverage is 25.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4488      +/-   ##
==========================================
- Coverage   75.27%   75.26%   -0.02%     
==========================================
  Files         226      226              
  Lines       12568    12570       +2     
  Branches     3260     3261       +1     
==========================================
  Hits         9461     9461              
- Misses       3107     3109       +2     
Files Coverage Δ
packages/wrangler/src/logger.ts 96.87% <100.00%> (ø)
packages/wrangler/src/utils/log-file.ts 40.42% <18.18%> (ø)

... and 4 files with indirect coverage changes

since it's now in the home directory, no longer near the cwd
so not to have include the *very* visible bright-yellow [WARNING] indicator
Copy link
Contributor

@penalosa penalosa left a comment

Choose a reason for hiding this comment

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

🎉

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

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

LGTM

@RamIdeas RamIdeas merged commit 3bd5723 into main Nov 22, 2023
17 checks passed
@RamIdeas RamIdeas deleted the log-file-fixes branch November 22, 2023 18:25
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.

🐛 BUG: Wrangler is updating indefinitely to logs
4 participants