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
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.
0 commit comments