Commit c4e68a1
authored
Bug fix for
Issue #, if available:
Related PR: #97
**Summary**
Fixing deletion part for `ProvisionedConcurrency` field.
**Description:**
This PR is related to bug fixes in [previous PR](#97) related to `ProvisionedConcurrency` implementation. When the user deleted the set configurations for Alias resource, the configurations were not deleted from the Console side, instead it used to throw an error. Fixed the bug by introducing a new condition to check if the desired configurations are nil or not, if yes then call the delete API.
Example of changes for `ProvisionedConcurrency` in Alias resource is given below:
```
if desired.ko.Spec.ProvisionedConcurrencyConfig == nil {
input_delete := &svcsdk.DeleteProvisionedConcurrencyConfigInput{
FunctionName: aws.String(*desired.ko.Spec.FunctionName),
Qualifier: aws.String(*desired.ko.Spec.Name),
}
_, err = rm.sdkapi.DeleteProvisionedConcurrencyConfigWithContext(ctx, input_delete)
rm.metrics.RecordAPICall("DELETE", "DeleteProvisionedConcurrency", err)
if err != nil {
return err
}
return nil
}
```
This PR contains implementation code and E2E test to validate the changes.
**Acknowledgment**
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.ProvisionedConcurrency (#106)1 parent 4a0b79d commit c4e68a1
File tree
3 files changed
+53
-20
lines changed- apis/v1alpha1
- pkg/resource/alias
- test/e2e/tests
3 files changed
+53
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
87 | 98 | | |
88 | 99 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
| |||
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
107 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
108 | 118 | | |
109 | 119 | | |
110 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
111 | 124 | | |
112 | 125 | | |
113 | 126 | | |
| |||
126 | 139 | | |
127 | 140 | | |
128 | 141 | | |
129 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
130 | 146 | | |
131 | 147 | | |
132 | 148 | | |
133 | 149 | | |
134 | 150 | | |
| 151 | + | |
| 152 | + | |
135 | 153 | | |
136 | 154 | | |
137 | 155 | | |
| |||
183 | 201 | | |
184 | 202 | | |
185 | 203 | | |
| 204 | + | |
| 205 | + | |
186 | 206 | | |
187 | 207 | | |
188 | 208 | | |
| |||
191 | 211 | | |
192 | 212 | | |
193 | 213 | | |
| 214 | + | |
194 | 215 | | |
195 | 216 | | |
196 | 217 | | |
197 | 218 | | |
198 | 219 | | |
199 | | - | |
200 | | - | |
201 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
202 | 224 | | |
203 | 225 | | |
204 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
259 | 270 | | |
260 | 271 | | |
261 | 272 | | |
| |||
0 commit comments