Repository: aws/serverless-application-model (branch: layer-version-fix)
Commit date: 2023-10-31T00:00:19Z

Workflow file: .github/workflows/build.yml (Tests)
name: Tests

on:
  push:
    branches:
      - develop
      - "feat-*"
  pull_request:
  workflow_dispatch:
  merge_group:
    types: [checks_requested]

jobs:
  build:
    name: ${{ matrix.os }} / ${{ matrix.python }}
    runs-on: ${{ matrix.os }}
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
        python:
          - "3.7"
          - "3.8"
          - "3.9"
          - "3.10"
          - "3.11"
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python }}
    - run: make init
    - run: make pr

env:
  PIP_INDEX_URL: http://localhost:8629/2023-10-31
  UV_INDEX_URL: http://localhost:8629/2023-10-31


Failed build logs:
step_name: ubuntu-latest  3.7/5_Run make pr.txt
log: ##[group]Run make pr
[36;1mmake pr[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.7.17/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.7.17/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.17/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.17/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.7.17/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.17/x64/lib
##[endgroup]
# Checking latest schema was generated (run `make schema` if this fails)
mkdir -p .tmp
python -m samtranslator.internal.schema_source.schema --sam-schema .tmp/sam.schema.json --cfn-schema schema_source/cloudformation.schema.json --unified-schema .tmp/schema.json
diff -u schema_source/sam.schema.json .tmp/sam.schema.json
diff -u samtranslator/schema/schema.json .tmp/schema.json
black --check setup.py samtranslator tests integration bin schema_source
All done! ✨ 🍰 ✨
363 files would be left unchanged.
bin/transform-test-error-json-format.py --check tests/translator/output/error_*.json
235 file(s) scanned.
0 file(s) need reformat.
[1mAll done! ✨ 🍰 ✨[0m
bin/json-format.py --check tests integration samtranslator/policy_templates_data
1820 file(s) scanned.
0 file(s) need reformat.
[1mAll done! ✨ 🍰 ✨[0m
bin/yaml-format.py --check tests
696 file(s) scanned.
0 file(s) need reformat.
[1mAll done! ✨ 🍰 ✨[0m
bin/yaml-format.py --check integration --add-test-metadata
190 file(s) scanned.
0 file(s) need reformat.
[1mAll done! ✨ 🍰 ✨[0m
ruff samtranslator bin schema_source integration tests
# mypy performs type check
mypy --strict samtranslator bin schema_source
samtranslator/translator/translator.py:427: error: "dict" is not subscriptable, use "typing.Dict" instead  [misc]
Found 1 error in 1 file (checked 165 source files)
make: *** [Makefile:55: lint] Error 1
##[error]Process completed with exit code 2.

step_name: ubuntu-latest  3.8/5_Run make pr.txt
log: ##[group]Run make pr
[36;1mmake pr[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
##[endgroup]
# Checking latest schema was generated (run `make schema` if this fails)
mkdir -p .tmp
python -m samtranslator.internal.schema_source.schema --sam-schema .tmp/sam.schema.json --cfn-schema schema_source/cloudformation.schema.json --unified-schema .tmp/schema.json
diff -u schema_source/sam.schema.json .tmp/sam.schema.json
diff -u samtranslator/schema/schema.json .tmp/schema.json
black --check setup.py samtranslator tests integration bin schema_source
All done! ✨ 🍰 ✨
363 files would be left unchanged.
bin/transform-test-error-json-format.py --check tests/translator/output/error_*.json
235 file(s) scanned.
0 file(s) need reformat.
[1mAll done! ✨ 🍰 ✨[0m
bin/json-format.py --check tests integration samtranslator/policy_templates_data
1820 file(s) scanned.
0 file(s) need reformat.
[1mAll done! ✨ 🍰 ✨[0m
bin/yaml-format.py --check tests
696 file(s) scanned.
0 file(s) need reformat.
[1mAll done! ✨ 🍰 ✨[0m
bin/yaml-format.py --check integration --add-test-metadata
190 file(s) scanned.
0 file(s) need reformat.
[1mAll done! ✨ 🍰 ✨[0m
ruff samtranslator bin schema_source integration tests
# mypy performs type check
mypy --strict samtranslator bin schema_source
samtranslator/translator/translator.py:427: error: "dict" is not subscriptable, use "typing.Dict" instead  [misc]
Found 1 error in 1 file (checked 165 source files)
make: *** [Makefile:55: lint] Error 1
##[error]Process completed with exit code 2.


Changed files:
samtranslator/translator/translator.py

Fix diff:
diff --git a/samtranslator/translator/translator.py b/samtranslator/translator/translator.py
index b710bf8e..85e6f0f8 100644
--- a/samtranslator/translator/translator.py
+++ b/samtranslator/translator/translator.py
@@ -424,7 +424,7 @@ def traverse_template_depends_on(input_value: Dict[str, Any], resolution_data: D
     return input_value
 
 
-def _resolve_depends_on(input_dict: Dict[str, Any], resolution_data: dict[str, str]) -> Dict[str, Any]:
+def _resolve_depends_on(input_dict: Dict[str, Any], resolution_data: Dict[str, str]) -> Dict[str, Any]:
     """
     Resolve DependsOn when logical ids get changed when transforming (ex: AWS::Serverless::LayerVersion)