aws-actions / aws-secretsmanager-get-secrets

MIT No Attribution
140 stars 38 forks source link

aws-secretsmanager-get-secrets@v2 using node 20 instead of node 16 #161

Closed dpakpdl closed 1 month ago

dpakpdl commented 1 month ago

Running on with github runners and we're running into issues where @V2 is using node20 instead of node16.

Steps:

  1. Run aws-actions/aws-secretsmanager-get-secrets@v2 /home/ec2-user/actions-runner/externals/node20/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /home/ec2-user/actions-runner/externals/node20/bin/node) /home/ec2-user/actions-runner/externals/node20/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /home/ec2-user/actions-runner/externals/node20/bin/node)

I added ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true in the env but the same issues persists. The following is my action file.

name: Test-Deploy

on:
    workflow_dispatch:

env:
    ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
    Docker_Image_Build_Deploy:
        runs-on: backend
        steps:
            - name: Configure AWS credentials
              uses: aws-actions/configure-aws-credentials@v2
              with:
                  aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
                  aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
                  aws-region: ${{ secrets.AWS_REGION }}

            - name: Get Secrets from AWS Secrets Manager
              id: get-secrets
              uses: aws-actions/aws-secretsmanager-get-secrets@v2
              with:
                  secret-ids: REDIS_PASSWORD
jirkafajfr commented 1 month ago

Hi Deepak,

node 16 reached end of life late last year. Github asked the action owners to migrate to the Node 20 (link). The @v2 was created to run with the node 20 from the begging. If you like you can try to reference original @v1 that is still using node 16.

dpakpdl commented 1 month ago

@jirkafajfr I don't know why I am facing this. Any solution to fix it instead of using @v1?

jirkafajfr commented 1 month ago

I don't think that this is problem of the SecretsManager Action, but rather your runner can't start the Node 20. As pointed out in previous message, we can't downgrade to the Node 16 (see one of our previous tickets https://github.com/aws-actions/aws-secretsmanager-get-secrets/issues/69) since it was deprecated.