Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common Types for Managed Identities #14409

Closed
tombuildsstuff opened this issue Mar 9, 2021 · 5 comments
Closed

Common Types for Managed Identities #14409

tombuildsstuff opened this issue Mar 9, 2021 · 5 comments
Assignees
Labels
CodeGen Issues that relate to code generation customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. Mgmt This issue is related to a management-plane library.
Milestone

Comments

@tombuildsstuff
Copy link
Contributor

Feature Request

Managed Identities are of a predefined type at this point in time (although they appear to be missing from the API contracts) - they're some combination of:

  • None
  • System Assigned
  • System Assigned, User Assigned
  • User Assigned

As such these could form a common type in Azure/go-autorest which would enable both code re-use for consumers of the SDK - and validation/generation errors for Swaggers which didn't match the common definitions (as seen in Azure/azure-rest-api-specs#13340). At present these are instead uniquely generated per-type and not necessarily complete (see that Github issue for one example) - so this could be consolidated since this is a common convention/defined type.

In short: can the SDK expose common types for these, rather than a type (or multiple types) per service/struct?

Thanks!

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 9, 2021
@ArcturusZhang ArcturusZhang added CodeGen Issues that relate to code generation feature-request This issue requires a new behavior in the product in order be resolved. labels Mar 10, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 10, 2021
@ArcturusZhang
Copy link
Member

ArcturusZhang commented Mar 10, 2021

Hi @tombuildsstuff thanks for this issue

This is a very good idea and we also have considered that. But it might not be ideal when we are actually trying to implement this.
The difficulty comes from the swaggers - despite we have the common-types predefined here, the author of a swagger PR might not be using them.
Roughly we have the following 3 circumstances:

  1. the swagger is using the types from common-types (assuming we have a way to identify this from the 2nd circumstance). It is possible to use the common-types in a common package.
  2. the swagger is using a self-defined common-types, but those are identical to the ones in common-types. We could do similar things as in 1st circumstance by treating them as duck types.
  3. the swagger is using a self-defined common-types, but those are not identical to the ones in common-types. We have this case a lot in our current swaggers - usually the differences are in the descriptions. In this case, we could do nothing - because the code generator has no knowledge on what this property means. (maybe we could introduce more extensions?)

Also there are concerns that if the service team chooses to define their own types, there are possibilities that they might change the definition in the future. For example they might add a property. Previously this is not a breaking change, but if we once identify this as a common-type by treating it as a duck type, this change will become a breaking change.

@jhendrixMSFT thoughts?

@RickWinter RickWinter added this to the Backlog milestone Jul 12, 2021
@RickWinter RickWinter added Mgmt This issue is related to a management-plane library. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 19, 2021
@lirenhe
Copy link
Member

lirenhe commented Sep 10, 2021

@jhendrixMSFT , do you have any thinking for this ask?

@jhendrixMSFT
Copy link
Member

@mikekistler is this something we can address with TypeSpec?

@mikekistler
Copy link
Member

There is no provision for this in TypeSpec, as best I am aware.

Copy link

Hi @tombuildsstuff, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CodeGen Issues that relate to code generation customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

No branches or pull requests

6 participants