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] chore: fix dependabot so that it used the correct package version #5151

Merged
merged 5 commits into from
Mar 6, 2024

Conversation

dario-piotrowicz
Copy link
Member

What this PR solves / how to test

Currently our dependabot workflow is flawed and uses outdated version of framework
CLIs as you can see from this PR's description: #5149

This is due to the wrong checkout performed in the e2e-only-dependabot-bumped-framework step which uses the version of the package.json file from main instead of getting the updated one.

This PR fixes such behavior.

Author has addressed the following

@dario-piotrowicz dario-piotrowicz requested a review from a team as a code owner March 4, 2024 19:12
Copy link

changeset-bot bot commented Mar 4, 2024

⚠️ No Changeset found

Latest commit: 030809f

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

Copy link
Contributor

github-actions bot commented Mar 4, 2024

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/8176127369/npm-package-wrangler-5151

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8176127369/npm-package-wrangler-5151 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8176127369/npm-package-create-cloudflare-5151 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8176127369/npm-package-cloudflare-kv-asset-handler-5151
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8176127369/npm-package-miniflare-5151
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8176127369/npm-package-cloudflare-pages-shared-5151
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8176127369/npm-package-cloudflare-vitest-pool-workers-5151

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


wrangler@3.31.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240223.1
workerd 1.20240304.0 1.20240304.0
workerd --version 1.20240304.0 2024-03-04

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

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.36%. Comparing base (4194495) to head (030809f).
Report is 23 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5151      +/-   ##
==========================================
+ Coverage   70.31%   70.36%   +0.04%     
==========================================
  Files         298      298              
  Lines       15550    15567      +17     
  Branches     4000     4007       +7     
==========================================
+ Hits        10934    10953      +19     
+ Misses       4616     4614       -2     

see 8 files with indirect coverage changes

@@ -55,7 +55,8 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 3
ref: ${{ github.head_ref }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the correct fix is to change the trigger to pull_request rather than pull_request_target, which according to the docs runs the job in the context of the base of the PR rather than the HEAD.

Copy link
Member Author

Choose a reason for hiding this comment

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

sounds reasonable to me, thanks 🙂

I've update the trigger, please have another look 🙏

@@ -55,7 +60,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
Copy link
Member Author

@dario-piotrowicz dario-piotrowicz Mar 5, 2024

Choose a reason for hiding this comment

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

Note: 0 would also work but it seems quite unnecessary in my opinion since it fetches everything (https://github.com/actions/checkout)

Screenshot 2024-03-05 at 13 29 51

but I'm happy to use 0 if we find it more clear/robust and don't care about the extra fetching, please let me know what you think 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

We've been going with 0 because it guarantees that all the tags are also there, and generally no one is complaining about performance. So I would err on that side. It is very confusing if something is missing from the cloned repo because the errors are a bit vague.

Copy link
Member Author

@dario-piotrowicz dario-piotrowicz Mar 6, 2024

Choose a reason for hiding this comment

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

ok, changed to 0 🙂👍

@@ -55,7 +60,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
Copy link
Contributor

Choose a reason for hiding this comment

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

We've been going with 0 because it guarantees that all the tags are also there, and generally no one is complaining about performance. So I would err on that side. It is very confusing if something is missing from the cloned repo because the errors are a bit vague.

@petebacondarwin petebacondarwin merged commit cddbaef into main Mar 6, 2024
15 checks passed
@petebacondarwin petebacondarwin deleted the c3-dependabot-version-check-fix branch March 6, 2024 20:37
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.

2 participants