{"push_id":870736266,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"a211fc3469a31e907a7cf5a2d05f3bc99dda7881","before":"b177370bdce949ae6b5780cd7782bf0215f15fce","commits":[{"sha":"6b6b5a43c32f7e6bc4b90db79d44494c72398819","author":{"email":"f0204e5ee48e82fad2e80bfe884bacd2e3a27036@phinze.com","name":"Paul Hinze"},"message":"provider/aws: serialize SG rule access to fix race condition\n\nBecause `aws_security_group_rule` resources are an abstraction on top of\nSecurity Groups, they must interact with the AWS Security Group APIs in\na pattern that often results in lots of parallel requests interacting\nwith the same security group.\n\nWe've found that this pattern can trigger race conditions resulting in\ninconsistent behavior, including:\n\n * Rules that report as created but don't actually exist on AWS's side\n * Rules that show up in AWS but don't register as being created\n   locally, resulting in follow up attempts to authorize the rule\n   failing w/ Duplicate errors\n\nHere, we introduce a per-SG mutex that must be held by any security\ngroup before it is allowed to interact with AWS APIs. This protects the\nspace between `DescribeSecurityGroup` and `Authorize*` / `Revoke*`\ncalls, ensuring that no other rules interact with the SG during that\nspan.\n\nThe included test exposes the race by applying a security group with\nlots of rules, which based on the dependency graph can all be handled in\nparallel. This fails most of the time without the new locking behavior.\n\nI've omitted the mutex from `Read`, since it is only called during the\nRefresh walk when no changes are being made, meaning a bunch of parallel\n`DescribeSecurityGroup` API calls should be consistent in that case.","distinct":true,"url":"https://api.github.com/repos/hashicorp/terraform/commits/6b6b5a43c32f7e6bc4b90db79d44494c72398819"},{"sha":"a211fc3469a31e907a7cf5a2d05f3bc99dda7881","author":{"email":"f0204e5ee48e82fad2e80bfe884bacd2e3a27036@phinze.com","name":"Paul Hinze"},"message":"Merge pull request #3965 from hashicorp/b-aws-sg-rules-v2-race\n\nprovider/aws: serialize SG rule access to fix race condition","distinct":true,"url":"https://api.github.com/repos/hashicorp/terraform/commits/a211fc3469a31e907a7cf5a2d05f3bc99dda7881"}]}