Skip to content

Upgrade ockokit/rest and octokit/auth-app breaks scale-up during authorization #3966

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

Closed
npalm opened this issue Jul 4, 2024 · 2 comments · Fixed by #4042
Closed

Upgrade ockokit/rest and octokit/auth-app breaks scale-up during authorization #3966

npalm opened this issue Jul 4, 2024 · 2 comments · Fixed by #4042
Labels
enhancement New feature or request

Comments

@npalm
Copy link
Member

npalm commented Jul 4, 2024

Upgrading @octokit/rest ^20.0.1 20.0.2 ❯ 20.1.1 is breaking the authentication of the app.

Running the scale-up lambda results in an error while getting an access-token for the app.

{"level":"ERROR","message":"response.json(...).catch is not a function","service":"runners-scale-up","timestamp":"2024-07-04T14:01:17.879Z","region":"eu-central-1","environment":"npalm-multi-linux-x64","name":"HttpError","status":500,"request":{"method":"POST","url":"https://api.github.com/app/installations/123/access_tokens","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit-request.js/8.4.0 Node.js/21","authorization":"bearer [REDACTED]"},"request":{}}}

Upgrade octokit/auth-app 6.0.3 to 6.1.1 breaks build

Update auth-app introduce transive breaking dependencies requiring ESM.

npalm added a commit that referenced this issue Jul 5, 2024
## Updates
- updating all npm packages
- add dependabot version ignore for updates not possible
- ockotkit rest minor update breaks the app auth #3966
- fix nx configuration

## Tests
Fresh deployment with multi-runner example
@npalm npalm changed the title Upgrade ockokit/rest to 20.1.1 breaks auth Upgrade ockokit/rest and octokit/auth-app breaks scale-up during authorization Jul 31, 2024
npalm added a commit that referenced this issue Aug 1, 2024
- migrate to yarn4
- fix duplicate dependencies in lock file
- upgrade all possible upgrade
- octokit/rest and octokit/auth-app both break updates see #3966


Tested with deployment of multi runner example
@stuartp44 stuartp44 added the enhancement New feature or request label Aug 6, 2024
@wolfy1339
Copy link

wolfy1339 commented Aug 6, 2024

Can you explain which transitive dependency you think is causing an issue?

The only dependency that has a "type": "module" in it's package.json is lru-cache which ships CJS + ESM builds in the same package

@npalm
Copy link
Member Author

npalm commented Aug 6, 2024

I tried to reproduce the problem today again. Seems both auth-app and rest updates are causing the issue. When update auth from 6.1.0 to 6.1.1 the error stats to occure.

See here the change set. https://github.com/philips-labs/terraform-aws-github-runner/pull/4042/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants