Dataset Viewer
Auto-converted to Parquet Duplicate
instance_id
string
hints_text
string
patch
string
test_patch
string
created_at
string
problem_statement
string
repo
string
base_commit
string
version
string
PASS_TO_PASS
list
FAIL_TO_PASS
list
eval_script
string
getmoto__moto-6226
Thanks for letting us know and providing the test case @taeho911! I'll raise a fix for this shortly.
diff --git a/moto/ecs/models.py b/moto/ecs/models.py --- a/moto/ecs/models.py +++ b/moto/ecs/models.py @@ -2011,7 +2011,7 @@ def _get_last_task_definition_revision_id(self, family: str) -> int: # type: ig def tag_resource(self, resource_arn: str, tags: List[Dict[str, str]]) -> None: parsed_arn = self._pa...
diff --git a/tests/test_ecs/test_ecs_boto3.py b/tests/test_ecs/test_ecs_boto3.py --- a/tests/test_ecs/test_ecs_boto3.py +++ b/tests/test_ecs/test_ecs_boto3.py @@ -115,7 +115,16 @@ def test_list_clusters(): def test_create_cluster_with_tags(): client = boto3.client("ecs", region_name="us-east-1") tag_list = [...
2023-04-18 11:40:23
A Different Reaction of ECS tag_resource Hello! Let me report a bug found at `moto/ecs/models.py`. # Symptom When try to add new tags to a *_ECS cluster having no tag_*, `moto` fails to merge new tags into existing tags because of TypeError. # Expected Result The new tags should be added to the ECS cluster as ...
getmoto/moto
0a1924358176b209e42b80e498d676596339a077
4.1
[ "tests/test_ecs/test_ecs_boto3.py::test_update_missing_service", "tests/test_ecs/test_ecs_boto3.py::test_start_task_with_tags", "tests/test_ecs/test_ecs_boto3.py::test_update_service", "tests/test_ecs/test_ecs_boto3.py::test_list_task_definitions_with_family_prefix", "tests/test_ecs/test_ecs_boto3.py::test_...
[ "tests/test_ecs/test_ecs_boto3.py::test_create_cluster_with_tags" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff 0a1924358176b209e42b80e498d676596339a077 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 0a192...
getmoto__moto-6736
Marking it as an enhancement. Welcome to Moto @chrisvbrown!
diff --git a/moto/rds/models.py b/moto/rds/models.py --- a/moto/rds/models.py +++ b/moto/rds/models.py @@ -208,6 +208,9 @@ def __init__(self, **kwargs: Any): "timeout_action": "RollbackCapacityChange", "seconds_before_timeout": 300, } + self.serverless_v2_scaling_co...
diff --git a/tests/test_rds/test_rds_clusters.py b/tests/test_rds/test_rds_clusters.py --- a/tests/test_rds/test_rds_clusters.py +++ b/tests/test_rds/test_rds_clusters.py @@ -219,6 +219,10 @@ def test_create_db_cluster_additional_parameters(): "MinCapacity": 5, "AutoPause": True, }, +...
2023-08-27 21:33:41
Aurora Postgres Does Not Support Mock ServerlessV2 From what I can tell, Aurora Postgres does not support ServerlessV2ScalingConfiguration like Neptune does. Support for this would be great!
getmoto/moto
956dd265f028f85a10a237e6b848dcd0c302c2d1
4.2
[ "tests/test_rds/test_rds_clusters.py::test_start_db_cluster_without_stopping", "tests/test_rds/test_rds_clusters.py::test_modify_db_cluster_needs_long_master_user_password", "tests/test_rds/test_rds_clusters.py::test_modify_db_cluster_new_cluster_identifier", "tests/test_rds/test_rds_clusters.py::test_copy_db...
[ "tests/test_rds/test_rds_clusters.py::test_create_db_cluster_additional_parameters" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff 956dd265f028f85a10a237e6b848dcd0c302c2d1 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 956dd...
getmoto__moto-6716
IIRC there is some caching there, to make sure Moto doesn't have to constantly recreate default IAM resources. But it sounds like we're caching a little bit too much. @bblommers at least I don't see the point of caching policies since by default there is none created. Until some fix is ready, my workaround is the fo...
diff --git a/moto/iam/models.py b/moto/iam/models.py --- a/moto/iam/models.py +++ b/moto/iam/models.py @@ -1,4 +1,5 @@ import base64 +import copy import os import string from datetime import datetime @@ -438,6 +439,12 @@ def create_from_cloudformation_json( # type: ignore[misc] ) return polic...
diff --git a/tests/test_iam/test_iam.py b/tests/test_iam/test_iam.py --- a/tests/test_iam/test_iam.py +++ b/tests/test_iam/test_iam.py @@ -3368,7 +3368,7 @@ def test_get_account_summary(): "ServerCertificatesQuota": 20, "MFADevices": 0, "UserPolicySizeQuota": 2048, - "PolicyVersionsInU...
2023-08-22 20:57:43
IAM: mock_iam() is keeping the state when working with roles ## Description I think this is a little bit weird but I'm getting and strange error when executing some tests in a specific order related with IAM policies. ## How to reproduce the issue It can be tested with the following code, we have two context man...
getmoto/moto
a853fd714d133c9a9ca0479cb99537d9a39d85bf
4.1
[ "tests/test_iam/test_iam.py::test_create_policy_already_exists", "tests/test_iam/test_iam.py::test_create_policy_with_tag_containing_large_key", "tests/test_iam/test_iam.py::test_policy_list_config_discovered_resources", "tests/test_iam/test_iam.py::test_list_policy_tags", "tests/test_iam/test_iam.py::test_...
[ "tests/test_iam/test_iam.py::test_get_account_summary" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff a853fd714d133c9a9ca0479cb99537d9a39d85bf source /opt/miniconda3/bin/activate conda activate testbed make init git checkout a853f...
getmoto__moto-4918
diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py --- a/moto/secretsmanager/models.py +++ b/moto/secretsmanager/models.py @@ -180,6 +180,10 @@ def __contains__(self, key): new_key = get_secret_name_from_arn(key) return dict.__contains__(self, new_key) + def get(self, key,...
diff --git a/tests/test_secretsmanager/test_secretsmanager.py b/tests/test_secretsmanager/test_secretsmanager.py --- a/tests/test_secretsmanager/test_secretsmanager.py +++ b/tests/test_secretsmanager/test_secretsmanager.py @@ -226,6 +226,25 @@ def test_delete_secret(): assert secret_details["DeletedDate"] > dateti...
2022-03-08 08:15:01
Deleting secrets not possible with full ARN Deleting secrets in AWS Secrets Manager isn't possible when using the full ARN as secrets id and not specifying `ForceDeleteWithoutRecovery=True`: ```python import boto3 from moto import mock_secretsmanager @mock_secretsmanager def test_delete(): client = boto3....
getmoto/moto
1d7440914e4387661b0f200d16cd85298fd116e9
3.0
[ "tests/test_secretsmanager/test_secretsmanager.py::test_get_secret_that_has_no_value", "tests/test_secretsmanager/test_secretsmanager.py::test_get_secret_value_by_arn", "tests/test_secretsmanager/test_secretsmanager.py::test_update_secret_with_KmsKeyId", "tests/test_secretsmanager/test_secretsmanager.py::test...
[ "tests/test_secretsmanager/test_secretsmanager.py::test_delete_secret_by_arn" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff 1d7440914e4387661b0f200d16cd85298fd116e9 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 1d744...
getmoto__moto-6127
From the docs (https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/secretsmanager.html#SecretsManager.Client.create_secret): ``` Do not end your secret name with a hyphen followed by six characters. If you do so, you risk confusion and unexpected results when searching for a secret by partial ...
diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py --- a/moto/secretsmanager/models.py +++ b/moto/secretsmanager/models.py @@ -16,7 +16,7 @@ InvalidRequestException, ClientError, ) -from .utils import random_password, secret_arn, get_secret_name_from_arn +from .utils import random_pas...
diff --git a/tests/test_secretsmanager/test_secretsmanager.py b/tests/test_secretsmanager/test_secretsmanager.py --- a/tests/test_secretsmanager/test_secretsmanager.py +++ b/tests/test_secretsmanager/test_secretsmanager.py @@ -547,17 +547,26 @@ def test_describe_secret(): @mock_secretsmanager -def test_describe_se...
2023-03-24 23:01:32
Secrets Manager backend does not support partial ARNs The `moto` secrets manager backend is unable to retrieve secrets when a partial ARN is passed as secret ID. **How to reproduce the issue** Here is a minimal example that demonstrates the issue: ```python import boto3 import pytest from moto import mock_secre...
getmoto/moto
5c2fc55ea1d2975d5be50dead4f9b49d76feec8b
4.1
[ "tests/test_secretsmanager/test_secretsmanager.py::test_get_secret_that_has_no_value", "tests/test_secretsmanager/test_secretsmanager.py::test_get_secret_value_by_arn", "tests/test_secretsmanager/test_secretsmanager.py::test_update_secret_with_KmsKeyId", "tests/test_secretsmanager/test_secretsmanager.py::test...
[ "tests/test_secretsmanager/test_secretsmanager.py::test_describe_secret_with_arn[test-secret]", "tests/test_secretsmanager/test_secretsmanager.py::test_describe_secret_with_arn[testsecret]" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff 5c2fc55ea1d2975d5be50dead4f9b49d76feec8b source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 5c2fc...
getmoto__moto-5885
Thanks for raising this @andypaterson40 - looks like we're not doing anything with the `launchTemplate` at the moment, we just store it as is. Will mark it as an enhancement to actually verify it exists and retrieve the corresponding name/id.
diff --git a/moto/eks/models.py b/moto/eks/models.py --- a/moto/eks/models.py +++ b/moto/eks/models.py @@ -284,6 +284,25 @@ def __init__( self.tags = tags self.taints = taints + # Determine LaunchTemplateId from Name (and vice versa) + try: + from moto.ec2.models import ec2_...
diff --git a/tests/test_eks/test_eks_ec2.py b/tests/test_eks/test_eks_ec2.py new file mode 100644 --- /dev/null +++ b/tests/test_eks/test_eks_ec2.py @@ -0,0 +1,73 @@ +import boto3 + +from moto import mock_ec2, mock_eks +from .test_eks_constants import NODEROLE_ARN_VALUE, SUBNET_IDS + + +@mock_eks +def test_passing_an_u...
2023-01-30 23:06:51
EKS DescribeNodegroup not returning id or name launch template attribute in response The boto3 EKS DescribeNodegroup response returns the following for LaunchTemplate: `'launchTemplate': { 'name': 'string', 'version': 'string', 'id': 'string' },` However, the moto res...
getmoto/moto
67197cb8a566ee5d598905f836c90de8ee9399e1
4.1
[ "tests/test_eks/test_eks_ec2.py::test_passing_an_unknown_launchtemplate_is_supported" ]
[ "tests/test_eks/test_eks_ec2.py::test_passing_a_known_launchtemplate_by_name", "tests/test_eks/test_eks_ec2.py::test_passing_a_known_launchtemplate_by_id" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff 67197cb8a566ee5d598905f836c90de8ee9399e1 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 67197...
getmoto__moto-5515
Thanks for raising this @SeanBickle. The instance-type-offerings are a direct dump from AWS - strange that they are using `1b` and `1c`, but not `1a`. Marking it as a bug to fix our hardcoded zones to also use `1b` and `1c` though.
diff --git a/moto/ec2/models/availability_zones_and_regions.py b/moto/ec2/models/availability_zones_and_regions.py --- a/moto/ec2/models/availability_zones_and_regions.py +++ b/moto/ec2/models/availability_zones_and_regions.py @@ -238,8 +238,8 @@ class RegionsAndZonesBackend: Zone(region_name="us-east-2", ...
diff --git a/tests/test_autoscaling/test_autoscaling.py b/tests/test_autoscaling/test_autoscaling.py --- a/tests/test_autoscaling/test_autoscaling.py +++ b/tests/test_autoscaling/test_autoscaling.py @@ -148,7 +148,7 @@ def test_create_auto_scaling_from_template_version__latest(): "LaunchTemplateName": laun...
2022-10-02 11:18:20
Inconsistent `us-west-1` availability zones `us-west-1` only has [2 availability zones accessible to customers](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/). The [mapping of availability zone name to availability zone ID](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) ...
getmoto/moto
37c5be725aef7b554a12cd53f249b2ed8a8b679f
4.0
[ "tests/test_ec2/test_subnets.py::test_describe_subnets_dryrun", "tests/test_ec2/test_ec2_cloudformation.py::test_multiple_security_group_ingress_separate_from_security_group_by_id", "tests/test_elbv2/test_elbv2.py::test_modify_listener_http_to_https", "tests/test_ec2/test_subnets.py::test_available_ip_address...
[ "tests/test_autoscaling/test_autoscaling.py::test_create_auto_scaling_from_template_version__latest", "tests/test_autoscaling/test_autoscaling.py::test_create_autoscaling_policy_with_policytype__targettrackingscaling", "tests/test_ec2/test_subnets.py::test_modify_subnet_attribute_validation", "tests/test_ec2/...
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff 37c5be725aef7b554a12cd53f249b2ed8a8b679f source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 37c5b...
getmoto__moto-6409
Thanks for raising this and for providing the repro @bfbenf! Marking it as a bug.
diff --git a/moto/awslambda/exceptions.py b/moto/awslambda/exceptions.py --- a/moto/awslambda/exceptions.py +++ b/moto/awslambda/exceptions.py @@ -1,4 +1,5 @@ from moto.core.exceptions import JsonRESTError +from typing import Any class LambdaClientError(JsonRESTError): @@ -63,6 +64,16 @@ def __init__(self) -> Non...
diff --git a/tests/test_awslambda/test_lambda_layers.py b/tests/test_awslambda/test_lambda_layers.py --- a/tests/test_awslambda/test_lambda_layers.py +++ b/tests/test_awslambda/test_lambda_layers.py @@ -115,7 +115,7 @@ def test_get_lambda_layers(): assert result["LayerVersions"] == [] # Test create function...
2023-06-14 19:52:46
When deleting a layer using delete_layer_version if provided the Arn moto skips mocking and calls aws Issue: When using lambda delete_layer_version the AWS API Documentation specifies you can use either the Layer Name or ARN in the LayerName property. The test which was running this was setup with a fake boto3 session....
getmoto/moto
1dfbeed5a72a4bd57361e44441d0d06af6a2e58a
4.1
[ "tests/test_awslambda/test_lambda_layers.py::test_get_layer_version__unknown", "tests/test_awslambda/test_lambda_layers.py::test_publish_lambda_layers__without_content", "tests/test_awslambda/test_lambda_layers.py::test_get_layer_version", "tests/test_awslambda/test_lambda_layers.py::test_get_layer_with_no_la...
[ "tests/test_awslambda/test_lambda_layers.py::test_get_lambda_layers", "tests/test_awslambda/test_lambda_layers.py::test_delete_layer_version[True]" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff 1dfbeed5a72a4bd57361e44441d0d06af6a2e58a source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 1dfbe...
python__mypy-11725
diff --git a/mypy/constraints.py b/mypy/constraints.py --- a/mypy/constraints.py +++ b/mypy/constraints.py @@ -581,12 +581,12 @@ def visit_callable_type(self, template: CallableType) -> List[Constraint]: if param_spec is None: # FIX what if generic res = self.infer_against...
diff --git a/test-data/unit/check-parameter-specification.test b/test-data/unit/check-parameter-specification.test --- a/test-data/unit/check-parameter-specification.test +++ b/test-data/unit/check-parameter-specification.test @@ -378,3 +378,31 @@ class C(Generic[P, P2]): def m4(self, x: int) -> None: pas...
2021-12-13T11:47:53Z
Unexpected "need type type annotation" with contextmanager This generates a false positive in `g`: ```py from typing import Generator, Callable, Iterator, TypeVar, ContextManager, Any from typing_extensions import ParamSpec from nonexistent import deco # type: ignore _T = TypeVar("_T") _P = ParamSpec("_P"...
python/mypy
4d2ff58e502b52a908f41c18fbbe7cbb32997504
0.920
[]
[ "mypy/test/testcheck.py::TypeCheckSuite::check-parameter-specification.test::testParamSpecOverUnannotatedDecorator" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff 4d2ff58e502b52a908f41c18fbbe7cbb32997504 source /opt/miniconda3/bin/activate conda activate testbed python -m pip install -r tes...
getmoto__moto-4860
That is an oversight indeed - thanks for raising this, @whardier!
diff --git a/moto/timestreamwrite/models.py b/moto/timestreamwrite/models.py --- a/moto/timestreamwrite/models.py +++ b/moto/timestreamwrite/models.py @@ -14,7 +14,7 @@ def update(self, retention_properties): self.retention_properties = retention_properties def write_records(self, records): - sel...
diff --git a/tests/test_timestreamwrite/test_timestreamwrite_table.py b/tests/test_timestreamwrite/test_timestreamwrite_table.py --- a/tests/test_timestreamwrite/test_timestreamwrite_table.py +++ b/tests/test_timestreamwrite/test_timestreamwrite_table.py @@ -1,6 +1,6 @@ import boto3 import sure # noqa # pylint: disa...
2022-02-14 19:23:21
TimestreamWrite (TimestreamTable.write_records) uses append rather than extend when appropriate. Near as I can tell this was just an oversight: https://github.com/spulec/moto/blob/master/moto/timestreamwrite/models.py#L17 Records will never be a single entity per the spec. https://boto3.amazonaws.com/v1/docume...
getmoto/moto
e75dcf47b767e7be3ddce51292f930e8ed812710
3.0
[ "tests/test_timestreamwrite/test_timestreamwrite_table.py::test_update_table", "tests/test_timestreamwrite/test_timestreamwrite_table.py::test_describe_table", "tests/test_timestreamwrite/test_timestreamwrite_table.py::test_create_table", "tests/test_timestreamwrite/test_timestreamwrite_table.py::test_create_...
[ "tests/test_timestreamwrite/test_timestreamwrite_table.py::test_write_records" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff e75dcf47b767e7be3ddce51292f930e8ed812710 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout e75dc...
getmoto__moto-6868
Hi @mayk0gan! Marking it as an enhancement to add this field. Considering we don't store any actual data for redshift, we'll probably just always return `0` here.
diff --git a/moto/redshift/models.py b/moto/redshift/models.py --- a/moto/redshift/models.py +++ b/moto/redshift/models.py @@ -157,6 +157,7 @@ def __init__( self.restored_from_snapshot = restored_from_snapshot self.kms_key_id = kms_key_id self.cluster_snapshot_copy_status: Optional[Dict[str, ...
diff --git a/tests/test_redshift/test_redshift.py b/tests/test_redshift/test_redshift.py --- a/tests/test_redshift/test_redshift.py +++ b/tests/test_redshift/test_redshift.py @@ -219,6 +219,7 @@ def test_create_cluster_all_attributes(): assert cluster["ClusterVersion"] == "1.0" assert cluster["AllowVersionUpg...
2023-09-29 19:37:58
TotalStorageCapacityInMegaBytes missing from redshift.describe_clusters() ## Reporting Bugs Please be aware of the following things when filing bug reports: 1. Avoid raising duplicate issues. *Please* use the GitHub issue search feature to check whether your bug report or feature request has been mentioned in...
getmoto/moto
06982582b7c46ef7b92350f9c49d6893e4ec51a0
4.2
[ "tests/test_redshift/test_redshift.py::test_describe_cluster_snapshots_not_found_error", "tests/test_redshift/test_redshift.py::test_create_cluster_with_parameter_group_boto3", "tests/test_redshift/test_redshift.py::test_modify_snapshot_copy_retention_period", "tests/test_redshift/test_redshift.py::test_delet...
[ "tests/test_redshift/test_redshift.py::test_create_cluster_all_attributes" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff 06982582b7c46ef7b92350f9c49d6893e4ec51a0 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 06982...
getmoto__moto-5385
diff --git a/moto/autoscaling/models.py b/moto/autoscaling/models.py --- a/moto/autoscaling/models.py +++ b/moto/autoscaling/models.py @@ -484,7 +484,7 @@ def _set_launch_configuration(self, launch_config_name, launch_template): self.launch_template = self.ec2_backend.get_launch_template_by_name( ...
diff --git a/tests/test_autoscaling/test_autoscaling.py b/tests/test_autoscaling/test_autoscaling.py --- a/tests/test_autoscaling/test_autoscaling.py +++ b/tests/test_autoscaling/test_autoscaling.py @@ -771,6 +771,33 @@ def test_create_auto_scaling_from_template_version__default(): response["LaunchTemplate"].shoul...
2022-08-14 11:32:13
AutoscalingGroup with LaunchTemplate and no version throws 500 ``` AWS_ACCESS_KEY_ID=1 AWS_SECRET_ACCESS_KEY=1 AWS_DEFAULT_REGION=us-east-1 aws --endpoint=http://127.0.0.1:5000 autoscaling create-auto-scaling-group --auto-scaling-group-name group1 --min-size 1 --max-size 10 --launch-template 'LaunchTemplateName=tmpl'...
getmoto/moto
3d913f8f1568e4232ffaab06e261b88bb1142a75
4.0
[ "tests/test_autoscaling/test_autoscaling.py::test_create_auto_scaling_from_template_version__latest", "tests/test_autoscaling/test_autoscaling.py::test_set_instance_health", "tests/test_autoscaling/test_autoscaling.py::test_create_autoscaling_policy_with_policytype__targettrackingscaling", "tests/test_autosca...
[ "tests/test_autoscaling/test_autoscaling.py::test_create_auto_scaling_from_template_version__no_version" ]
#!/bin/bash set -exo pipefail source /opt/miniconda3/bin/activate conda activate testbed cd /testbed git config --global --add safe.directory /testbed cd /testbed git status git show git diff 3d913f8f1568e4232ffaab06e261b88bb1142a75 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 3d913...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
205