Skip to content

Commit

Permalink
Merge branch 'getmoto:master' into path-overlap-check-for-all-types-o…
Browse files Browse the repository at this point in the history
…f-updates
  • Loading branch information
BlizzardOf authored Mar 2, 2025
2 parents 1c5a312 + 0224977 commit 2350f36
Show file tree
Hide file tree
Showing 308 changed files with 97,508 additions and 36,029 deletions.
120 changes: 112 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,126 @@
{
"name": "moto",
"image": "mcr.microsoft.com/devcontainers/python:0-3.11",
"remoteUser": "root",
"image": "mcr.microsoft.com/devcontainers/python:3.11",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"portsAttributes": {
"5000": {
"onAutoForward": "silent",
"elevateIfNeeded": true,
"protocol": "http",
"requireLocalPort": false
}
},
"postCreateCommand": "python -m venv .venv",
"postStartCommand": ". .venv/bin/activate && make init",
"customizations": {
"vscode": {
"extensions": ["ms-vscode.makefile-tools", "ms-python.python", "ms-python.black-formatter"],
"extensions": [
"ms-vscode.makefile-tools",
"ms-python.python",
"ms-python.black-formatter"
],
"settings": {
"editor.formatOnSave": true,
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
"python.formatting.provider": "none",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"tasks": {
"version": "2.0.0",
"tasks": [
{
"label": "Open Port 5000",
"type": "shell",
"command": "bash",
"args": [
"-c",
"until gh codespace ports visibility 5000:public --codespace ${CODESPACE_NAME} 2>/dev/null; do sleep 1; done"
],
"presentation": {
"reveal": "silent",
"focus": false
}
},
{
"label": "Kill MotoServer",
"type": "shell",
"command": "pkill -f '${workspaceFolder}/moto/server.py'",
"problemMatcher": [],
"presentation": {
"reveal": "silent",
"focus": false
}
}
]
},
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": "Run MotoServer",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/moto/server.py",
"args": [
"--reload"
],
"console": "internalConsole",
"presentation": {
"order": 11
}
},
{
"name": "Run MotoServer Tests",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"console": "integratedTerminal",
"preLaunchTask": "Open Port 5000",
"postDebugTask": "Kill MotoServer",
"env": {
"TEST_SERVER_MODE": "true",
"TEST_SERVER_MODE_ENDPOINT": "https://${env:CODESPACE_NAME}-5000.${env:GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
},
"presentation": {
"order": 12
},
"args": [
"-sv",
"--cov=moto",
"--cov-report=xml",
"${workspaceFolder}/tests/",
"-k",
"${input:pytestFilter}"
]
}
],
"inputs": [
{
"id": "pytestFilter",
"type": "promptString",
"description": "pytest -k filter (leave empty to run all tests)",
"default": ""
}
],
"compounds": [
{
"name": "MotoServer Tests",
"configurations": [
"Run MotoServer Tests",
"Run MotoServer"
],
"presentation": {
"order": 1
},
"stopAll": true
}
]
}
}
}
},
"postCreateCommand": "python -m venv .venv",
"postStartCommand": ". .venv/bin/activate && make init"
}
}
}
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12", "3.13" ]
python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13" ]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -72,6 +72,10 @@ jobs:
mkdir .mypy_cache
make lint
cpptest:
needs: lint
uses: ./.github/workflows/tests_sdk_cpp.yml

javatest:
needs: lint
uses: ./.github/workflows/tests_sdk_java.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_decoratormode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/tests_sdk_cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: C++ SDK test
on: [workflow_call]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Start MotoServer
run: |
pip install build
python -m build
docker run --rm -t --name motoserver -e TEST_SERVER_MODE=true -e AWS_SECRET_ACCESS_KEY=server_secret -e AWS_ACCESS_KEY_ID=server_key -v `pwd`:/moto -p 5000:5000 -v /var/run/docker.sock:/var/run/docker.sock python:3.10-slim /moto/scripts/ci_moto_server.sh &
python scripts/ci_wait_for_server.py
- name: Check build cache
id: build-cache
uses: actions/cache@v4
with:
path: other_langs/tests_cpp/build/hello_s3
key: cpp-build-${{ hashFiles('other_langs/tests_cpp/hello_s3.cpp') }}

- name: Build Project
if: steps.build-cache.outputs.cache-hit != 'true'
working-directory: other_langs/tests_cpp
run: |
make build
- name: Run tests
working-directory: other_langs/tests_cpp
run: |
make test
4 changes: 2 additions & 2 deletions .github/workflows/tests_sdk_dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"
- name: Start MotoServer
run: |
pip install build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_sdk_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
- name: Start MotoServer
run: |
pip install build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests_sdk_ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@1287d2b408066abada82d5ad1c63652e758428d9
uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
- name: Start MotoServer
run: |
pip install build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_servermode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_terraform_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"
- name: Start MotoServer
run: |
pip install build
Expand Down
78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,84 @@
Moto Changelog
==============

5.1.0
-----
Docker Digest for 5.1.0: _sha256:aaf5f4a72412b753b2115417e26360612564d3a29b1831f9316708e15138d699_

* General:
* Dropped support for Python 3.8

* New Services:
* Lex V2 Models:
* create_bot()
* create_bot_alias()
* create_resource_policy()
* delete_bot()
* delete_bot_alias()
* delete_resource_policy()
* describe_bot()
* describe_bot_alias()
* describe_resource_policy()
* list_bots()
* list_bot_aliases()
* list_tags_for_resource()
* tag_resource()
* update_bot()
* update_bot_alias()
* update_resource_policy()
* untag_resource()

* CloudHSM V2:
* create_cluster()
* delete_cluster()
* describe_backups()
* describe_clusters()
* get_resource_policy()
* list_tags()
* put_resource_policy()
* tag_resource()
* untag_resource()

* New Methods:
* ElasticSearch:
* add_tags()
* list_tags()
* remove_tags()

* RDS:
* describe_events()
* describe_db_log_files()
* failover_db_cluster()
* restore_db_cluster_to_point_in_time()

* SecurityHub:
* batch_import_findings()
* get_findings()

* TimeStream InfluxDB:
* create_db_instance()
* delete_db_instance()
* get_db_instance()
* list_db_instances()
* list_tags_for_resource()
* tag_resource()
* untag_resource()

* Miscellaneous:
* CognitoIDP: AccessTokens and IDTokens now contain the jti and origin_jti values
* DynamoDB: query()/scan() now handle pagination for GSI's correctly
* EC2: The DisableApiStop-attribute is now propagated properly and respected
* EC2: create_volume() now throws an error if the Size-parameter is not provided
* EC2: describe_subnets() now correctly handles a Filter without a Value
* ELBv2: create_listener() now validates the provided protocol against the LoadBalancer type
* ECS: run_task() now contains the Container-info in the response
* KMS: create_key() now supports the Origin-parameter
* Lambda: EventSourceMappings now support all parameters
* Lambda: list_functions() now works with the JS SDK
* Lambda: Choosing the image repository is now deterministic - first a custom source, then mlupin, lambci last
* RDS: Too many improvements to list, with many more supported features and bugfixes


5.0.28
-----
Docker Digest for 5.0.28: _sha256:d3532929e4c498334949a014e9f0af6617ec1e89d92be690cd192fa3354ad7e6_
Expand Down
Loading

0 comments on commit 2350f36

Please sign in to comment.