Commit 75937aa
authored
OpenAPI Client: Clone before modifying org ID (#1150)
* OpenAPI Client: Clone before modifying org ID
Needs grafana/grafana-openapi-client-go#27 to be merged and ref to be changed in go.mod before merging
Closes #1125
In a parallel context where both the main org (id 0) and non-main orgs are being called, the wrong client may be used
To fix this, we can clone the client everytime we modify it. This will make sure we avoid conflicts, since we're never modifying the main reference (created in provider.go)
* Update client ref1 parent b1bdf53 commit 75937aa
3 files changed
+7
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
149 | 147 | | |
150 | 148 | | |
151 | | - | |
152 | | - | |
| 149 | + | |
| 150 | + | |
153 | 151 | | |
154 | 152 | | |
155 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments