[go: up one dir, main page]

Skip to content

Race condition in Project Target Branch Rule GraphQL API

Context where the issue surfaced: terraform-provider-gitlab!2307 (comment 2372121119)

tl;dr: we have an acceptance test in the Terraform Provider that uses the GraphQL API to manage target branch rules. We have a test that asserts an error when a branch rule is added with an already existing name. The two branch rules are created concurrently and we think there is a race condition, because the problem we are seeing is that we don't get that error, instead the rule is created - both rules.

Logs are here: https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/jobs/9272310075/artifacts/browse.

We managed to workaround this in the provider by making sure that the first rule is fully created before the second.


The following discussion from terraform-provider-gitlab!2307 (merged) should be addressed:

Edited by Timo Furrer