Open kachawla opened 2 years ago
triage: code clean up - moving to global backlog
Done for LinkRP as part of https://dev.azure.com/azure-octo/Incubations/_workitems/edit/5822 https://github.com/project-radius/radius/pull/5012. Core rp types are still pending.
Closing this issue. Please file the issue if anything remaining in this issue or valid.
Reopening since this still hasn't been done for Core RP as I mentioned in my previous comment.
Overview of feature request Currently we have duplicated definition Radius resource types in several places, for example - https://github.com/project-radius/radius/blob/main/test/validation/corerp.go#L28 https://github.com/project-radius/radius/blob/main/pkg/cli/ucp/ucp_management.go#L34 https://github.com/project-radius/radius/blob/main/pkg/connectorrp/renderers/sqldatabases/types.go#L14 https://github.com/project-radius/radius/blob/main/pkg/connectorrp/datamodel/sqldatabase.go#L26 https://github.com/project-radius/radius/blob/main/pkg/connectorrp/frontend/controller/sqldatabases/types.go#L9
This structure could easily result into failures due to typos/misspellings etc, we should move resource type definition into a separate top level directory that can be used a single source of truth, that will be updated any time a new resource type is added and can be consumed by all of the above code paths.
AB#6984