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

aws-cdk: npx cdk deploy not working in a github action #29090

Open
stuller-adriahuertascaparros opened this issue Feb 13, 2024 · 3 comments
Open
Labels
bug This issue is a bug. cli Issues related to the CDK CLI effort/medium Medium work item – several days of effort p3

Comments

@stuller-adriahuertascaparros
Copy link

stuller-adriahuertascaparros commented Feb 13, 2024

Describe the bug

After updating Node from 16 to 18, the command npx cdk delpoy inside a github action doesn't work. The deploy doesn't happen and it doesn't raise any kind of error. We have the aws-cdk-lib: 2.19 and cdk: 2.19 packages in our project.

Expected Behavior

With node 16 (works fine)
Screenshot 2024-02-13 115008

Current Behavior

With node 18 (no deploy and no error)
Screenshot 2024-02-13 115049

Reproduction Steps

We have just changed the node version from 16 to 18 in the github action that runs the command npx cdk deploy

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.19

Framework Version

No response

Node.js Version

18

OS

Ubuntu

Language

TypeScript

Language Version

Typescript (4.6.3)

Other information

No response

@stuller-adriahuertascaparros stuller-adriahuertascaparros added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 13, 2024
@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Feb 13, 2024
@pahud
Copy link
Contributor

pahud commented Feb 13, 2024

cdk 2.19.0 was released in April 2022 and it might not have full test with node18. I am wondering:

  1. Are you able to deploy that using your local machine instead of github actions?
  2. Are you able to deploy that using the latest CDK release in github actions?

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 13, 2024
@stuller-adriahuertascaparros
Copy link
Author

stuller-adriahuertascaparros commented Feb 14, 2024

cdk 2.19.0 was released in April 2022 and it might not have full test with node18. I am wondering:

1. Are you able to deploy that using your local machine instead of github actions?

2. Are you able to deploy that using the latest CDK release in github actions?
  1. I haven't tried that for now
  2. The instruction we run is "npx cdk deploy...". I've tried updating both cdk and aws-cdk-lib packages to the last version and it didn't work. What did work was changing the command:
    npx cdk delpoy...
    for:
    npm i -g aws-cdk@latest
    cdk deploy...

So, I'm quite new to aws and I'm not sure what is the difference between aws-cdk and aws-cdk-lib but if I don't want to install aws-cdk in the github action and I want to keep running the same command I guess I should install latest aws-cdk in my project and then using npx would be equivalent to install it globally in the github action. Am I right?

@stuller-adriahuertascaparros
Copy link
Author

stuller-adriahuertascaparros commented Feb 14, 2024

I've just realised that making this only change, even without updating cdk and aws-cdk-lib packages, it works:
npx cdk deploy...
for:
npx aws-cdk deploy

I've seen that aws docs recommends installing aws-cdk globally and running cdk deploy. But I've checked the cdk package in npm repositories and its current version is the same as aws-cdk, which has led me to think it should be updated and functional.

So, is the package cdk in npm deprecated? What's exactly happening when running "npx cdk deploy..." and what's the difference when running "npx aws-cdk deploy..."? Can someone shed some light?

@pahud pahud added p3 and removed p2 labels Jun 11, 2024
@moelasmar moelasmar added cli Issues related to the CDK CLI and removed aws-cdk-lib Related to the aws-cdk-lib package labels Aug 28, 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. cli Issues related to the CDK CLI effort/medium Medium work item – several days of effort p3
Projects
None yet
Development

No branches or pull requests

3 participants