tfsdk: Consider Deprecating ServeOpts Name Field In Preference of Address Field #295
Labels
breaking-change
This PR introduces a breaking change or the resolution of this issue may require a breaking change.
enhancement
New feature or request
Milestone
Module version
Use-cases
The framework currently has a
ServeOpts
typeName
field, which is documented as:This mismatch between a provider name (typically the last part of a full provider address) and a provider address is understandably confusing for provider developers, who may gloss over the field documentation given the field name. When only the name is provided here, this can have non-obvious downstream consequences such as not being able to attach debuggers since the reattach configuration will never have a provider address that matches.
Attempted Solutions
Go documentation. Having the full provider address as an example for the field in the scaffolding provider.
Proposal
ServeOpts
typeAddress
field. Add logic inServe
which validates thatAddress
is a full provider address.Name
is used, preferAddress
if not empty instead. If for some reason the provider name (type) is actually necessary, then pare down the address value to just the name.ServeOpts
typeName
field, recommendingAddress
instead. Remove it in minor+1 version before 1.0.References
The text was updated successfully, but these errors were encountered: