Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azuread_group: remediate replication delays when adding/removing group members #283

Merged
merged 2 commits into from
Jun 25, 2020

Conversation

manicminer
Copy link
Contributor

  1. Attempt up to 10 times to add a group member with fixed 2 second backoff
  2. Ensure 10 affirmative responses when retrieving group members after adding
  3. Attempt up to 10 times to remove a group member with fixed 2 second backoff
  4. Ensure 10 affirmative responses when retrieving group members after removing

Fixes:

Error adding group member "62a54f8c-eef7-4106-9989-aa9018f46a98" to Azure AD Group with ID "d8c4d6c5-7d04-4865-85a6-cf311f1a619c": graphrbac.GroupsClient#AddMember: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="Unknown" Message="Unknown service error" Details=[{"odata.error":{"code":"Request_BadRequest","date":"2020-06-17T02:03:42","message":{"lang":"en","value":"One or more added object references already exist for the following modified properties: 'members'."},"requestId":"aaa440fc-7671-4d5d-b353-f599f1335ae5"}}]

Error Deleting group member "ecd616ca-06e3-4c36-9932-ecfeef38ffe6" from Azure AD Group with ID "c7196f3e-5d41-4726-8293-873712dd9830": graphrbac.GroupsClient#RemoveMember: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="Unknown" Message="Unknown service error" Details=[{"odata.error":{"code":"Request_BadRequest","date":"2020-06-17T23:17:44","message":{"lang":"en","value":"One or more removed object references do not exist for the following modified properties: 'members'."},"requestId":"c690ded0-7a1f-4079-9717-c857d3513e23"}}]

@manicminer manicminer added this to the v0.11.0 milestone Jun 18, 2020
@manicminer manicminer requested a review from a team June 18, 2020 02:29
@ghost ghost added the size/M label Jun 18, 2020
@manicminer manicminer force-pushed the group/membership-consistency-fix branch 2 times, most recently from 66391b5 to eabf158 Compare June 18, 2020 02:33
@manicminer manicminer force-pushed the group/membership-consistency-fix branch from eabf158 to d6e5553 Compare June 18, 2020 02:36
@manicminer manicminer force-pushed the group/membership-consistency-fix branch from d6e5553 to 560d87c Compare June 18, 2020 02:38
@manicminer
Copy link
Contributor Author

Tests now passing:

Screenshot 2020-06-18 02 56 54

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! LGTM 👍

@manicminer manicminer merged commit c6698c6 into master Jun 25, 2020
@manicminer manicminer deleted the group/membership-consistency-fix branch June 25, 2020 22:02
manicminer added a commit that referenced this pull request Jun 25, 2020
@ghost
Copy link

ghost commented Jul 9, 2020

This has been released in version 0.11.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azuread" {
    version = "~> 0.11.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jul 26, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants