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

Package manager versions outdated #590

Closed
MikeMcC399 opened this issue Jan 12, 2025 · 12 comments
Closed

Package manager versions outdated #590

MikeMcC399 opened this issue Jan 12, 2025 · 12 comments

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jan 12, 2025

Version Sync workflow fails "Resource not accessible by integration"

Issue

The workflow Version Sync, mentioned in CONTRIBUTING.md "that keeps pinned versions up-to-date", is scheduled to run weekly, has been failing since Sep 2024.

Consequently, versions in config.json are months out of date (apart from Yarn 1 Classic where there has been no new version released):

Package Manager config version latest version
npm 10.9.1 11.0.0
pnpm 9.14.2 9.15.3
Yarn (classic) 1.22.22 1.22.22
Yarn 4.5.2 4.6.0

Logs

Jan 10, 2025 https://github.com/nodejs/corepack/actions/runs/12700915343/job/35404505886

Error: Resource not accessible by integration

Run gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5
Remote branch "actions/tools-update-config.json" checked out locally.
RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/gr2m/create-or-update-pull-request-action/77596e3166f328b24613f7082ab30bf2d93079d5/dist/index.js:9160:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async main (/home/runner/work/_actions/gr2m/create-or-update-pull-request-action/77596e3166f328b24613f7082ab30bf2d93079d5/dist/index.js:792:9) {
  status: 403,
  response: {
    url: 'https://api.github.com/repos/nodejs/corepack/pulls',
    status: 403,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Fri, 10 Jan 2025 00:32:07 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'github.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      'transfer-encoding': 'chunked',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-accepted-github-permissions': 'pull_requests=write',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-api-version-selected': '2022-11-28',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': '68A9:3E2E99:172181E:2E21CFC:67806A87',
      'x-ratelimit-limit': '15000',
      'x-ratelimit-remaining': '14996',
      'x-ratelimit-reset': '1736472688',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '4',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Resource not accessible by integration',
      documentation_url: 'https://docs.github.com/rest/pulls/pulls#create-a-pull-request',
      status: '403'
    }
  },
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/nodejs/corepack/pulls',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit-core.js/3.5.1 Node.js/20.18.0 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"title":"feat: update package manager versions","body":"This is an automated update of package manager versions","head":"actions/tools-update-config.json","base":"main"}',
    request: { hook: [Function: bound bound register] }
  }
}
Error: Resource not accessible by integration
@styfle
Copy link
Member

styfle commented Jan 12, 2025

Looks like @aduh95 might have permission to fix this.

Looks like the repo settings need to be changed per gr2m/create-or-update-pull-request-action#557 (comment)

@MikeMcC399
Copy link
Contributor Author

@styfle

Looks like @aduh95 might have permission to fix this.

Looks like the repo settings need to be changed per gr2m/create-or-update-pull-request-action#557 (comment)

@MikeMcC399
Copy link
Contributor Author

Possibly @arcanis or @aduh95 (or whoever is currently organizationally responsible) should check their settings for Notifications for workflow runs. If enabled, GitHub would send a failure notification. I don't really understand otherwise how the workflow could be failing for the last 4 months without any apparent attempt to fix it.

@aduh95
Copy link
Contributor

aduh95 commented Jan 13, 2025

Maybe it has changed since last time I tried enable it, but I find GitHub failure notification not worth the noise, so I'm not enabling that, no thank you.

Looks like the repo settings need to be changed per gr2m/create-or-update-pull-request-action#557 (comment)

No those are disabled at the org level: screenshot of the setting page showing the disabled setting

The options we have are:

It's a volunteer based project, so until someone commits their time on that issue, the latter will apply. Worth noting that the internal config file is only used when COREPACK_DEFAULT_TO_LATEST is set to 0 in the env, so being behind there won't affect most Corepack users – but we should still fix it, at least because it allows us to test Corepack with latest versions of supported package managers.

@MikeMcC399

This comment has been minimized.

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Jan 13, 2025

@aduh95

I am able to run the workflow in a fork by adding pull_requests: write permissions. It looks like this was all that was missing.

    permissions:
      contents: write
      pull-requests: write

@MikeMcC399

This comment has been minimized.

@MikeMcC399
Copy link
Contributor Author

@aduh95

@MikeMcC399
Copy link
Contributor Author

@MikeMcC399
Copy link
Contributor Author

@aduh95

Would you like to manually trigger the workflow Version Sync now or do you prefer to wait for cron to kick in on Friday?

@aduh95
Copy link
Contributor

aduh95 commented Jan 14, 2025

I've ran it manually for you: https://github.com/nodejs/corepack/actions/runs/12765046315/job/35578428609

Looks it's working great, thanks

@aduh95 aduh95 closed this as completed Jan 14, 2025
@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Jan 14, 2025

@aduh95

I've ran it manually for you: https://github.com/nodejs/corepack/actions/runs/12765046315/job/35578428609

Looks it's working great, thanks

It's great to see that the workflow is successful.

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

No branches or pull requests

3 participants