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

Handle async groups API deletion ack response in tests #320

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

oboukili
Copy link
Contributor

@oboukili oboukili commented Jun 1, 2020

Closes #319

@ghost ghost added the size/XS label Jun 1, 2020
@oboukili
Copy link
Contributor Author

oboukili commented Jun 1, 2020

With the test fix, we properly wait before executing the refresh:

172.17.0.1 - - [01/Jun/2020:08:58:18 +0000] "POST /api/v4/groups HTTP/1.1" 201 746 "" "go-gitlab" -
172.17.0.1 - - [01/Jun/2020:08:58:18 +0000] "GET /api/v4/groups/81 HTTP/1.1" 200 785 "" "go-gitlab" -
172.17.0.1 - - [01/Jun/2020:08:58:18 +0000] "GET /api/v4/groups/81 HTTP/1.1" 200 785 "" "go-gitlab" -
172.17.0.1 - - [01/Jun/2020:08:58:18 +0000] "DELETE /api/v4/groups/81 HTTP/1.1" 202 26 "" "go-gitlab" -
172.17.0.1 - - [01/Jun/2020:08:58:18 +0000] "GET /api/v4/groups/81 HTTP/1.1" 200 785 "" "go-gitlab" -
172.17.0.1 - - [01/Jun/2020:08:58:18 +0000] "GET /api/v4/groups/81 HTTP/1.1" 200 785 "" "go-gitlab" -
172.17.0.1 - - [01/Jun/2020:08:58:18 +0000] "GET /api/v4/groups/81 HTTP/1.1" 404 33 "" "go-gitlab" -
172.17.0.1 - - [01/Jun/2020:08:58:19 +0000] "GET /api/v4/groups/81 HTTP/1.1" 404 33 "" "go-gitlab" -

Support for Gitlab EE soft-delete is also included (but I cannot test it).
My guess would be that there are resources other than groups whose deletions are handled asynchronously.

The group resource delete method already handles that use case through the use of a StateChangeConf so no need to fix anything there.

@oboukili oboukili changed the title Handle incorrect groups API deletion response in tests Handle async groups API deletion ack response in tests Jun 1, 2020
@oboukili oboukili force-pushed the 319-fixes-flaky-group-test branch from 72c7170 to ea165bf Compare June 1, 2020 09:17
@ringods ringods merged commit c28275f into gitlabhq:master Jun 3, 2020
ahmet2mir pushed a commit to ahmet2mir/terraform-provider-gitlab that referenced this pull request Sep 15, 2020
Handle async groups API deletion ack response in tests
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

Possible change/regression in Gitlab v13 for group deletion?
2 participants