You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
Right now, we can't create a quality gate selection which contains more than 99 projects due to the pagination.
Affected Resource(s)
sonarcloud_quality_gate_selection
Terraform Configuration Files
resource"sonarcloud_quality_gate_selection""my_quality_gate_selection" {
gate_id=sonarcloud_quality_gate.my_quality_gate.gate_id# it should contains more than 99 projectsproject_keys=[ "xx", "yy", ...]
}
Expected Behavior
We should be able to create a quality gate selection with more than 99 projects.
Actual Behavior
The creation is working, but the apply is failing just after (when it tried to retrieve the list from sonarcloud api after the creation)
Steps to Reproduce
Create a sonarcloud_quality_gate_selection with more than 99 project_keys, and apply it.
References
Error during the apply:
Error: Could not find Quality Gate Selection
│
│ with sonarcloud_quality_gate_selection.my_quality_gate_selection
│ on main.tf line 331, in resource "sonarcloud_quality_gate_selection" "my_quality_gate_selection":
│ 331: resource "sonarcloud_quality_gate_selection" "my_quality_gate_selection" {
│
| The findSelection function was unable to find the project keys: [...]
| in the response: &{Paging:{PageIndex:1 PageSize:100 Total:144}
#0000
The text was updated successfully, but these errors were encountered:
Hi @kiuby, I didn't have time to look at this yet but I'll have a look somewhere this week. I'd have expected a SearchAll method to be available to handle pagination, but somehow it has not been generated.
The SearchAll method is not being generated because the SonarCloud API is using different parameter names for paging, i.e. p / ps and page/ pageSize (which is just crazy if you ask me). I'll have to add support for this in go-sonarcloud, which might be a bit iffy without making that even more of a ball of spaghetti..
I'll post an update here when that's been implemented. I've added this issue to the v0.5.3 milestone though, cause it should be fixed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Right now, we can't create a quality gate selection which contains more than 99 projects due to the pagination.
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
We should be able to create a quality gate selection with more than 99 projects.
Actual Behavior
The creation is working, but the apply is failing just after (when it tried to retrieve the list from sonarcloud api after the creation)
Steps to Reproduce
Create a sonarcloud_quality_gate_selection with more than 99 project_keys, and apply it.
References
Error during the apply:
The text was updated successfully, but these errors were encountered: