diff --git a/.github/workflows/aws_integration_test.yml b/.github/workflows/aws_integration_test.yml index 451fddf2f..9ab4041e3 100644 --- a/.github/workflows/aws_integration_test.yml +++ b/.github/workflows/aws_integration_test.yml @@ -28,4 +28,4 @@ jobs: - name: AWS Python integration tests run: | - ./aws/logs_monitoring/tools/integration_tests/integration_tests.sh --python-version=3.13 + ./aws/logs_monitoring/tools/integration_tests/integration_tests.sh --python-version=3.14 diff --git a/.github/workflows/aws_lint.yml b/.github/workflows/aws_lint.yml index 1c3077737..2390a110e 100644 --- a/.github/workflows/aws_lint.yml +++ b/.github/workflows/aws_lint.yml @@ -35,6 +35,6 @@ jobs: run: | pip install cfn-lint==1.19.0 cfn-lint --version - cfn-lint -t aws/logs_monitoring/template.yaml - cfn-lint -t aws/rds_enhanced_monitoring/rds-enhanced-sam-template.yaml - cfn-lint -t aws/vpc_flow_log_monitoring/vpc-flow-log-sam-template.yaml + cfn-lint -i E3030 -t aws/logs_monitoring/template.yaml + cfn-lint -i E3030 -t aws/rds_enhanced_monitoring/rds-enhanced-sam-template.yaml + cfn-lint -i E3030 -t aws/vpc_flow_log_monitoring/vpc-flow-log-sam-template.yaml diff --git a/.github/workflows/aws_unit_test.yml b/.github/workflows/aws_unit_test.yml index d1e5754e3..fd679a76d 100644 --- a/.github/workflows/aws_unit_test.yml +++ b/.github/workflows/aws_unit_test.yml @@ -8,10 +8,10 @@ jobs: steps: - name: Checkout source uses: actions/checkout@v3 - - name: Setup Python 3.13 + - name: Setup Python 3.14 uses: actions/setup-python@v3 with: - python-version: 3.13 + python-version: 3.14 - name: AWS Python unit tests env: diff --git a/aws/logs_monitoring/README.md b/aws/logs_monitoring/README.md index eba5ab0aa..899acbeb0 100644 --- a/aws/logs_monitoring/README.md +++ b/aws/logs_monitoring/README.md @@ -178,6 +178,10 @@ The environment variables provided on this If you encounter issues upgrading to the latest version, check the Troubleshooting section. +### Upgrade to 5.2.0+ + +Starting version 5.2.0+ Lambda function has been updated to require **Python 3.14**. If upgrading an older forwarder installation to 5.2.0+, ensure AWS Lambda function is configured to use Python 3.14 + ### Upgrade to v5.0.0+ **Version 5.0.0 is a major release with breaking changes.** Before upgrading, review the [CHANGELOG.md][25] for detailed information about breaking changes and migration requirements. diff --git a/aws/logs_monitoring/requirements.txt b/aws/logs_monitoring/requirements.txt index 3317fb07c..d497290f6 100644 --- a/aws/logs_monitoring/requirements.txt +++ b/aws/logs_monitoring/requirements.txt @@ -3,10 +3,10 @@ bytecode cattrs certifi charset-normalizer -datadog-lambda==8.120.0 +datadog-lambda==8.121.0 datadog==0.52.0 ddsketch==3.0.1 -ddtrace==3.16.2 +ddtrace==3.19.5 deprecated envier exceptiongroup diff --git a/aws/logs_monitoring/settings.py b/aws/logs_monitoring/settings.py index 5074a39c7..7575f4277 100644 --- a/aws/logs_monitoring/settings.py +++ b/aws/logs_monitoring/settings.py @@ -339,7 +339,7 @@ def get_enrich_cloudwatch_tags(): DD_CUSTOM_TAGS = "ddtags" DD_SERVICE = "service" DD_HOST = "host" -DD_FORWARDER_VERSION = "5.1.1" +DD_FORWARDER_VERSION = "5.2.0" # CONST STRINGS AWS_STRING = "aws" diff --git a/aws/logs_monitoring/setup.py b/aws/logs_monitoring/setup.py index b61ec3193..c67025b69 100644 --- a/aws/logs_monitoring/setup.py +++ b/aws/logs_monitoring/setup.py @@ -12,10 +12,10 @@ author="Datadog, Inc.", author_email="dev@datadoghq.com", classifiers=[ - "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ], keywords="datadog aws lambda layer", - python_requires=">=3.13, <3.14", + python_requires=">=3.14, <3.15", extras_require={ "dev": ["nose2==0.9.1", "flake8==3.7.9", "requests==2.22.0", "boto3==1.10.33"] }, diff --git a/aws/logs_monitoring/template.yaml b/aws/logs_monitoring/template.yaml index 5651292e7..b002bc4e2 100644 --- a/aws/logs_monitoring/template.yaml +++ b/aws/logs_monitoring/template.yaml @@ -3,8 +3,8 @@ Description: Pushes logs, metrics and traces from AWS to Datadog. Mappings: Constants: DdForwarder: - Version: 5.1.1 - LayerVersion: "93" + Version: 5.2.0 + LayerVersion: "94" Parameters: DdApiKey: Type: String @@ -457,7 +457,7 @@ Resources: - {DdForwarderVersion: !FindInMap [Constants, DdForwarder, Version]} - ZipFile: " " MemorySize: !Ref MemorySize - Runtime: python3.13 + Runtime: python3.14 Architectures: - arm64 Timeout: !Ref Timeout @@ -869,7 +869,7 @@ Resources: Properties: Description: Copies Datadog Forwarder zip to the destination S3 bucket Handler: index.handler - Runtime: python3.13 + Runtime: python3.14 Timeout: 600 Code: ZipFile: | diff --git a/aws/logs_monitoring/tools/build_bundle.sh b/aws/logs_monitoring/tools/build_bundle.sh index 93e175d30..5d229a119 100755 --- a/aws/logs_monitoring/tools/build_bundle.sh +++ b/aws/logs_monitoring/tools/build_bundle.sh @@ -42,7 +42,7 @@ else VERSION=$1 fi -PYTHON_VERSION="${PYTHON_VERSION:-3.13}" +PYTHON_VERSION="${PYTHON_VERSION:-3.14}" FORWARDER_PREFIX="aws-dd-forwarder" FORWARDER_DIR="../.forwarder" diff --git a/aws/logs_monitoring/tools/integration_tests/cache_test_lambda/serverless.yml b/aws/logs_monitoring/tools/integration_tests/cache_test_lambda/serverless.yml index 6bcab84fc..a05b8269a 100644 --- a/aws/logs_monitoring/tools/integration_tests/cache_test_lambda/serverless.yml +++ b/aws/logs_monitoring/tools/integration_tests/cache_test_lambda/serverless.yml @@ -1,7 +1,7 @@ service: integration-tests provider: name: aws - runtime: python3.13 + runtime: python3.14 functions: cache_test_lambda: diff --git a/aws/logs_monitoring/tools/integration_tests/integration_tests.sh b/aws/logs_monitoring/tools/integration_tests/integration_tests.sh index dd3ec3823..5e3745d1e 100755 --- a/aws/logs_monitoring/tools/integration_tests/integration_tests.sh +++ b/aws/logs_monitoring/tools/integration_tests/integration_tests.sh @@ -7,9 +7,9 @@ set -e -PYTHON_VERSION="python3.13" -PYTHON_VERSION_TAG="3.13" -PYTHON_IMAGE="python:3.13" +PYTHON_VERSION="python3.14" +PYTHON_VERSION_TAG="3.14" +PYTHON_IMAGE="python:3.14" SKIP_FORWARDER_BUILD=false UPDATE_SNAPSHOTS=false LOG_LEVEL=info diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_customized_log_group_lambda_invocation.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_customized_log_group_lambda_invocation.json~snapshot index 2b1753808..b8f47f880 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_customized_log_group_lambda_invocation.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_customized_log_group_lambda_invocation.json~snapshot @@ -68,7 +68,7 @@ ], "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Length": "", "Content-type": "application/json", @@ -140,7 +140,7 @@ }, "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Encoding": "deflate", "Content-Length": "", diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log.json~snapshot index 1eb5dc50f..3f2178c04 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log.json~snapshot @@ -41,7 +41,7 @@ ], "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Length": "", "Content-type": "application/json", @@ -113,7 +113,7 @@ }, "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Encoding": "deflate", "Content-Length": "", diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_cloudtrail.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_cloudtrail.json~snapshot index 5983e34cd..b8cd248d6 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_cloudtrail.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_cloudtrail.json~snapshot @@ -77,7 +77,7 @@ ], "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Length": "", "Content-type": "application/json", @@ -149,7 +149,7 @@ }, "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Encoding": "deflate", "Content-Length": "", diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_coldstart.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_coldstart.json~snapshot index 6f770a104..93297f57b 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_coldstart.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_coldstart.json~snapshot @@ -68,7 +68,7 @@ ], "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Length": "", "Content-type": "application/json", @@ -140,7 +140,7 @@ }, "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Encoding": "deflate", "Content-Length": "", diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_custom_tags.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_custom_tags.json~snapshot index b4e4a82e4..d8eb02355 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_custom_tags.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_custom_tags.json~snapshot @@ -23,7 +23,7 @@ ], "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Length": "", "Content-type": "application/json", @@ -95,7 +95,7 @@ }, "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Encoding": "deflate", "Content-Length": "", diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_lambda_invocation.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_lambda_invocation.json~snapshot index 13183e3f5..50d892709 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_lambda_invocation.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_lambda_invocation.json~snapshot @@ -341,7 +341,7 @@ ], "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Length": "", "Content-type": "application/json", @@ -891,7 +891,7 @@ }, "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Encoding": "deflate", "Content-Length": "", @@ -910,4 +910,4 @@ "verb": "POST" } ] -} +} \ No newline at end of file diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_service_tag.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_service_tag.json~snapshot index fe96782f9..03efe32fe 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_service_tag.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_service_tag.json~snapshot @@ -23,7 +23,7 @@ ], "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Length": "", "Content-type": "application/json", @@ -95,7 +95,7 @@ }, "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Encoding": "deflate", "Content-Length": "", diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_timeout.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_timeout.json~snapshot index 7d6c7a9f5..0ce892ea1 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_timeout.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/cloudwatch_log_timeout.json~snapshot @@ -89,7 +89,7 @@ ], "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Length": "", "Content-type": "application/json", @@ -175,7 +175,7 @@ }, "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Encoding": "deflate", "Content-Length": "", diff --git a/aws/logs_monitoring/tools/integration_tests/snapshots/step_functions_log.json~snapshot b/aws/logs_monitoring/tools/integration_tests/snapshots/step_functions_log.json~snapshot index c50c55e4a..ed0e1234f 100644 --- a/aws/logs_monitoring/tools/integration_tests/snapshots/step_functions_log.json~snapshot +++ b/aws/logs_monitoring/tools/integration_tests/snapshots/step_functions_log.json~snapshot @@ -23,7 +23,7 @@ ], "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Length": "", "Content-type": "application/json", @@ -95,7 +95,7 @@ }, "headers": { "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", + "Accept-Encoding": "gzip, deflate, zstd", "Connection": "keep-alive", "Content-Encoding": "deflate", "Content-Length": "", diff --git a/aws/logs_monitoring/tools/publish_layers.sh b/aws/logs_monitoring/tools/publish_layers.sh index 7be1488af..c9e2c1fa2 100755 --- a/aws/logs_monitoring/tools/publish_layers.sh +++ b/aws/logs_monitoring/tools/publish_layers.sh @@ -92,7 +92,7 @@ user_confirm() { # Makes sure any subprocesses will be terminated with this process trap "pkill -P $$; exit 1;" INT -PYTHON_VERSIONS_FOR_AWS_CLI=("python3.13") +PYTHON_VERSIONS_FOR_AWS_CLI=("python3.14") LAYER_PATHS=(".forwarder/aws-dd-forwarder-${FORWARDER_VERSION}-layer.zip") AVAILABLE_LAYERS=("Datadog-Forwarder") AVAILABLE_REGIONS=$(aws ec2 describe-regions | jq -r '.[] | .[] | .RegionName') diff --git a/aws/logs_monitoring/trace_forwarder/scripts/build_linux_go_bin.sh b/aws/logs_monitoring/trace_forwarder/scripts/build_linux_go_bin.sh index 3daa595f5..597e42795 100755 --- a/aws/logs_monitoring/trace_forwarder/scripts/build_linux_go_bin.sh +++ b/aws/logs_monitoring/trace_forwarder/scripts/build_linux_go_bin.sh @@ -32,7 +32,7 @@ fi # between different python runtimes. if [[ $(docker image ls | grep -c golang) -lt 1 ]]; then - docker_build --platform linux/arm64 -t golang . --no-cache --build-arg "runtime=python:3.13" + docker_build --platform linux/arm64 -t golang . --no-cache --build-arg "runtime=python:3.14" fi docker run --rm --platform linux/arm64 --volume "$(pwd):/root/bin" golang cp -r /go/src/github.com/DataDog/datadog-serverless-functions/aws/logs_monitoring/trace_forwarder/bin /root/bin diff --git a/aws/logs_monitoring/trace_forwarder/scripts/run_tests.sh b/aws/logs_monitoring/trace_forwarder/scripts/run_tests.sh index dabc3cbc1..4ffd27cf5 100755 --- a/aws/logs_monitoring/trace_forwarder/scripts/run_tests.sh +++ b/aws/logs_monitoring/trace_forwarder/scripts/run_tests.sh @@ -11,5 +11,5 @@ set -e # Change to the parent of the directory this script is in cd $(dirname "$0")/.. -docker buildx build --platform linux/arm64 -t datadog-go-layer . --build-arg runtime=python:3.13 +docker buildx build --platform linux/arm64 -t datadog-go-layer . --build-arg runtime=python:3.14 docker run --rm datadog-go-layer go test -v ./... diff --git a/aws/rds_enhanced_monitoring/rds-enhanced-sam-template.yaml b/aws/rds_enhanced_monitoring/rds-enhanced-sam-template.yaml index cc318ea5a..ff3bada71 100644 --- a/aws/rds_enhanced_monitoring/rds-enhanced-sam-template.yaml +++ b/aws/rds_enhanced_monitoring/rds-enhanced-sam-template.yaml @@ -20,7 +20,7 @@ Resources: KeyId: !Ref KMSKeyId Architectures: - arm64 - Runtime: python3.13 + Runtime: python3.14 Timeout: 10 KmsKeyArn: !Sub diff --git a/aws/vpc_flow_log_monitoring/vpc-flow-log-sam-template.yaml b/aws/vpc_flow_log_monitoring/vpc-flow-log-sam-template.yaml index 023ac6846..762bb6439 100644 --- a/aws/vpc_flow_log_monitoring/vpc-flow-log-sam-template.yaml +++ b/aws/vpc_flow_log_monitoring/vpc-flow-log-sam-template.yaml @@ -18,7 +18,7 @@ Resources: Policies: KMSDecryptPolicy: KeyId: !Ref KMSKeyId - Runtime: python3.13 + Runtime: python3.14 Architectures: - arm64 Timeout: 10