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

(pr-linter-exemption-labeler): the pr-linter-exemption-labeler action fails because of an older node version #30212

Open
sakurai-ryo opened this issue May 15, 2024 · 2 comments
Assignees
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p2 package/tools Related to AWS CDK Tools or CLI pr/work-in-progress This PR is a draft and needs further work.

Comments

@sakurai-ryo
Copy link
Contributor

Describe the bug

Hi team.
Sometimes, the pr-linter-exemption-labeler fails to execute because of an older version of Node.js.
As a result, the pr-linter/exemption-requested label is not attached when an Exemption Request is submited in PR.

For example
#30210
https://github.com/aws/aws-cdk/actions/runs/9098051208/job/25007366324

The error that occurs is described in the octokit.js README as occurring in cases where Node.js v18 or higher is not used.

fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing

We are currently on v16. Is it possible to bump up to v18 or higher?
https://github.com/cdklabs/pr-linter-exemption-labeler/blob/main/action.yml

Expected Behavior

The pr-linter/exemption-requested label is correctly attached to the PR.

Current Behavior

The pr-linter/exemption-requested label is not attached when submitting an Exemption Request.

Reproduction Steps

Create a PR and submit an Exemption Request.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.141.0 (build 3d1c06e)

Framework Version

No response

Node.js Version

v18

OS

MacOS

Language

TypeScript

Language Version

No response

Other information

No response

@sakurai-ryo sakurai-ryo added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 15, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label May 15, 2024
@ashishdhingra
Copy link
Contributor

Per https://github.com/octokit/octokit.js/#fetch-missing, Octokit requires Node 18 or higher, which includes a native fetch API.

Needs review with the team.

@ashishdhingra ashishdhingra self-assigned this May 15, 2024
@ashishdhingra ashishdhingra added needs-review and removed needs-triage This issue or PR still needs to be triaged. labels May 15, 2024
@ashishdhingra
Copy link
Contributor

PR cdklabs/pr-linter-exemption-labeler#35 created by CDK team.

@ashishdhingra ashishdhingra added p2 effort/small Small work item – less than a day of effort and removed needs-review labels May 15, 2024
@ashishdhingra ashishdhingra added the pr/work-in-progress This PR is a draft and needs further work. label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p2 package/tools Related to AWS CDK Tools or CLI pr/work-in-progress This PR is a draft and needs further work.
Projects
None yet
Development

No branches or pull requests

2 participants