From 7f364e13b3bba64303fa686e8de29c5953331f47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 03:54:51 +0000 Subject: [PATCH 1/2] chore(deps): bump the actions-deps group with 2 updates Bumps the actions-deps group with 2 updates: [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) and [github/codeql-action/upload-sarif](https://github.com/github/codeql-action). Updates `slackapi/slack-github-action` from 3.0.3 to 3.0.5 - [Release notes](https://github.com/slackapi/slack-github-action/releases) - [Changelog](https://github.com/slackapi/slack-github-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/slackapi/slack-github-action/compare/45a88b9581bfab2566dc881e2cd66d334e621e2c...0d95c9a7becc1e6e297d76df9bc735c44f4cbcbc) Updates `github/codeql-action/upload-sarif` from 4.36.3 to 4.37.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/54f647b7e1bb85c95cddabcd46b0c578ec92bc1a...99df26d4f13ea111d4ec1a7dddef6063f76b97e9) --- updated-dependencies: - dependency-name: slackapi/slack-github-action dependency-version: 3.0.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-deps - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.37.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-deps ... Signed-off-by: dependabot[bot] --- .github/workflows/notify-issues.yml | 2 +- .github/workflows/notify-pr.yml | 2 +- .github/workflows/notify-release.yml | 2 +- .github/workflows/scorecard.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/notify-issues.yml b/.github/workflows/notify-issues.yml index c4d89657..1c6ace8d 100644 --- a/.github/workflows/notify-issues.yml +++ b/.github/workflows/notify-issues.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Send issue notification to Slack - uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3 + uses: slackapi/slack-github-action@0d95c9a7becc1e6e297d76df9bc735c44f4cbcbc # v3.0.5 with: webhook: ${{ secrets.SLACK_WEBHOOK_URL_ISSUE }} webhook-type: incoming-webhook diff --git a/.github/workflows/notify-pr.yml b/.github/workflows/notify-pr.yml index 0335e6a6..e82b93b4 100644 --- a/.github/workflows/notify-pr.yml +++ b/.github/workflows/notify-pr.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Send pull request notification to Slack if: github.event.pull_request.draft == false - uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3 + uses: slackapi/slack-github-action@0d95c9a7becc1e6e297d76df9bc735c44f4cbcbc # v3.0.5 with: webhook: ${{ secrets.SLACK_WEBHOOK_URL_PR }} webhook-type: incoming-webhook diff --git a/.github/workflows/notify-release.yml b/.github/workflows/notify-release.yml index 778db7e9..83b190e4 100644 --- a/.github/workflows/notify-release.yml +++ b/.github/workflows/notify-release.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Send release notification to Slack - uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3 + uses: slackapi/slack-github-action@0d95c9a7becc1e6e297d76df9bc735c44f4cbcbc # v3.0.5 with: webhook: ${{ secrets.SLACK_WEBHOOK_URL_RELEASE }} webhook-type: incoming-webhook diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 8a6cf9b4..3a5ef483 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -75,6 +75,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard (optional). # Commenting out will disable upload of results to your repo's Code Scanning dashboard - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3 + uses: github/codeql-action/upload-sarif@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0 with: sarif_file: results.sarif From 3cd8bb0a52ff7275b6524b99fe3a90418488f154 Mon Sep 17 00:00:00 2001 From: Frank Chen Date: Mon, 13 Jul 2026 12:24:41 -0700 Subject: [PATCH 2/2] ci: default durable examples to JSON logs --- .../scripts/generate_sam_template.py | 7 ++- .../test/test_generate_sam_template.py | 52 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 packages/aws-durable-execution-sdk-python-examples/test/test_generate_sam_template.py diff --git a/packages/aws-durable-execution-sdk-python-examples/scripts/generate_sam_template.py b/packages/aws-durable-execution-sdk-python-examples/scripts/generate_sam_template.py index 0a04ec76..9423905d 100644 --- a/packages/aws-durable-execution-sdk-python-examples/scripts/generate_sam_template.py +++ b/packages/aws-durable-execution-sdk-python-examples/scripts/generate_sam_template.py @@ -7,6 +7,7 @@ DEFAULT_FUNCTION_NAME_PREFIX = "DurablePythonExample-" +DEFAULT_DURABLE_LOGGING_CONFIG: dict[str, str] = {"LogFormat": "JSON"} def load_catalog() -> dict[str, Any]: @@ -77,9 +78,13 @@ def build_template(examples: list[dict[str, Any]]) -> dict[str, Any]: if "durableConfig" in example: properties["DurableConfig"] = example["durableConfig"] + properties["LoggingConfig"] = DEFAULT_DURABLE_LOGGING_CONFIG if "loggingConfig" in example: - properties["LoggingConfig"] = example["loggingConfig"] + properties["LoggingConfig"] = { + **DEFAULT_DURABLE_LOGGING_CONFIG, + **example["loggingConfig"], + } if "layers" in example: properties["Layers"] = example["layers"] diff --git a/packages/aws-durable-execution-sdk-python-examples/test/test_generate_sam_template.py b/packages/aws-durable-execution-sdk-python-examples/test/test_generate_sam_template.py new file mode 100644 index 00000000..74e3b935 --- /dev/null +++ b/packages/aws-durable-execution-sdk-python-examples/test/test_generate_sam_template.py @@ -0,0 +1,52 @@ +"""Tests for SAM template generation.""" + +import importlib.util +from pathlib import Path + + +SCRIPT_PATH = ( + Path(__file__).resolve().parents[1] / "scripts" / "generate_sam_template.py" +) +SPEC = importlib.util.spec_from_file_location("generate_sam_template", SCRIPT_PATH) +assert SPEC is not None +assert SPEC.loader is not None +generate_sam_template = importlib.util.module_from_spec(SPEC) +SPEC.loader.exec_module(generate_sam_template) + + +def test_build_template_adds_default_json_logging_to_durable_functions(): + template = generate_sam_template.build_template( + [ + { + "handler": "hello_world.handler", + "description": "A durable example", + "durableConfig": { + "RetentionPeriodInDays": 7, + "ExecutionTimeout": 300, + }, + }, + { + "handler": "logger_example.handler", + "description": "A durable example with custom logging", + "durableConfig": { + "RetentionPeriodInDays": 7, + "ExecutionTimeout": 300, + }, + "loggingConfig": {"ApplicationLogLevel": "INFO"}, + }, + { + "handler": "plain_lambda.handler", + "description": "A non-durable example", + }, + ] + ) + + resources = template["Resources"] + assert resources["HelloWorld"]["Properties"]["LoggingConfig"] == { + "LogFormat": "JSON" + } + assert resources["LoggerExample"]["Properties"]["LoggingConfig"] == { + "LogFormat": "JSON", + "ApplicationLogLevel": "INFO", + } + assert "LoggingConfig" not in resources["PlainLambda"]["Properties"]