Dataset Viewer
Auto-converted to Parquet Duplicate
instance_id
stringlengths
15
76
hints_text
stringclasses
219 values
patch
stringlengths
294
32.5k
test_patch
stringclasses
371 values
created_at
stringclasses
371 values
problem_statement
stringlengths
0
15.3k
repo
stringclasses
102 values
base_commit
stringclasses
459 values
version
stringclasses
61 values
PASS_TO_PASS
listlengths
0
12.4k
FAIL_TO_PASS
listlengths
1
1.59k
data_source
stringclasses
2 values
prompt
listlengths
1
1
env_class
stringclasses
1 value
instance
stringlengths
1.95k
1.83M
eval_script
stringlengths
384
129k
getmoto__moto-7365
diff --git a/moto/dynamodb/models/dynamo_type.py b/moto/dynamodb/models/dynamo_type.py --- a/moto/dynamodb/models/dynamo_type.py +++ b/moto/dynamodb/models/dynamo_type.py @@ -1,6 +1,6 @@ import base64 import copy -import decimal +from decimal import Decimal from typing import Any, Dict, List, Optional, Union from...
diff --git a/tests/test_dynamodb/test_dynamodb_update_expressions.py b/tests/test_dynamodb/test_dynamodb_update_expressions.py --- a/tests/test_dynamodb/test_dynamodb_update_expressions.py +++ b/tests/test_dynamodb/test_dynamodb_update_expressions.py @@ -1,3 +1,5 @@ +from decimal import Decimal + import boto3 import ...
2024-02-19 20:29:03
DynamoDB's `update_item` performs floating-point arithmetic with mock table created via `boto3` When using `moto.mock_aws` to create a `pytest` fixture for a DynamoDB table created with `boto3`, it appears that the `update_item` operation called with an `ADD` expression performs floating-point arithmetic rather than `D...
getmoto/moto
7f6c9cb1deafb280fe7fcc7551c38e397f11a706
5.0
[ "tests/test_dynamodb/test_dynamodb_update_expressions.py::test_update_different_map_elements_in_single_request" ]
[ "tests/test_dynamodb/test_dynamodb_update_expressions.py::test_update_item_add_float" ]
SWE-Gym/SWE-Gym
[ { "content": "DynamoDB's `update_item` performs floating-point arithmetic with mock table created via `boto3`\nWhen using `moto.mock_aws` to create a `pytest` fixture for a DynamoDB table created with `boto3`, it appears that the `update_item` operation called with an `ADD` expression performs floating-point ar...
null
{"FAIL_TO_PASS": ["tests/test_dynamodb/test_dynamodb_update_expressions.py::test_update_item_add_float"], "PASS_TO_PASS": ["tests/test_dynamodb/test_dynamodb_update_expressions.py::test_update_different_map_elements_in_single_request"], "base_commit": "7f6c9cb1deafb280fe7fcc7551c38e397f11a706", "created_at": "2024-02-1...
#!/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 7f6c9cb1deafb280fe7fcc7551c38e397f11a706 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 7f6c9...
getmoto__moto-6920
Hi @MacHu-GWU, that attribute should be calculated inside the `LayerVersion`-class: https://github.com/getmoto/moto/blob/368fa07ec35aa6806c839a1f4883426159179127/moto/awslambda/models.py#L371 If the S3 file exists, it will use that information. If it does not exist, it will throw an error (`The specified bucket d...
diff --git a/moto/awslambda/models.py b/moto/awslambda/models.py --- a/moto/awslambda/models.py +++ b/moto/awslambda/models.py @@ -371,6 +371,11 @@ def __init__(self, spec: Dict[str, Any], account_id: str, region: str): self.code_sha_256, self.code_digest, ) = ...
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 @@ -1,10 +1,12 @@ import boto3 +import os import pytest from botocore.exceptions import ClientError from freezegun ...
2023-10-15 20:33:23
Lambda publish_layer_version function failed due to the wrong implementation ## Reporting Bugs When you run ``publish_layer_version`` ``` lambda_client.publish_layer_version( LayerName="my_layer", Content=dict( S3Bucket="my-bucket", S3Key="my-key.zip", ) ) ``` It raises this...
getmoto/moto
2021e564fafcdaa701b53de49bd580c8691a5fcc
4.2
[ "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_lambda_layers", "tests/test_awslambda/test_lambda_layers.py::test_get_layer_version", ...
[ "tests/test_awslambda/test_lambda_layers.py::test_publish_layer_with_unknown_s3_file" ]
SWE-Gym/SWE-Gym
[ { "content": "Lambda publish_layer_version function failed due to the wrong implementation\n## Reporting Bugs\r\n\r\nWhen you run ``publish_layer_version``\r\n\r\n```\r\nlambda_client.publish_layer_version(\r\n LayerName=\"my_layer\",\r\n Content=dict(\r\n S3Bucket=\"my-bucket\",\r\n S3Key=\...
null
{"FAIL_TO_PASS": ["tests/test_awslambda/test_lambda_layers.py::test_publish_layer_with_unknown_s3_file"], "PASS_TO_PASS": ["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_...
#!/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 2021e564fafcdaa701b53de49bd580c8691a5fcc source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 2021e...
getmoto__moto-4950
Thanks for raising this @jhogarth - marking it as an enhancement.
diff --git a/moto/timestreamwrite/responses.py b/moto/timestreamwrite/responses.py --- a/moto/timestreamwrite/responses.py +++ b/moto/timestreamwrite/responses.py @@ -85,7 +85,14 @@ def write_records(self): table_name = self._get_param("TableName") records = self._get_param("Records") self.ti...
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,3 +1,4 @@ +import time import boto3 import sure # noqa #...
2022-03-19 02:53:34
Timestream Write has the wrong response returned ### Environment Python 3.10.2 (and 3.9 in lambda) Libraries involved installed from pip: boto3 1.20.49 botocore 1.23.49 moto 3.1.0 pytest 7.1.0 pytest-mock 3.7.0 ### Expectation for respon...
getmoto/moto
0fcf6529ab549faf7a2555d209ce2418391b7f9f
3.1
[ "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" ]
SWE-Gym/SWE-Gym
[ { "content": "Timestream Write has the wrong response returned\n### Environment\r\nPython 3.10.2 (and 3.9 in lambda)\r\n\r\nLibraries involved installed from pip:\r\nboto3 1.20.49\r\nbotocore 1.23.49\r\nmoto 3.1.0\r\npytest 7.1.0\r\npytest-mock ...
null
{"FAIL_TO_PASS": ["tests/test_timestreamwrite/test_timestreamwrite_table.py::test_write_records"], "PASS_TO_PASS": ["tests/test_timestreamwrite/test_timestreamwrite_table.py::test_update_table", "tests/test_timestreamwrite/test_timestreamwrite_table.py::test_describe_table", "tests/test_timestreamwrite/test_timestreamw...
#!/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 0fcf6529ab549faf7a2555d209ce2418391b7f9f source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 0fcf6...
getmoto__moto-6178
I thought I could attach my example code to the ticket. Looks like that won't work. Instead here it is pasted inline: import boto3 import json import unittest from datetime import datetime, timedelta from moto import mock_dynamodb # Reported to the moto project on github as: # h...
diff --git a/moto/dynamodb/parsing/key_condition_expression.py b/moto/dynamodb/parsing/key_condition_expression.py --- a/moto/dynamodb/parsing/key_condition_expression.py +++ b/moto/dynamodb/parsing/key_condition_expression.py @@ -160,8 +160,10 @@ def parse_expression( if crnt_char == "(": # hashk...
diff --git a/tests/test_dynamodb/models/test_key_condition_expression_parser.py b/tests/test_dynamodb/models/test_key_condition_expression_parser.py --- a/tests/test_dynamodb/models/test_key_condition_expression_parser.py +++ b/tests/test_dynamodb/models/test_key_condition_expression_parser.py @@ -179,6 +179,24 @@ def ...
2023-04-05 01:41:06
DynamoDB query with brackets in KeyConditionExpression causes: Invalid function name; function: See the attached testcase I have found that when mocking DynamoDB and running a query, if I put brackets in my KeyConditionExpression then it raises an error My KeyConditionExpression is `(#audit_object_id = :object_id...
getmoto/moto
9f91ac0eb96b1868905e1555cb819757c055b652
4.1
[ "tests/test_dynamodb/models/test_key_condition_expression_parser.py::TestHashAndRangeKey::test_reverse_keys[begins_with(start_date,:sk)", "tests/test_dynamodb/models/test_key_condition_expression_parser.py::TestHashKey::test_unknown_hash_key", "tests/test_dynamodb/models/test_key_condition_expression_parser.py:...
[ "tests/test_dynamodb/models/test_key_condition_expression_parser.py::TestHashAndRangeKey::test_brackets[(job_id", "tests/test_dynamodb/models/test_key_condition_expression_parser.py::TestHashAndRangeKey::test_brackets[job_id" ]
SWE-Gym/SWE-Gym
[ { "content": "DynamoDB query with brackets in KeyConditionExpression causes: Invalid function name; function:\nSee the attached testcase\r\n\r\nI have found that when mocking DynamoDB and running a query, if I put brackets in my KeyConditionExpression then it raises an error\r\n\r\nMy KeyConditionExpression is ...
null
{"FAIL_TO_PASS": ["tests/test_dynamodb/models/test_key_condition_expression_parser.py::TestHashAndRangeKey::test_brackets[(job_id", "tests/test_dynamodb/models/test_key_condition_expression_parser.py::TestHashAndRangeKey::test_brackets[job_id"], "PASS_TO_PASS": ["tests/test_dynamodb/models/test_key_condition_expression...
#!/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 9f91ac0eb96b1868905e1555cb819757c055b652 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 9f91a...
getmoto__moto-5154
Thanks for opening. I am tagging this as a feature request.
diff --git a/moto/ec2/models/instances.py b/moto/ec2/models/instances.py --- a/moto/ec2/models/instances.py +++ b/moto/ec2/models/instances.py @@ -353,6 +353,9 @@ def stop(self): "Client.UserInitiatedShutdown", ) + def is_running(self): + return self._state.name == "running" + def...
diff --git a/tests/test_elb/test_elb.py b/tests/test_elb/test_elb.py --- a/tests/test_elb/test_elb.py +++ b/tests/test_elb/test_elb.py @@ -868,30 +868,69 @@ def test_connection_settings_attribute(): def test_describe_instance_health(): elb = boto3.client("elb", region_name="us-east-1") ec2 = boto3.client("ec...
2022-05-21 22:15:00
Add support for EC2 state 'OutOfService' in moto ELB 'describe_instance_health' Add support for instance state 'OutOfService' in moto ELB 'describe_instance_health' https://github.com/spulec/moto/blob/master/moto/elb/responses.py#L260 mocking doesn't have support for 'OutOfService', once an instance is registered t...
getmoto/moto
12843c4eaedcfc524538eb43483fbb011bf05c85
3.1
[ "tests/test_elb/test_elb.py::test_create_duplicate_listener_different_protocols[http-TCP]", "tests/test_elb/test_elb.py::test_connection_draining_attribute", "tests/test_elb/test_elb.py::test_create_elb_in_multiple_region", "tests/test_elb/test_elb.py::test_create_load_balancer_with_no_listeners_defined", "...
[ "tests/test_elb/test_elb.py::test_describe_instance_health__with_instance_ids" ]
SWE-Gym/SWE-Gym
[ { "content": "Add support for EC2 state 'OutOfService' in moto ELB 'describe_instance_health'\nAdd support for instance state 'OutOfService' in moto ELB 'describe_instance_health'\r\nhttps://github.com/spulec/moto/blob/master/moto/elb/responses.py#L260\r\n\r\nmocking doesn't have support for 'OutOfService', onc...
null
{"FAIL_TO_PASS": ["tests/test_elb/test_elb.py::test_describe_instance_health__with_instance_ids"], "PASS_TO_PASS": ["tests/test_elb/test_elb.py::test_create_duplicate_listener_different_protocols[http-TCP]", "tests/test_elb/test_elb.py::test_connection_draining_attribute", "tests/test_elb/test_elb.py::test_create_elb_i...
#!/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 12843c4eaedcfc524538eb43483fbb011bf05c85 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 12843...
getmoto__moto-4986
Thanks for raising this @scottaubrey!
diff --git a/moto/eks/models.py b/moto/eks/models.py --- a/moto/eks/models.py +++ b/moto/eks/models.py @@ -113,7 +113,7 @@ def __init__( encryption_config=None, ): if encryption_config is None: - encryption_config = dict() + encryption_config = [] if tags is None: ...
diff --git a/tests/terraform-tests.success.txt b/tests/terraform-tests.success.txt --- a/tests/terraform-tests.success.txt +++ b/tests/terraform-tests.success.txt @@ -75,6 +75,7 @@ TestAccAWSEcrRepositoryPolicy TestAccAWSEFSAccessPoint TestAccAWSEFSMountTarget TestAccAWSEgressOnlyInternetGateway +TestAccAWSEksCluste...
2022-03-29 21:59:46
EKS CreateCluster response encryptionConfig property should be a List/Array # Description When using moto server, the `CreateCluster` EKS API, the Cluster response object should contain `encryptionConfig` as a List of at-most-one `EncryptionConfig` maps/objects (as per example here: https://docs.aws.amazon.com/eks/...
getmoto/moto
cf2690ca1e2e23e6ea28defe3e05c198d9581f79
3.1
[ "tests/test_eks/test_server.py::test_eks_create_multiple_clusters_with_same_name", "tests/test_eks/test_server.py::test_eks_delete_cluster", "tests/test_eks/test_server.py::test_eks_list_nodegroups", "tests/test_eks/test_server.py::test_eks_delete_nonexisting_cluster", "tests/test_eks/test_server.py::test_e...
[ "tests/test_eks/test_server.py::test_eks_describe_existing_cluster" ]
SWE-Gym/SWE-Gym
[ { "content": "EKS CreateCluster response encryptionConfig property should be a List/Array\n# Description\r\n\r\nWhen using moto server, the `CreateCluster` EKS API, the Cluster response object should contain `encryptionConfig` as a List of at-most-one `EncryptionConfig` maps/objects (as per example here: https...
null
{"FAIL_TO_PASS": ["tests/test_eks/test_server.py::test_eks_describe_existing_cluster"], "PASS_TO_PASS": ["tests/test_eks/test_server.py::test_eks_create_multiple_clusters_with_same_name", "tests/test_eks/test_server.py::test_eks_delete_cluster", "tests/test_eks/test_server.py::test_eks_list_nodegroups", "tests/test_eks...
#!/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 cf2690ca1e2e23e6ea28defe3e05c198d9581f79 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout cf269...
getmoto__moto-7153
Hi @jrindy-iterable, thanks for raising this. The `boto3` [documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/route53/client/change_resource_record_sets.html) states: > To delete a resource record set, you must specify all the same values that you specified when you created it...
diff --git a/moto/route53/models.py b/moto/route53/models.py --- a/moto/route53/models.py +++ b/moto/route53/models.py @@ -314,6 +314,27 @@ def __contains__(self, item: Any) -> bool: item["ResourceRecordSet"]["Name"] = item["ResourceRecordSet"]["Name"].strip(".") return super().__contains__(item) + ...
diff --git a/.github/workflows/tests_terraform_examples.yml b/.github/workflows/tests_terraform_examples.yml --- a/.github/workflows/tests_terraform_examples.yml +++ b/.github/workflows/tests_terraform_examples.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - service: ["acm"] +...
2023-12-21 21:22:18
Route53 record with multivalue_answer_routing_policy cannot be destroyed # Problem I am unable to destroy a route53 record with `multivalue_answer_routing_policy = true`. If you comment out the `multivalue_answer_routing_policy` or set it to `false` in the below code, then it applies and destroys properly. # Reprod...
getmoto/moto
909855490384d1f42926c12d277b03ea7b8c4d36
4.2
[ "tests/test_route53/test_route53.py::test_update_hosted_zone_comment", "tests/test_route53/test_route53.py::test_use_health_check_in_resource_record_set", "tests/test_route53/test_route53.py::test_get_dns_sec", "tests/test_route53/test_route53.py::test_get_unknown_hosted_zone", "tests/test_route53/test_rout...
[ "tests/test_route53/test_route53.py::test_change_resource_record_sets_crud_valid_with_special_xml_chars[True]", "tests/test_route53/test_route53.py::test_change_resource_record_sets_crud_valid_with_special_xml_chars[False]" ]
SWE-Gym/SWE-Gym
[ { "content": "Route53 record with multivalue_answer_routing_policy cannot be destroyed\n# Problem\r\nI am unable to destroy a route53 record with `multivalue_answer_routing_policy = true`. If you comment out the `multivalue_answer_routing_policy` or set it to `false` in the below code, then it applies and destr...
null
{"FAIL_TO_PASS": ["tests/test_route53/test_route53.py::test_change_resource_record_sets_crud_valid_with_special_xml_chars[True]", "tests/test_route53/test_route53.py::test_change_resource_record_sets_crud_valid_with_special_xml_chars[False]"], "PASS_TO_PASS": ["tests/test_route53/test_route53.py::test_update_hosted_zon...
#!/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 909855490384d1f42926c12d277b03ea7b8c4d36 source /opt/miniconda3/bin/activate conda activate testbed make init git checkout 90985...
getmoto__moto-7023
"Hi @JohannesKoenigTMH, thanks for raising this, and welcome to Moto!\r\n\r\nI'll raise a PR shortly(...TRUNCATED)
"diff --git a/moto/lakeformation/models.py b/moto/lakeformation/models.py\n--- a/moto/lakeformation/(...TRUNCATED)
"diff --git a/tests/test_lakeformation/test_lakeformation.py b/tests/test_lakeformation/test_lakefor(...TRUNCATED)
2023-11-13 21:37:46
"KeyError when calling deregister_resource with unknown ResourceArn in lake formation\nDescription:\(...TRUNCATED)
getmoto/moto
447710c6a68e7d5ea7ad6d7df93c663de32ac7f1
4.2
["tests/test_lakeformation/test_lakeformation.py::test_list_data_cells_filter","tests/test_lakeforma(...TRUNCATED)
[ "tests/test_lakeformation/test_lakeformation.py::test_deregister_resource" ]
SWE-Gym/SWE-Gym
[{"content":"KeyError when calling deregister_resource with unknown ResourceArn in lake formation\nD(...TRUNCATED)
null
"{\"FAIL_TO_PASS\": [\"tests/test_lakeformation/test_lakeformation.py::test_deregister_resource\"], (...TRUNCATED)
"#!/bin/bash\nset -exo pipefail\nsource /opt/miniconda3/bin/activate\nconda activate testbed\ncd /te(...TRUNCATED)
getmoto__moto-5865
"Thanks for raising this @Bharat23 - marking it as an enhancement to implement this validation.\r\n\(...TRUNCATED)
"diff --git a/moto/ecs/models.py b/moto/ecs/models.py\n--- a/moto/ecs/models.py\n+++ b/moto/ecs/mode(...TRUNCATED)
"diff --git a/tests/test_ecs/test_ecs_boto3.py b/tests/test_ecs/test_ecs_boto3.py\n--- a/tests/test_(...TRUNCATED)
2023-01-22 11:05:01
"ECS list_services ClusterNotFoundException Not raised\n## Reporting Bugs\r\n\r\nResource/Client:\r\(...TRUNCATED)
getmoto/moto
90e63c1cb5178acaa49cfc301b2688dcaba12115
4.1
["tests/test_ecs/test_ecs_boto3.py::test_update_missing_service","tests/test_ecs/test_ecs_boto3.py::(...TRUNCATED)
["tests/test_ecs/test_ecs_boto3.py::test_list_unknown_service[unknown]","tests/test_ecs/test_ecs_bot(...TRUNCATED)
SWE-Gym/SWE-Gym
[{"content":"ECS list_services ClusterNotFoundException Not raised\n## Reporting Bugs\r\n\r\nResourc(...TRUNCATED)
null
"{\"FAIL_TO_PASS\": [\"tests/test_ecs/test_ecs_boto3.py::test_list_unknown_service[unknown]\", \"tes(...TRUNCATED)
"#!/bin/bash\nset -exo pipefail\nsource /opt/miniconda3/bin/activate\nconda activate testbed\ncd /te(...TRUNCATED)
getmoto__moto-5812
Thanks for raising this and providing the repro-case @lorenzo-eng! Marking this as a bug.
"diff --git a/moto/iotdata/responses.py b/moto/iotdata/responses.py\n--- a/moto/iotdata/responses.py(...TRUNCATED)
"diff --git a/.github/workflows/test_outdated_versions.yml b/.github/workflows/test_outdated_version(...TRUNCATED)
2023-01-03 19:51:05
"Multiple iot-data publish calls lead to None topic\nCalling\r\n`boto3.client('iot-data', region_nam(...TRUNCATED)
getmoto/moto
031f89dee00c6a5e01ac41c430d701508988f146
4.0
["tests/test_iotdata/test_iotdata.py::test_basic","tests/test_iotdata/test_iotdata.py::test_update",(...TRUNCATED)
[ "tests/test_iotdata/test_iotdata.py::test_publish" ]
SWE-Gym/SWE-Gym
[{"content":"Multiple iot-data publish calls lead to None topic\nCalling\r\n`boto3.client('iot-data'(...TRUNCATED)
null
"{\"FAIL_TO_PASS\": [\"tests/test_iotdata/test_iotdata.py::test_publish\"], \"PASS_TO_PASS\": [\"tes(...TRUNCATED)
"#!/bin/bash\nset -exo pipefail\nsource /opt/miniconda3/bin/activate\nconda activate testbed\ncd /te(...TRUNCATED)
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
16