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

Dependabot enforcing engine-strict but with an old npm on Action Runners in last few days #10982

Closed
1 task done
broksonic21 opened this issue Nov 21, 2024 · 23 comments
Closed
1 task done
Assignees
Labels
L: javascript T: bug 🐞 Something isn't working

Comments

@broksonic21
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

npm

Package manager version

9

Language version

22

Manifest location and content before the Dependabot update

package.json:

    "engines": {
        "node": ">=20",
        "npm": ">=9"
      },

with .npmrc:

engine-strict=true

see

/~https://github.com/broksonic21/dependabot-engine

dependabot.yml content

/~https://github.com/broksonic21/dependabot-engine/blob/main/.github/dependabot.yml

Updated dependency

No response

What you expected to see, versus what you actually saw

In the last day or so, this started happening from dependabot and fails to run at all - silently, unless you look at the dependabot UI. Note: this only happens with dependabot on github action runners - i wasn't able to repro this if I turn off github action runners.

See: /~https://github.com/broksonic21/dependabot-engine/network/updates/920658676

Note: the error message says NPM 10.8.2.
But the logs say you are running npm 8.19.4

We required npm 9 and above -> and all of a sudden all our dependabot runs fail to run.

Can this get fixed up (both the messaging, and the fact that you are running on an old version)

Dependabot can't resolve your JavaScript dependency files
Dependabot failed to update your dependencies because there was an error resolving your JavaScript dependency files.

Dependabot encountered the following error:

Dependabot uses Node.js v20.18.0 and NPM 10.8.2. Due to the engine-strict setting, the update will not succeed.

Logs show:

npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: PACKAGEOBFUSCATED
npm ERR! notsup Not compatible with your version of node/npm: PACKAGEOBFUSCATED
npm ERR! notsup Required: {"node":">=20","npm":">=9"}
npm ERR! notsup Actual:   {"npm":"8.19.4","node":"v20.18.1"}

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

/~https://github.com/broksonic21/dependabot-engine/network/updates/920658676

Smallest manifest that reproduces the issue

No response

@broksonic21 broksonic21 added the T: bug 🐞 Something isn't working label Nov 21, 2024
@broksonic21
Copy link
Author

Looking at our logs

Was fine on


ghcr.io/dependabot/dependabot-updater-npm:4aba3e3be780a68c1d948d2daf365c2a71e69b2b

ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy:v2.0.20241004183849@sha256:5e895b5edfaba72e99d0a19b43f386b18b65fc08a2d43af5aedd6360cda56842



Failing on

ghcr.io/dependabot/dependabot-updater-npm:5c6c676dd9a1055774bc95c4a4d2f38513f1ac50.

ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy:v2.0.20241004183849@sha256:5e895b5edfaba72e99d0a19b43f386b18b65fc08a2d43af5aedd6360cda56842

@Nishnha
Copy link
Member

Nishnha commented Nov 21, 2024

I searched for the error and saw 52 events in the last hour. So it seems fairly common

I think it might be related to this change in Core #10944

@broksonic21
Copy link
Author

if that ticket is it, looks like it's behind a feature flag. as a customer, can we opt out of that flag in the meantime? or is there a corepack version file we need to have in our repo to avoid this?

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 21, 2024

Hi @broksonic21,

Could I get the lockfileVersion field from package-lock.json file? While we are working on a general solution, confirming this detail would help ensure that our fix addresses the specific issue they're encountering.

CC: @abdulapopoola , @carlincherry

@kbukum1 kbukum1 moved this to In Progress in Dependabot Nov 21, 2024
@kbukum1 kbukum1 self-assigned this Nov 21, 2024
@kbukum1
Copy link
Contributor

kbukum1 commented Nov 21, 2024

Hi @broksonic21 and @carlincherry,

The change has been deployed. If the lockfileVersion field in their package-lock.json is 3, the issue should now be resolved for them. Once we receive this information, we can confirm this has been fixed.

CC: @abdulapopoola

@broksonic21
Copy link
Author

.npmrc:

lockfile-version=3

in package-lock:

 "lockfileVersion": 3,

@broksonic21
Copy link
Author

This made it way worse unfortunately @kbukum1

One repo is getting lock file v1 locks now, with update PRs for packages that are already up to date

other repos are just plain failing with no noticeable log on why, just say unknown error from dependabot.

I’m happy to hop on a repro call tomorrow if it helps, or even later this evening.

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 22, 2024

Hi @broksonic21 ,

I am unable to view the log because of permission. Will it be possible if you can share logs with me?

URL: /~https://github.com/broksonic21/dependabot-engine/network/updates/920865298

@broksonic21
Copy link
Author

broksonic21 commented Nov 22, 2024

Example pr after this change:

/~https://github.com/broksonic21/repro-increase-dependabot-grouped/pull/5/files

