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

Add link to dashboard when Queue commands fail due to being unauthorized #2208

Merged
merged 5 commits into from
Nov 21, 2022

Conversation

OilyLime
Copy link
Contributor

@OilyLime OilyLime commented Nov 16, 2022

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Nov 16, 2022

🦋 Changeset detected

Latest commit: 28cfd45

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

@OilyLime OilyLime changed the title Add useful link to dashboard when Queue commands fail due to being un… Add link to dashboard when Queue commands fail due to being unauthorized Nov 16, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 16, 2022

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

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/3513592692/npm-package-wrangler-2208

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

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/2208/npm-package-wrangler-2208

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/3513592692/npm-package-wrangler-2208 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.developers.workers.dev/runs/3513592692/npm-package-cloudflare-pages-shared-2208

Copy link
Contributor

@JacobMGEvans JacobMGEvans left a comment

Choose a reason for hiding this comment

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

Please add a changeset

@OilyLime
Copy link
Contributor Author

Please add a changeset

Done, thanks.

Copy link
Contributor

@JacobMGEvans JacobMGEvans left a comment

Choose a reason for hiding this comment

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

Some test snapshots need to be updated it looks like. The command is npm test -w wrangler -- -u

FAIL src/__tests__/queues.test.ts
  ● wrangler › queues › create › should show link to dash when not enabled

    expect(received).toMatchInlineSnapshot(snapshot)

    Snapshot name: `wrangler queues create should show link to dash when not enabled 1`

    - Snapshot  - 0
    + Received  + 0

    @@ -7,5 +7,5 @@

        If you think this is a bug, please open an issue at:
        https://github.com/cloudflare/wrangler2/issues/new/choose

      ↵

      178 | 					runWrangler(`queues create ${queueName}`)
      179 | 				).rejects.toThrowError();
    > 180 | 				expect(std.out).toMatchInlineSnapshot(`"Creating queue testQueue.
          | 				                ^
      181 | You do not have Queues enabled on your account. Go to https://dash.staging.cloudflare.com/some-account-id/workers/queues to enable.
      182 |
      183 | X [ERROR] A request to the Cloudflare API (/accounts/some-account-id/workers/queues) failed.

      at Object.<anonymous> (src/__tests__/queues.test.ts:180:21)

@OilyLime
Copy link
Contributor Author

@JacobMGEvans Here I was, editing the snapshots by hand...

@codecov
Copy link

codecov bot commented Nov 16, 2022

Codecov Report

Merging #2208 (28cfd45) into main (0047ad3) will increase coverage by 0.00%.
The diff coverage is 90.90%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2208   +/-   ##
=======================================
  Coverage   71.79%   71.79%           
=======================================
  Files         145      146    +1     
  Lines        9452     9485   +33     
  Branches     2463     2472    +9     
=======================================
+ Hits         6786     6810   +24     
- Misses       2666     2675    +9     
Impacted Files Coverage Δ
packages/wrangler/src/queues/utils.ts 88.88% <88.88%> (ø)
packages/wrangler/src/queues/cli/commands/index.ts 100.00% <100.00%> (ø)
packages/wrangler/src/dev/local.tsx 22.48% <0.00%> (-0.82%) ⬇️
packages/wrangler/src/dev/start-server.ts 62.82% <0.00%> (-0.41%) ⬇️
packages/wrangler/src/index.tsx 83.53% <0.00%> (ø)
packages/wrangler/src/publish/publish.ts 86.20% <0.00%> (ø)
packages/wrangler/src/type-generation.ts 100.00% <0.00%> (ø)
packages/wrangler/src/dev.tsx 87.05% <0.00%> (+0.01%) ⬆️
packages/wrangler/src/bundle.ts 79.03% <0.00%> (+0.30%) ⬆️
packages/wrangler/src/pages/publish.tsx 66.27% <0.00%> (+0.81%) ⬆️
... and 2 more

@JacobMGEvans
Copy link
Contributor

@JacobMGEvans Here I was, editing the snapshots by hand...

😅 I have done that. I am glad I could provide a better workflow for you 😃

Co-authored-by: Matt Silverlock <matt@eatsleeprepeat.net>
Copy link
Contributor

@rozenmd rozenmd left a comment

Choose a reason for hiding this comment

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

FYI for future PRs: #2205

.changeset/fast-dryers-unite.md Outdated Show resolved Hide resolved
@rozenmd
Copy link
Contributor

rozenmd commented Nov 21, 2022

@OilyLime / @elithrar merge when ready

@JacobMGEvans JacobMGEvans merged commit 5bd0429 into cloudflare:main Nov 21, 2022
@github-actions github-actions bot mentioned this pull request Nov 21, 2022
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.

4 participants