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

resource/gitlab_repository_file: Mitigate parallelism limitation #964

Merged

Conversation

timofurrer
Copy link
Member

This change set implements the following two measures to mitigate / remove the parallelism issues we were having as described in #940:

  1. only allow a single gitlab_repository_file resource to make an API call (no matter to which project or file)
  2. retry API calls in case of a refresh error

The first mitigates that resources within an apply / destroy are queued and the second mitigates the case when something else outside of terraform changes the repository state. Both combined are good mitigations for the issue at hand.

The drawback of this change is that it'll slow down certain terraform configurations - necessarily and unnecessarily in cases were a files in different repositories / projects are changed, but still queued. I think that's a limitation I'm willing to take for the benefits it provides.

Closes #940

@timofurrer timofurrer added this to the v3.13.0 milestone Mar 16, 2022
@timofurrer timofurrer requested a review from armsnyder March 16, 2022 16:00
@timofurrer timofurrer self-assigned this Mar 16, 2022
@timofurrer timofurrer force-pushed the feature/repository-file-parallelism-940 branch 2 times, most recently from 66420da to 35a966d Compare March 16, 2022 16:11
@timofurrer timofurrer changed the title resource/gitlab_repository_file: Mitigate parallelism mitigation resource/gitlab_repository_file: Mitigate parallelism limitation Mar 16, 2022
@timofurrer timofurrer force-pushed the feature/repository-file-parallelism-940 branch from 8579b91 to 2ae4582 Compare March 17, 2022 15:31
jtymes
jtymes previously approved these changes Mar 17, 2022
@timofurrer timofurrer requested a review from armsnyder March 19, 2022 13:19
@timofurrer timofurrer force-pushed the feature/repository-file-parallelism-940 branch from 2ae4582 to fa82d67 Compare March 20, 2022 08:20
@github-actions github-actions bot added size/L and removed size/M labels Mar 20, 2022
@timofurrer timofurrer requested a review from armsnyder March 20, 2022 08:21
@timofurrer timofurrer force-pushed the feature/repository-file-parallelism-940 branch 3 times, most recently from e309bf4 to 5ecb57c Compare March 20, 2022 19:19
@github-actions github-actions bot added the merge-conflict PR cannot be merged due to a merge conflict label Mar 21, 2022
@github-actions
Copy link

This pull request has merge conflicts. Please rebase your branch onto main.

@timofurrer timofurrer force-pushed the feature/repository-file-parallelism-940 branch from 5ecb57c to e189068 Compare March 21, 2022 17:27
@github-actions github-actions bot removed the merge-conflict PR cannot be merged due to a merge conflict label Mar 21, 2022
@github-actions
Copy link

Conflicts are resolved. Thank you! 😀

@timofurrer timofurrer merged commit e8f4d47 into gitlabhq:main Mar 22, 2022
@github-actions
Copy link

This functionality has been released in v3.13.0 of the Terraform GitLab Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue. Thank you!

@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

3 participants