note: seeing this in every repo, work and personal, that’s on lock file 3.

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 22, 2024

Hi @broksonic21 ,

I checked the last error and I saw the following error. Will it be possible to use rerun the process through Insight -> Dependency Graph -> Dependabot -> by clicking the button "Recent update jobs" for [package.json]?

updater | 2024/11/22 00:11:45 ERROR <job_920865298> Error during file fetching; aborting: /package.json not parseable

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 22, 2024

Hi @broksonic21,

It looks like the problem has been resolved. Please let me know if you encounter any further issues. If everything is working as expected, we’ll proceed to close this issue.

Image

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 22, 2024

/~https://github.com/broksonic21/repro-increase-dependabot-grouped/pull/5/files

I see the problem here. Checking this one.

@broksonic21
Copy link
Author

@kbukum1 I fixed that issue, but it is still broken.

see broksonic21/dependabot-engine#17

it is reverting to lock file 1…

and repos that doesn’t work on are just failing

I can meet at 5:30 your time to show you if that works.

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 22, 2024

Hi @broksonic21,

The feature has been disabled, so it should now work as how it was working before. We are currently investigating the issue on our end to identify a solution. This behavior occurs when running npm 10 on your repository ( or some similar repositories), even though the lockfileVersion is set to 3.

@broksonic21
Copy link
Author

@kbukum1 Thanks - I can confirm that fixed our work repos and my test repos - both the ones creating wrong PRs/reverting to lockfile 1, and the ones that wouldn’t run at all (likely because they used a feature that whatever npm/lockfile 1 version was running didn’t support)

Thanks for diligence and quick follow up!

I’ll leave my test repos up and happy to test again if you have a potential fix.

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 22, 2024

@kbukum1 Thanks - I can confirm that fixed our work repos and my test repos - both the ones creating wrong PRs/reverting to lockfile 1, and the ones that wouldn’t run at all (likely because they used a feature that whatever npm/lockfile 1 version was running didn’t support)

Thanks for diligence and quick follow up!

I’ll leave my test repos up and happy to test again if you have a potential fix.

Thank @broksonic21 for reporting that quickly and providing information.

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 25, 2024

@broksonic21 ,

The change is completed and enabled for your test repositories.

Is it possible if you can check everything is ok? If everything is ok we plan to rollout the feature.

@broksonic21
Copy link
Author

@kbukum1 that looks right on my both my test repositories. Let me know after you rollout and we can confirm the work ones too. Else @carlincherry has my contact info if you want to reach out and test their first

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 25, 2024

Thank you for quick check.

I am going to rollout soon. I will let you know when the rollout is done.

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 25, 2024

@broksonic21 ,

The rollout is done. Please let me know if you see any problem in your repositories. If there is no problem found we can close this issue.

@broksonic21
Copy link
Author

@kbukum1 work repositories are all working like I'd expect. I think you are good here, I'll let you know if anything changes

@kbukum1
Copy link
Contributor

kbukum1 commented Nov 25, 2024

@broksonic21 ,

Thanks for the support.

@kbukum1 kbukum1 closed this as completed Nov 25, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Dependabot Nov 25, 2024
@lucasfcnunes
Copy link

For me it's saying it's using npm 9.6.5 (actual) and 10.8.2 at the same time 🤣

npm ERR! notsup Actual:   {"npm":"9.6.5","node":"v20.18.1"}
dependency_file_not_resolvable {:message=>"Dependabot uses Node.js v20.18.1 and NPM 10.8.2. Due to the engine-strict setting, the update will not succeed."}

Context

...
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: @incentive-me/incentive-me@0.1.0
npm ERR! notsup Not compatible with your version of node/npm: @incentive-me/incentive-me@0.1.0
npm ERR! notsup Required: {"node":"^20.17.0","npm":"^10.8.0","yarn":"please-use-npm","pnpm":"please-use-npm"}
npm ERR! notsup Actual:   {"npm":"9.6.5","node":"v20.18.1"}

npm ERR! A complete log of this run can be found in: /home/dependabot/.npm/_logs/2024-12-12T12_44_51_260Z-debug-0.log
  proxy | 2024/12/12 12:44:56 [301] POST /update_jobs/931800239/record_update_job_error
  proxy | 2024/12/12 12:44:56 [301] 204 /update_jobs/931800239/record_update_job_error
updater | 2024/12/12 12:44:56 INFO <job_931800239> Handled error whilst updating path-to-regexp: dependency_file_not_resolvable {:message=>"Dependabot uses Node.js v20.18.1 and NPM 10.8.2. Due to the engine-strict setting, the update will not succeed."}
  proxy | 2024/12/12 12:45:07 Posting metrics to remote API endpoint
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: javascript T: bug 🐞 Something isn't working
Projects
Archived in project
Development

No branches or pull requests

4 participants