From 1380d288766fbc7a284796ec597874f8b3e1c29a Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Sun, 23 Apr 2023 15:59:22 +0000 Subject: [PATCH] Prep release 4.1.8 (#6248) --- CHANGELOG.md | 33 +++++++++++++++++++++ IMPLEMENTATION_COVERAGE.md | 46 ++++++++++++++++++++++++----- docs/docs/services/dynamodb.rst | 2 +- docs/docs/services/glue.rst | 4 +-- docs/docs/services/kms.rst | 2 +- docs/docs/services/mediaconnect.rst | 20 +++++++++++++ docs/docs/services/ram.rst | 9 ++++++ docs/docs/services/wafv2.rst | 3 ++ moto/batch_simple/README.md | 7 ----- moto/batch_simple/models.py | 5 ++-- moto/s3/models.py | 10 +++++-- 11 files changed, 119 insertions(+), 22 deletions(-) delete mode 100644 moto/batch_simple/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 163b33d9c..ec4f11aa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,39 @@ Moto Changelog ============== + +4.1.8 +----- +Docker Digest for 4.1.8: + + New Methods: + * DynamoDB: + * batch_execute_statement() + * execute_statement() + * execute_transaction() + + * Glue: + * batch_get_jobs() + * delete_job() + + * KMS: + * get_public_key() + + Miscellaneous: + * Athena: Fixed a bug causing every call to `get_workgroup(WorkGroup="primary")` to fail + * AWSLambda: Performance improvement: Docker images are no longer re-downloaded if they already exist + * BatchSimple now uses the environment variable MOTO_SIMPLE_BATCH_FAIL_AFTER=0 to determine whether the job should fail, and after how many seconds + * EC2: replace_route() now supports the NetworkInterfaceId-parameter + * ECR: batch_get_image() now correctly returns images when requested using an older tag + * ELBv2: describe_target_health() now returns the correct error message for unregistered targets + * S3: copy_object() now adds a checksum to a copied object if requested + * S3: get_object() no longer returns a VersionId for non-versioned buckets + * SES: Templates now allow a single curly brace, and no longer assume it's part of a variable + * SSM: describe_parameters() now allows filtering by existence of tag-name + * StepFunctions: The SF_EXECUTION_HISTORY_TYPE=FAILURE environment variable can now be used to generate failure responses for all operations + * STS: assume_role() now stores the AccessKey in the requesting account + + 4.1.7 ----- Docker Digest for 4.1.7: _sha256:6b877d5efe86562d27f296638d6b163c7987913c203874578d00fa1f83eea000_ diff --git a/IMPLEMENTATION_COVERAGE.md b/IMPLEMENTATION_COVERAGE.md index 84e6c06ee..39449b890 100644 --- a/IMPLEMENTATION_COVERAGE.md +++ b/IMPLEMENTATION_COVERAGE.md @@ -3121,7 +3121,7 @@ ## glue
-25% implemented +26% implemented - [X] batch_create_partition - [ ] batch_delete_connection @@ -3133,7 +3133,7 @@ - [ ] batch_get_custom_entity_types - [ ] batch_get_data_quality_result - [ ] batch_get_dev_endpoints -- [ ] batch_get_jobs +- [X] batch_get_jobs - [X] batch_get_partition - [ ] batch_get_triggers - [ ] batch_get_workflows @@ -3175,7 +3175,7 @@ - [ ] delete_data_quality_ruleset - [X] delete_database - [ ] delete_dev_endpoint -- [ ] delete_job +- [X] delete_job - [ ] delete_ml_transform - [X] delete_partition - [ ] delete_partition_index @@ -4027,7 +4027,7 @@ ## kms
-58% implemented +60% implemented - [X] cancel_key_deletion - [ ] connect_custom_key_store @@ -4295,24 +4295,39 @@ ## mediaconnect
-60% implemented +36% implemented +- [ ] add_bridge_outputs +- [ ] add_bridge_sources - [ ] add_flow_media_streams - [X] add_flow_outputs - [X] add_flow_sources - [X] add_flow_vpc_interfaces +- [ ] create_bridge - [X] create_flow +- [ ] create_gateway +- [ ] delete_bridge - [X] delete_flow +- [ ] delete_gateway +- [ ] deregister_gateway_instance +- [ ] describe_bridge - [X] describe_flow +- [ ] describe_gateway +- [ ] describe_gateway_instance - [ ] describe_offering - [ ] describe_reservation - [X] grant_flow_entitlements +- [ ] list_bridges - [ ] list_entitlements - [X] list_flows +- [ ] list_gateway_instances +- [ ] list_gateways - [ ] list_offerings - [ ] list_reservations - [X] list_tags_for_resource - [ ] purchase_offering +- [ ] remove_bridge_output +- [ ] remove_bridge_source - [ ] remove_flow_media_stream - [X] remove_flow_output - [ ] remove_flow_source @@ -4322,11 +4337,16 @@ - [X] stop_flow - [X] tag_resource - [ ] untag_resource +- [ ] update_bridge +- [ ] update_bridge_output +- [ ] update_bridge_source +- [ ] update_bridge_state - [ ] update_flow - [X] update_flow_entitlement - [ ] update_flow_media_stream - [X] update_flow_output - [X] update_flow_source +- [ ] update_gateway_instance
## medialive @@ -5123,12 +5143,16 @@ ## ram
-20% implemented +14% implemented - [ ] accept_resource_share_invitation - [ ] associate_resource_share - [ ] associate_resource_share_permission +- [ ] create_permission +- [ ] create_permission_version - [X] create_resource_share +- [ ] delete_permission +- [ ] delete_permission_version - [X] delete_resource_share - [ ] disassociate_resource_share - [ ] disassociate_resource_share_permission @@ -5139,14 +5163,19 @@ - [ ] get_resource_share_invitations - [X] get_resource_shares - [ ] list_pending_invitation_resources +- [ ] list_permission_associations - [ ] list_permission_versions - [ ] list_permissions - [ ] list_principals +- [ ] list_replace_permission_associations_work - [ ] list_resource_share_permissions - [ ] list_resource_types - [ ] list_resources +- [ ] promote_permission_created_from_policy - [ ] promote_resource_share_created_from_policy - [ ] reject_resource_share_invitation +- [ ] replace_permission_associations +- [ ] set_default_permission_version - [ ] tag_resource - [ ] untag_resource - [X] update_resource_share @@ -6867,10 +6896,11 @@ ## wafv2
-25% implemented +23% implemented - [X] associate_web_acl - [ ] check_capacity +- [ ] create_api_key - [ ] create_ip_set - [ ] create_regex_pattern_set - [ ] create_rule_group @@ -6885,6 +6915,7 @@ - [ ] describe_managed_rule_group - [X] disassociate_web_acl - [ ] generate_mobile_sdk_release_url +- [ ] get_decrypted_api_key - [ ] get_ip_set - [ ] get_logging_configuration - [ ] get_managed_rule_set @@ -6896,6 +6927,7 @@ - [ ] get_sampled_requests - [X] get_web_acl - [X] get_web_acl_for_resource +- [ ] list_api_keys - [ ] list_available_managed_rule_group_versions - [ ] list_available_managed_rule_groups - [ ] list_ip_sets diff --git a/docs/docs/services/dynamodb.rst b/docs/docs/services/dynamodb.rst index a79fd1b8b..67df464b0 100644 --- a/docs/docs/services/dynamodb.rst +++ b/docs/docs/services/dynamodb.rst @@ -59,7 +59,7 @@ dynamodb Pagination is not yet implemented. - Parsing of the statement is highly experimental - please raise an issue if you find any bugs. + Parsing is highly experimental - please raise an issue if you find any bugs. - [X] execute_transaction diff --git a/docs/docs/services/glue.rst b/docs/docs/services/glue.rst index 61c3ddbcd..cae4e623c 100644 --- a/docs/docs/services/glue.rst +++ b/docs/docs/services/glue.rst @@ -35,7 +35,7 @@ glue - [ ] batch_get_custom_entity_types - [ ] batch_get_data_quality_result - [ ] batch_get_dev_endpoints -- [ ] batch_get_jobs +- [X] batch_get_jobs - [X] batch_get_partition - [ ] batch_get_triggers - [ ] batch_get_workflows @@ -81,7 +81,7 @@ glue - [ ] delete_data_quality_ruleset - [X] delete_database - [ ] delete_dev_endpoint -- [ ] delete_job +- [X] delete_job - [ ] delete_ml_transform - [X] delete_partition - [ ] delete_partition_index diff --git a/docs/docs/services/kms.rst b/docs/docs/services/kms.rst index cc03faed7..6017b6003 100644 --- a/docs/docs/services/kms.rst +++ b/docs/docs/services/kms.rst @@ -63,7 +63,7 @@ kms - [X] get_key_policy - [X] get_key_rotation_status - [ ] get_parameters_for_import -- [ ] get_public_key +- [X] get_public_key - [ ] import_key_material - [ ] list_aliases - [X] list_grants diff --git a/docs/docs/services/mediaconnect.rst b/docs/docs/services/mediaconnect.rst index af12af561..08fc5177e 100644 --- a/docs/docs/services/mediaconnect.rst +++ b/docs/docs/services/mediaconnect.rst @@ -25,26 +25,41 @@ mediaconnect |start-h3| Implemented features for this service |end-h3| +- [ ] add_bridge_outputs +- [ ] add_bridge_sources - [ ] add_flow_media_streams - [X] add_flow_outputs - [X] add_flow_sources - [X] add_flow_vpc_interfaces +- [ ] create_bridge - [X] create_flow +- [ ] create_gateway +- [ ] delete_bridge - [X] delete_flow +- [ ] delete_gateway +- [ ] deregister_gateway_instance +- [ ] describe_bridge - [X] describe_flow +- [ ] describe_gateway +- [ ] describe_gateway_instance - [ ] describe_offering - [ ] describe_reservation - [X] grant_flow_entitlements +- [ ] list_bridges - [ ] list_entitlements - [X] list_flows Pagination is not yet implemented +- [ ] list_gateway_instances +- [ ] list_gateways - [ ] list_offerings - [ ] list_reservations - [X] list_tags_for_resource - [ ] purchase_offering +- [ ] remove_bridge_output +- [ ] remove_bridge_source - [ ] remove_flow_media_stream - [X] remove_flow_output - [ ] remove_flow_source @@ -54,9 +69,14 @@ mediaconnect - [X] stop_flow - [X] tag_resource - [ ] untag_resource +- [ ] update_bridge +- [ ] update_bridge_output +- [ ] update_bridge_source +- [ ] update_bridge_state - [ ] update_flow - [X] update_flow_entitlement - [ ] update_flow_media_stream - [X] update_flow_output - [X] update_flow_source +- [ ] update_gateway_instance diff --git a/docs/docs/services/ram.rst b/docs/docs/services/ram.rst index ad2b43fb8..f60258cbd 100644 --- a/docs/docs/services/ram.rst +++ b/docs/docs/services/ram.rst @@ -28,7 +28,11 @@ ram - [ ] accept_resource_share_invitation - [ ] associate_resource_share - [ ] associate_resource_share_permission +- [ ] create_permission +- [ ] create_permission_version - [X] create_resource_share +- [ ] delete_permission +- [ ] delete_permission_version - [X] delete_resource_share - [ ] disassociate_resource_share - [ ] disassociate_resource_share_permission @@ -39,14 +43,19 @@ ram - [ ] get_resource_share_invitations - [X] get_resource_shares - [ ] list_pending_invitation_resources +- [ ] list_permission_associations - [ ] list_permission_versions - [ ] list_permissions - [ ] list_principals +- [ ] list_replace_permission_associations_work - [ ] list_resource_share_permissions - [ ] list_resource_types - [ ] list_resources +- [ ] promote_permission_created_from_policy - [ ] promote_resource_share_created_from_policy - [ ] reject_resource_share_invitation +- [ ] replace_permission_associations +- [ ] set_default_permission_version - [ ] tag_resource - [ ] untag_resource - [X] update_resource_share diff --git a/docs/docs/services/wafv2.rst b/docs/docs/services/wafv2.rst index 5fee68964..3b11eb764 100644 --- a/docs/docs/services/wafv2.rst +++ b/docs/docs/services/wafv2.rst @@ -33,6 +33,7 @@ wafv2 - [ ] check_capacity +- [ ] create_api_key - [ ] create_ip_set - [ ] create_regex_pattern_set - [ ] create_rule_group @@ -55,6 +56,7 @@ wafv2 - [ ] describe_managed_rule_group - [X] disassociate_web_acl - [ ] generate_mobile_sdk_release_url +- [ ] get_decrypted_api_key - [ ] get_ip_set - [ ] get_logging_configuration - [ ] get_managed_rule_set @@ -66,6 +68,7 @@ wafv2 - [ ] get_sampled_requests - [X] get_web_acl - [X] get_web_acl_for_resource +- [ ] list_api_keys - [ ] list_available_managed_rule_group_versions - [ ] list_available_managed_rule_groups - [ ] list_ip_sets diff --git a/moto/batch_simple/README.md b/moto/batch_simple/README.md deleted file mode 100644 index 9f89ed2da..000000000 --- a/moto/batch_simple/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# batch_simple - -Batch jobs run under `batch_simple` will succeed by default. To make the jobs fail: - -1. set environment variable `MOTO_SIMPLE_BATCH_FAIL_AFTER=0` OR -2. set environment variable `MOTO_SIMPLE_BATCH_FAIL_AFTER` to an integer value - to make it fail after that number of seconds, ie `MOTO_SIMPLE_BATCH_FAIL_AFTER=4` will fail after 4 seconds diff --git a/moto/batch_simple/models.py b/moto/batch_simple/models.py index 3b246b98c..f9761172e 100644 --- a/moto/batch_simple/models.py +++ b/moto/batch_simple/models.py @@ -15,8 +15,9 @@ from typing import Any, Dict, List, Tuple, Optional class BatchSimpleBackend(BaseBackend): """ - Implements a Batch-Backend that does not use Docker containers. Submitted Jobs are marked as Success or Fail, - depending on the presence and value of MOTO_SIMPLE_BATCH_FAIL_AFTER env var + Implements a Batch-Backend that does not use Docker containers. Submitted Jobs are marked as Success by default. + + Set the environment variable MOTO_SIMPLE_BATCH_FAIL_AFTER=0 to fail jobs immediately, or set this variable to a positive integer to control after how many seconds the job fails. Annotate your tests with `@mock_batch_simple`-decorator to use this Batch-implementation. """ diff --git a/moto/s3/models.py b/moto/s3/models.py index 332262255..fa6fe080a 100644 --- a/moto/s3/models.py +++ b/moto/s3/models.py @@ -1452,20 +1452,26 @@ class FakeBucket(CloudFormationModel): class S3Backend(BaseBackend, CloudWatchMetricProvider): """ - Moto implementation for S3. - Custom S3 endpoints are supported, if you are using a S3-compatible storage solution like Ceph. Example usage: .. sourcecode:: python os.environ["MOTO_S3_CUSTOM_ENDPOINTS"] = "http://custom.internal.endpoint,http://custom.other.endpoint" + @mock_s3 def test_my_custom_endpoint(): boto3.client("s3", endpoint_url="http://custom.internal.endpoint") ... Note that this only works if the environment variable is set **before** the mock is initialized. + + When using the MultiPart-API manually, the minimum part size is 5MB, just as with AWS. Use the following environment variable to lower this: + + .. sourcecode:: bash + + S3_UPLOAD_PART_MIN_SIZE=256 + """ def __init__(self, region_name: str, account_id: str):