resolves #800: Add WaitForState support for resource_gitlab_project branch protection #862
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes an issue where branch protection ran in the background when creating a project, causing the default branch to occasionally not be protected.
Description
Closes #800
There was a race condition apparent in project creation where occasionally the branch protection would return
false
even though the branch had been protected asynchronously. This could cause issues if downstream resources used that output value. This also caused several tests that checked the branch protection status to be flakey and seemingly appear to fail rendomly when they were, in fact, failing properly.PR Checklist
//lintignore
comments that came from copied code. Linter rules are meant to be enforced on new code.