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-lib.aws_lambda: AdotLambdaLayerPythonSdkVersion incorrect latest version #26168

Closed
michael-c-hoffman opened this issue Jun 29, 2023 · 3 comments · Fixed by #26411
Closed
Labels
aws-cdk-lib Related to the aws-cdk-lib package bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2

Comments

@michael-c-hoffman
Copy link

Describe the bug

When using the AdotLambdaLayerPythonSdkVersion.html It returns back version 1.13 for latest. This is an extremely old version and the latest should return back (as of this report) 1.18.

Expected Behavior

when calling AdotLambdaLayerPythonSdkVersion.html should be able to specify any valid version or use the LATEST to get the current latest version.
LATEST -> arn:aws:lambda::901920570463:layer:aws-otel-python--ver-1-18-0:1
V1_18_0 -> arn:aws:lambda::901920570463:layer:aws-otel-python--ver-1-18-0:1
V1_17_0 -> arn:aws:lambda::901920570463:layer:aws-otel-python--ver-1-17-0:1
etc

Current Behavior

Currently the LATEST attribute returns version 1-13-0. There is also also no other versions other than V1_13_0 to specify directly.

Reproduction Steps

>>> import aws_cdk
>>> app = aws_cdk.App()
>>> stack = aws_cdk.Stack(app, "test")
>>> lambda_adot = aws_cdk.aws_lambda.AdotLambdaLayerPythonSdkVersion.LATEST
>>> lambda_adot.layer_arn(stack, aws_cdk.aws_lambda.Architecture.X86_64)
'arn:aws:lambda:${Token[AWS.Region.6]}:901920570463:layer:aws-otel-python-amd64-ver-1-13-0:1'

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.85.0 (build 4e0d726)

Framework Version

No response

Node.js Version

v18.6.0

OS

fedora 17

Language

Python

Language Version

python 3.10

Other information

No response

@michael-c-hoffman michael-c-hoffman added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 29, 2023
@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Jun 29, 2023
@randyridgley
Copy link
Contributor

I can take this issue

@pahud
Copy link
Contributor

pahud commented Jun 29, 2023

Looks like we need fix this

public static readonly LATEST = new AdotLambdaLayerPythonSdkVersion('1.13.0');

Thank you @randyridgley !

@pahud pahud added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jun 29, 2023
@peterwoodworth peterwoodworth added the good first issue Related to contributions. See CONTRIBUTING.md label Jun 29, 2023
@mergify mergify bot closed this as completed in #26411 Jul 19, 2023
mergify bot pushed a commit that referenced this issue Jul 19, 2023
This PR adds the additional versions of the Python Adot for Lambda Layers. I added the versions from 1.13 -1.18 and marked  1.18 as LATEST. The integration and unit tests updated for versions 1.18. Not sure if this fix is maintainable in the long term, if there are ideas on ways to dynamically add additional versions in the future.

Exemption Request: This is an update to a class supporting the Lambda Layer versions for Python Adot. New functionality from an integration standpoint does not exist.

Closes #26168.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

bmoffatt pushed a commit to bmoffatt/aws-cdk that referenced this issue Jul 29, 2023
This PR adds the additional versions of the Python Adot for Lambda Layers. I added the versions from 1.13 -1.18 and marked  1.18 as LATEST. The integration and unit tests updated for versions 1.18. Not sure if this fix is maintainable in the long term, if there are ideas on ways to dynamically add additional versions in the future.

Exemption Request: This is an update to a class supporting the Lambda Layer versions for Python Adot. New functionality from an integration standpoint does not exist.

Closes aws#26168.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws-cdk-lib Related to the aws-cdk-lib package bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2
Projects
None yet
4 participants