Skip to content

Commit

Permalink
update from master (#1)
Browse files Browse the repository at this point in the history
* Fix Mock 4.0.3 compatibility - Unpatch only once during teardown (getmoto#3541)

* getmoto#3535 - Unpatch only once during teardown

* EnvVar patching - Fix Python2 bug

* Allow latest version of mock-library

* Add validation to API Key min length value (getmoto#3652)

* api gateway - add api key minimum length validation

* api gateway - support includeValue query parameter on api key apis

* [apigateway] code refactoring

* Cleanup - remove duplicate utility methods

* APIGateway - Dont send headers with error messsage

Co-authored-by: Jovan Zivanov <[email protected]>

* Cloudformation - Create ApiGateway resources (getmoto#3659)

* Cloudformation - Create ApiGateway resources

* Cleanup

* Linting

* adding list_create_account_status to organization getmoto#3691 (getmoto#3692)

* adding list_create_account_status to organization getmoto#3691

* removing todo comment

Co-authored-by: Chris Walters <[email protected]>

* Enhancement: implement EC2 instance filtering by `subnet-id` (getmoto#3694)

Co-authored-by: Tony Greising-Murschel <[email protected]>

* events: fix archive event pattern match check (getmoto#3671)

* events: fix archive event pattern match check

There is a missing `return True` for the positive match case in
matches_pattern, causing all valid patterns to fail.

* events: add test for valid, non-empty pattern match

* Pin RSA dependency for Py2 (getmoto#3697)

* Update build.yml

* Enable Py2 test coverage (getmoto#3698)

* Enable Py2 test coverage

* Coverage - exclude XRay as it's throwing errors

* Update requirements-tests.txt

* Revert "Coverage - exclude XRay as it's throwing errors"

This reverts commit bb58e0e.

* Enable coverage for all workflows

* Refactor ARNs to remove hardcoded account id (getmoto#3701)

* Fix: DynamoDB:GetItem throws wrong error when table doesn't exist (getmoto#3700)

* Fix: DynamoDB:GetItem throws wrong error when table doesn't exist

* Use unique exception for table not found, per PR feedback

* Just fix the reported issue, without touching anything else...

* Update integration test to use Pytest (getmoto#3703)

* Refactor int test to use pytest

* Add comments to int test script

* Support Podman for mocking Lambda (getmoto#3702)

* Support Podman for mocking Lambda

Podman supports all Docker APIs used in moto since version 3.0. Note
that Podman requires pulling the image before creating a container
using a fully-qualified image name (e.g., "docker.io/library/busybox"
instead of "busybox").

Test plan:
$ podman system service -t 0
$ DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock" pytest

Fixes getmoto#3276

* Run black

* Python 2 compatibility

* Address review comments and improve parse_image_ref

* pool domain should always return a domain (getmoto#3707)

* pool domain should always return a domain

Refs getmoto#3706

* set character encoding

* test CloudFrontDomain exists on pool domain

* describe pool domain does not return cloudfront domain

* Update stackset create operation to correctly return the resource's ID. (getmoto#3709)

* Update stackset create operation to correctly return the resource's ID.

* Add test confirming create_stack_set response.

* feature/refresh_trusted_advisor_check (getmoto#3705)

* Support - added refresh_trusted_advisor_check
- Returns a random check status
- Returns the check id in the response
- Testing for these two functionalities

* test_support - addressed PR comments, to cycle through a faked number of
check status responses

* dynamodb: fix deleting last set element (w/attr name) (getmoto#3708)

* dynamodb: deleting last set element

* add user-facing test

* Fix stackset describe/delete. Fix stackset update. (getmoto#3713)

* Fix stack set fetching and deleting.

* Also fix stackset update operation to accept previous values.

* Fix linting.

* Rename aliased test.

* add tags support to ECS tasks (getmoto#3715)

* add tags support to ECS tasks

* lint

* lint

* fmt

* fmt with same version

Co-authored-by: ltagliamonte <[email protected]>

* Fix unknown instance type (getmoto#3710)

* Use apiname when comparing unknown instance ids

* Use get_instance_types API to populate instance_types.json

* Fix scope of instances array when retrieving instance types

* Add installation-methods to docs (getmoto#3720)

* Changelog 2.0.0 (getmoto#3721)

* Changelog for upcoming release (..-27/01)

* Changelog for upcoming release (..-21-02)

* Update Implementation Coverage

* Update AWS Managed Policies

* Update release version

* Add the status field to ECS task definitions (getmoto#3723)

Also I found extra tests for describe_task_definition and deregister_task_definition that were not being run,
so I changed their names so they are found by pytest and made them pass.  I also added checks to them for the new
status field.

* Automate release - Test Github Action (getmoto#3726)

* Test custom action with custom input

* Run test workflow on push

* Only allow release on manual trigger

* Fixes for IAM Role Description field in responses from list_roles and create_roles (getmoto#3724)

* Add IAM Role Description field to list_roles responses

The IAM ListRoles IAM API call will return the Description key/value
for each role if it exists.  If it does not exist the Description
key is not included.

* fix handling in create_role resp

* blackg

* Combine two tests using pytest.mark.parametrize

* consistency

* added feature update_usage_plan and fixed some lint errors (getmoto#3727)

Co-authored-by: rajinder saini <[email protected]>

* Implements core MediaConnect endpoints (getmoto#3718)

* Adds initial models and implements create_flow endpoint.

* Updates README with a Releases section

* Removes unused import

* Adds __init__.py files to MediaLive and MediaConnect test directories.

* Adds list_flows endpoint and tests.

* Adds describe_flow endpoint and tests.

* Adds delete_flow endpoint and tests.

* Adds URLs

* Adds start_flow and stop_flow endpoints and tests.

* Adds tag_resource and list_tags_for_resource endpoints and tests.

* Uses unquote for ARNs

* 3730 update api key - doc update  (getmoto#3731)

* updated doc for added update_api_key / update_usage_plan feature

* updated doc for added update_api_key / update_usage_plan feature

Co-authored-by: rajinder saini <[email protected]>

* Update ImplementationCoverage for APIGateway (getmoto#3733)

* Add eventbridge replay (getmoto#3735)

* Add events.start_replay

* Add events.describe_replay

* Add events.list_replays

* Add events.cancel_replay

* implement actual replay functionality

* Fix Python 2.7 issues

* Support SSM Parameter tags (getmoto#3739)

* Fix:update rule (getmoto#3734)

* Fix:SQS-message retention period consideration

* Fix:SQS-message retention period consideration

* Fix:SQS-message retention period consideration

* Added comments &linting

* Fixed tests

* Fix:update rule

* Linting and comments

Co-authored-by: Bert Blommers <[email protected]>
Co-authored-by: Jovan Zivanov <[email protected]>
Co-authored-by: chrisw-dev <[email protected]>
Co-authored-by: Chris Walters <[email protected]>
Co-authored-by: Tony Greising-Murschel <[email protected]>
Co-authored-by: Emilio López <[email protected]>
Co-authored-by: Brian Pandola <[email protected]>
Co-authored-by: Chih-Hsuan Yen <[email protected]>
Co-authored-by: Gordon Forsythe <[email protected]>
Co-authored-by: Jakub Musko <[email protected]>
Co-authored-by: Connor <[email protected]>
Co-authored-by: Ilya Konstantinov <[email protected]>
Co-authored-by: Luigi Tagliamonte <[email protected]>
Co-authored-by: ltagliamonte <[email protected]>
Co-authored-by: Nuwan Goonasekera <[email protected]>
Co-authored-by: William Richard <[email protected]>
Co-authored-by: Jon Michaelchuck <[email protected]>
Co-authored-by: rajinder <[email protected]>
Co-authored-by: rajinder saini <[email protected]>
Co-authored-by: Jordan Dimov <[email protected]>
Co-authored-by: Anton Grübel <[email protected]>
Co-authored-by: Joakim Saario <[email protected]>
Co-authored-by: usmangani1 <[email protected]>
  • Loading branch information
24 people authored Mar 3, 2021
1 parent d8097b2 commit 16b3ddf
Show file tree
Hide file tree
Showing 84 changed files with 41,042 additions and 14,164 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements-dev.txt') }}
key: pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
- name: Install Linux dependencies
if: ${{ matrix.python-version == 3.8 && steps.pip-cache.outputs.cache-hit != 'true' }}
run: |
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements-dev.txt') }}
key: pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
# Still need to properly install the dependencies - it will only skip the download part
- name: Install project dependencies
run: |
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements-dev.txt') }}
key: pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
- name: Install Linux dependencies
if: ${{ matrix.python-version == 3.8 }}
run: |
Expand All @@ -105,16 +105,10 @@ jobs:
pip install -r requirements-dev.txt
pip install pytest-cov
- name: Test with pytest
if: ${{ matrix.python-version == 2.7 }}
run: |
make test-only
# Pytest-cov explicitly fails in Py2 for XRay tests
- name: Test with pytest/coverage
if: ${{ matrix.python-version != 2.7 }}
run: |
make test-coverage
- name: "Upload coverage to Codecov"
if: ${{ matrix.python-version != 2.7 && github.repository == 'spulec/moto'}}
if: ${{ github.repository == 'spulec/moto'}}
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
Expand Down Expand Up @@ -149,7 +143,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements-dev.txt') }}
key: pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
- name: Install Linux dependencies
if: ${{ matrix.python-version == 3.8 }}
run: |
Expand All @@ -158,20 +152,13 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Test ServerMode
if: ${{ matrix.python-version == 2.7 }}
env:
TEST_SERVER_MODE: ${{ true }}
run: |
make test-only
- name: Test ServerMode/Coverage
if: ${{ matrix.python-version != 2.7 }}
env:
TEST_SERVER_MODE: ${{ true }}
run: |
make test-coverage
- name: "Upload coverage to Codecov"
if: ${{ matrix.python-version != 2.7 && github.repository == 'spulec/moto'}}
if: ${{ github.repository == 'spulec/moto'}}
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
default: ''

jobs:
hello_world_job:
runs-on: ubuntu-latest
name: A job to say hello
steps:
- name: Hello world action step
id: hello
uses: bblommers/moto-release-action@v1
with:
who-to-greet: 'Mona the Octocat wants to release ${{ github.event.inputs.version }}'
# Use the output from the `hello` step
- name: Get the output time
run: echo "The time was ${{ steps.hello.outputs.time }}"
194 changes: 190 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,196 @@ Moto Changelog

Unreleased
-----
* Reduced dependency overhead.
It is now possible to install dependencies for only specific services using:
pip install moto[service1,service1].
See the README for more information.


2.0.0
----
Full list of PRs merged in this release:
https://github.com/spulec/moto/pulls?q=is%3Apr+is%3Aclosed+merged%3A2020-09-07..2021-02-23

General Changes:
* When installing, it is now required to specify the service you want to use:
pip install moto[service1,service2]
pip install moto[all]
This will ensure that only the required dependencies are downloaded.
See the README for more information.
* Moved CI to Github Actions
* Moto no longer hogs the _default_mock from responses
* Internal testing is now executed using Pytest (instead of Nose)
* CORS is now enabled when running MotoServer

* AWS Lambda and Batch now support Podman as an alternative to Docker

New Services:
* Forecast
* MediaLive
* Support
* Transcribe

New Methods:
* Application Autoscaling
* delete_scaling_policy
* deregister_scalable_target
* describe_scaling_policies
* put_scaling_policy
* Batch
* batch_update_partition
* Cognito IDP
* admin_set_user_password
* EC2
* create_flow_logs
* delete_flow_logs
* describe_flow_logs
* describe_instance_type_offerings
* describe_vpc_endpoints
* EMR
* create_security_configuration
* delete_security_configuration
* get_security_configuration
* modify_cluster
* put_autoscaling_policy
* remove_auto_scaling_policy
* Events
* create_archive
* delete_archive
* describe_archive
* list_archives
* update_archive
* Lambda
* get_function_configuration
* get_layer_version
* list_layers
* publish_layer_version
* IAM
* associate_iam_instance_profile
* delete_role_permissions_boundary
* describe_iam_instance_profile_associations
* disassociate_iam_instance_profile
* put_role_permissions_boundary
* replace_iam_instance_profile_association
* set_default_policy_version
* tag_user
* untag_user
* IOT
* create_topic_rule
* delete_topic_rule
* disable_topic_rule
* enable_topic_rule
* get_topic_rule
* list_topic_rules
* replace_topic_rule
* Redshift
* get_cluster_credentials
* Route53
* get_change (dummy)
* SageMaker
* create_notebook_instance_lifecycle_config
* delete_notebook_instance_lifecycle_config
* describe_notebook_instance_lifecycle_config
* Secrets Manager
* tag_resource
* SES
* test_render_template
* update_template
* Step Functions
* get_execution_history
* tag_resource
* untag_resource
* update_state_machine

General Changes:
* ACM - import_certificate() now supports the Tags-parameter
* ACM - request_certificate() now supports the Tags-parameter
* CF - SSHIngressRule now supports CidrIp and Description
* CF - Now fully supports:
AWS::StepFunctions::StateMachine
* CF - Now supports creation of:
AWS::ApiGateway::Deployment
AWS::ApiGateway::Method
AWS::ApiGateway::Resource
AWS::ApiGateway::RestApi
AWS::Lambda::Permission
* CF - Now supports S3 outputs: Arn, DomainName, DualStackDomainName, RegionalDomainName, WebsiteURL
* CloudWatch - list_metrics() no longer returns duplicate entries
* CloudWatch - put_metric_alarm() now supports the Metrics and DatapointsToAlarm parameters
* Config - Now supports IAM (Role, Policy)
* Cognito - admin_initiate_auth() now supports the ADMIN_USER_PASSWORD_AUTH-flow
* CognitoIDP - list_users() now supports spaces in the Filter-parameter
* DynamoDB - GSI's now support the ProjectionType=INCLUDE parameter
* DynamoDB - put_item() now supports empty values (in non-key attributes)
* DynamoDB - update_item() now supports the ADD operation to a list (using the AttributeUpdates-parameter)
* DynamoDB - update_item() now supports the PUT operation to a StringSet (using the AttributeUpdates-parameter)
* DynamoDB - update_item() now supports ReturnValues='UPDATED_NEW'
* DynamoDB - update_item() now defaults to PUT if the action is not supplied
* DynamoDB Streams - The event name for deletions has been corrected to REMOVE (was DELETE before)
* EB - create()/describe_applications() now return a properly formatted ARN (that contains the application-name)
* EC2 - copy_snapshot() now supports the TagSpecifications-parameter
* EC2 - create_image() now supports the TagSpecifications-parameter
* EC2 - create_internet_gateway() now supports the TagSpecifications-parameter
* EC2 - create_nat_gateway() now supports the TagSpecification-parameter
* EC2 - create_network_acl() now supports the TagSpecification-parameter
* EC2 - create_route_table() now supports the TagSpecifications-parameter
* EC2 - create_subnet() now supports the TagSpecifications-parameter
* EC2 - create_subnet() now supports secondary CidrBlock-values
* EC2 - create_tags() now supports empty values
* EC2 - create_volume() now supports the KmsKeyId-parameter
* EC2 - create_vpc now supports the TagSpecifications-parameter
* EC2 - create_vpc_endpoint() now properly handles private_dns_enabled-parameter in CF/TF
* EC2 - create_vpn_endpoint() now supports the VpnGatewayId-parameter
* EC2 - describe_addresses() now returns Tags
* EC2 - describe_instances() now supports filtering by the subnet-id-attribute
* EC2 - describe_subnets() now supports filtering by the state-attribute
* ECR - list_images() now returns a proper value for the imageDigest-attribute
* ECS - the default cluster is now used in a variety of methods, if the Cluster-parameter is not supplied
* ECS - create_service() now supports the launchType-parameter
* ECS - delete_service() now supports the force-parameter
* ECS - describe_container_instances() now returns the registeredAt-attribute
* ECS - list_tasks now supports the filters family/service_name/desired_status
* ECS - register_scalable_target() now supports updates
* ECS - register_task_definition() now returns some attributes that were missing before
* ECS - run_task() now supports the tags-parameter
* EMR - ReleaseLabel now respects semantic versioning
* Events - Now supports the Go SDK
* Events - list_rules() now returns the EventBusName-parameter
* Events - put_events() now has basic input validation
* Glue - create_database() now returns some attributes that were missing before
* IAM - create_user() now returns the Tags-attribute
* IAM - list_roles() now supports the parameters PathPrefix/Marker/MaxItems
* IOT - delete_thing_group() is now idempotent
* Lambda - update_function_configuration() now supports the VpcConfig-parameter
* RDS - create_db_parameter_group() now returns the DBParameterGroupArn-attribute
* RDS - describe_db_instances() now returns the TagList-attribute
* RDS - describe_db_instances() now supports the filters-parameter
* RDS - describe_db_snapshots() now supports the filters-parameter
* Redshift - modify_cluster() now checks for invalid ClusterType/NumberOfNodes combinations
* ResourceGroupTagging: Now supports EC2 VPC resources
* ResourceGroupTagging: Now supports RDS DBInstance, DBSnapshot resources
* ResourceGroupTagging - get_resources() has improved support for the TagFilters-parameter
* S3 - copy_object() now supports copying deleted and subsequently restored objects with storage class Glacier
* S3 - get_object() now throws the correct error for an unknown VersionId
* S3 - get_object() now supports an empty Range-parameter
* S3 - get_object() now returns headers that were missing in some cases (ContentLength/ActualObjectSize/RangeRequested)
* S3 - put_object/get_object now support the ServerSideEncryption/SSEKMSKeyId/BucketKeyEnabled parameters
* S3 - list_object_versions now returns the object in the correct sort order (last modified time)
* SecretsManager - describe_secret() now returns a persistent ARN
* SecretsManager - get_secret_value() now requires a version to exist
* SecretsManager - put_secret_value() now requires a secret to exist
* SES - get-template() now returns the HtmlPart-attribute
* SNS - Support KmsMasterKeyId-attribute
* SNS - create_topic() no longer throws an error when creating a FIFO queue
* SNS - delete_topic() now also deletes the corresponding subscriptions
* SNS - delete_topic() now raises an appropriate exception if the supplied topic not exists
* Step Functions - list_executions() now supports filtering and pagination
* SQS - The MD5OfMessageAttributes is now computed correctly
* SQS - a message in the DLQ now no longer blocks other messages with that MessageGroupId
* SQS - create_queue() now supports the MaximumMessageSize-attribute
* SQS - receive_message() now supports MessageAttributeNames=["All"]
* SQS - send_message() now deduplicates properly using the MessageDeduplicationId



Expand Down
Loading

0 comments on commit 16b3ddf

Please sign in to comment.