-
Notifications
You must be signed in to change notification settings - Fork 281
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
azuredevops_securityrole_assignment
is getting timedout on the first terraform apply but successful on second run
#1287
Comments
Introducing a delay to ensure the project is fully created before assigning library permissions. resource "time_sleep" "wait_1_minute" {
count = var.new_project ? 1 : 0
depends_on = [azuredevops_project.main]
create_duration = "1m"
}
/*
Assign security role assignments at the library level.
*/
resource "azuredevops_library_permissions" "main" {
depends_on = [time_sleep.wait_1_minute]
project_id = azuredevops_project.main[0].id
principal = data.azuredevops_team.main.descriptor
permissions = {
"View" : "allow",
"Administer" : "allow",
"Use" : "allow",
}
} |
@sravya09011995 Does this timeout happen 100% or does it happen randomly? |
@xuzhang3 even after introducing timeout its not working, i.e on first run it fails to reflect the changes. On second terraform apply changes are getting applied. |
@sravya09011995 I'm cannot reproduce and do not encounter this issue in our test cases. So one potential reason that comes to my mind is that the request keeps hitting the cache causing the timeout and the second time the request misses the cache so it works :( |
Cannot reproduce. The timeout issue I experience recently is when I running multiple tests at the same time and some tests will timeout. If I reduce concurrency or run them serially, all tests pass as expected, it seems that the service queues the requests and processes them sequentially. API throttle 🤔? |
@sravya09011995 Update from service side, they do add the API throttle recently which will queue the requests. Therefore, you should reduce the module concurrency or customize timeout to wait more time. |
Community Note
Terraform (and Azure DevOps Provider) Version
Affected Resource(s)
azuredevops_securityrole_assignment
Terraform Configuration Files
Debug Output
##[error]Terraform command 'apply' failed with exit code '1'.
##[error]╷
│ Error: timeout while waiting for state to become 'succeed, failed' (last state: 'syncing', timeout: 10m0s)
│
│ with module.azure-devops.azuredevops_securityrole_assignment.library[0],
│ on modules/adoproject/main.tf line 117, in resource "azuredevops_securityrole_assignment" "library":
│ 117: resource "azuredevops_securityrole_assignment" "library" {
Currently its getting timeout after 1.6 release on the first terraform apply. On the Second run of terraform apply , its getting created.
Panic Output
Expected Behavior
terraform apply should be successful on the first run
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
#1236
#1255
The text was updated successfully, but these errors were encountered: