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
Discovered while testing API version 2023-11-15 of documentdb - the type SqlDatabaseContainerThroughputSetting may not be deleted directly via ARM.
ASO knows this already, as we generate the correct list of supported operations in sql_database_container_throughput_setting_types_gen.go:
// GetSupportedOperations returns the operations supported by the resourcefunc (setting*SqlDatabaseContainerThroughputSetting) GetSupportedOperations() []genruntime.ResourceOperation {
return []genruntime.ResourceOperation{
genruntime.ResourceOperationGet,
genruntime.ResourceOperationPut,
}
}
However, we don't respect that when running, resulting in noisy errors:
test_logger.go:160: I2024-04-28T22:19:01Z] SqlDatabaseThroughputSettingController
"msg"="Error during Delete"
"err"="deleting resource "/subscriptions/82acd5bb-4206-47d4-9c12-a65db028483d/resourceGroups/asotest-rg-aokpof/providers/Microsoft.DocumentDB/databaseAccounts/sample-sqldb-account/sqlDatabases/sample-sql-db/throughputSettings/default": DELETE https://management.azure.com/subscriptions/82acd5bb-4206-47d4-9c12-a65db028483d/resourceGroups/asotest-rg-aokpof/providers/Microsoft.DocumentDB/databaseAccounts/sample-sqldb-account/sqlDatabases/sample-sql-db/throughputSettings/default
--------------------------------------------------------------------------------
RESPONSE 405: 405 Method Not Allowed
ERROR CODE: MethodNotAllowed
--------------------------------------------------------------------------------
{
"code": "MethodNotAllowed",
"message": "Message: The requested verb is not supported."
}
--------------------------------------------------------------------------------
" name="sample-sql-throughput"
namespace="aso-test-samples-creationanddeletion-test-sqldatabase-v1a-7e1fc"
azureName="default"
action="BeginDelete"
Expected behavior
We should respect the available verbs for the resource, and skip deletion from Azure where it's not possible, even though this may produce results surprising for some users.
The text was updated successfully, but these errors were encountered:
Decision: Block direct deletion, returning an error for the condition indicating that direct deletion can't be done, must delete the parent. This avoids noisy error messages in the logs.
Two ways to approach - one is to block async, which makes delete a one-way operation. The other is to modify the webhook, which may have issues with cascading deletes from the parent.
Version of Azure Service Operator
v2.7.0 (and earlier)
Describe the bug
Discovered while testing API version 2023-11-15 of
documentdb
- the typeSqlDatabaseContainerThroughputSetting
may not be deleted directly via ARM.ASO knows this already, as we generate the correct list of supported operations in
sql_database_container_throughput_setting_types_gen.go
:However, we don't respect that when running, resulting in noisy errors:
Expected behavior
We should respect the available verbs for the resource, and skip deletion from Azure where it's not possible, even though this may produce results surprising for some users.
The text was updated successfully, but these errors were encountered: