Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Form Recognizer] Sovereign clouds support #20522
[Form Recognizer] Sovereign clouds support #20522
Changes from 2 commits
c01f303
1e224f2
6fb733c
4b60789
1396d04
e5bfacc
31d73e0
0a2fd3f
72b494d
202f01c
118a7c7
9b85338
cd5f600
6a6ebf4
8339675
4f91175
8a72062
5e7fbd8
9d5e322
b748056
61a3a1d
10acd7d
b6c7973
51efcf7
d22872a
4929132
764c398
014da41
acf524d
cde7237
89f473b
143ae75
5326004
baee1b6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be helpful to customers to have a brief description of what this means, practically speaking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is nothing special about these links relating to
FormRecognizer
, should it beKnownCognitiveServicesAudience
instead and declared at some common place?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would make sense if we had a common package for cognitive services which we don't...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can duplicate the code and use better name for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there ARM in the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Container registry wasn't exactly arm, but also had the same name.
I just went with consistency, is there a better name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://management.chinacloudapi.cn
sounds like an ARM scope buthttps://cognitiveservices.azure.cn
is not. Perhaps use cognitive instead, e.g.CognitiveChina
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, we use ARM in the name because those are management audiences that are used by the service team.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options
KnownFormRecognizerAudience.AzureResourceManagerChina
KnownFormRecognizerAudience.AzureCognitiveServicesChina
KnownCognitiveServicesAudience.AzureChina
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By architect recommendation, .NET is using:
This aligns better with the naming in the Azure portal and documentation, as well as the pattern started by Azure.Identity::AzureAuthorityHosts. The ACR values are named that way specifically because they are using the ARM audience and plan on adding ARC-specific values.
For more context, please see the discussion here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second what .NET TA does here. @samvaity could you update Java to follow this recommended pattern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments. Going with this.
KnownFormRecognizerAudience
AzureChina
AzureGovernment
AzurePublicCloud
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop the "Known"? Doesn't add anything IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@witemple-msft having Known in the type name is a pattern the code generator is using for some time now (and transitively, all auto-generated clients) but I agree that it should be dropped. I understand this type is generated but does not get used to type anything in the public surface. Instead related places are typed as string so there should not be a name collision concern. @joheredi do you remember why we have that
Known
prefix?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc string would be clearer if it communicated that it is only necessary to override this setting if you're 1. using AAD/TokenCredential and 2. are using a cloud other than Azure Public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gets/sets feels out of place for a property of an object that is consumed by the client constructor. Setting it after the fact won't change the scope used, right?
The rest of this doc string is great, but for the first line, how about just:
"The audience (scope) to use for authentication with Azure Active Directory."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied this from some other package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the accepted approach to set the scope across all the different packages/languages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference:
I went through the notes, issues, references, and the recorded Arch board meeting on this.
And this was the approach followed in other places, which aligns with the discussion from the arch board meeting.
azure-sdk-for-js/sdk/containerregistry/container-registry/src/containerRegistryClient.ts
Lines 36 to 41 in 809f05c
I'll however get it reviewed by architects and others. 🙂