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

[Form Recognizer] Sovereign clouds support #20522

Closed
wants to merge 34 commits into from

Conversation

HarshaNalluru
Copy link
Member

@HarshaNalluru HarshaNalluru commented Feb 24, 2022

Packages impacted by this PR

@azure/ai-form-recognizer

Issues associated with this PR

Fixes #19442

Describe the problem that is addressed by this PR

  • Adds sovereign cloud support to the form recognizer package

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

  • Adds the audience option in the client options to support the UsGov and China clouds

    • image
  • Based on the prior art and the architecture board discussions(links below), this design was chosen.

Provide a list of related PRs/issues

Are there test cases added in this PR? (If not, why?)

No, but the existing test cases are updated to handle the multiple clouds by checking the endpoint.

Checklists

  • Added impacted package name to the issue description
  • Added a changelog (if necessary)

@HarshaNalluru
Copy link
Member Author

/azp run js - ai-form-recognizer - tests-weekly

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru HarshaNalluru changed the title Sovereign cloulds support Sovereign clouds support Feb 24, 2022
* The authentication scope will be set from this audience.
* See {@link KnownFormRecognizerAudience} for known audience values.
*/
audience?: string;
Copy link
Contributor

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?

Copy link
Member Author

@HarshaNalluru HarshaNalluru Feb 24, 2022

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.

I'll however get it reviewed by architects and others. 🙂

*/
export enum KnownFormRecognizerAudience {
/** Azure China */
AzureResourceManagerChina = "https://cognitiveservices.azure.cn/.default",
Copy link
Member Author

@HarshaNalluru HarshaNalluru Feb 24, 2022

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 be KnownCognitiveServicesAudience instead and declared at some common place?

Copy link
Contributor

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...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sad.

Copy link
Member

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.

@HarshaNalluru
Copy link
Member Author

/azp run js - ai-form-recognizer - tests-weekly

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Member Author

/azp run js - ai-form-recognizer - tests-weekly

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Member Author

/azp run js - ai-form-recognizer - tests-weekly

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

trigger: none

stages:
- template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
PackageName: "@azure/ai-form-recognizer"
ServiceDirectory: formrecognizer
Location: "${{ parameters.Location }}"
SupportedClouds: 'Public,UsGov,China'
EnvVars:
AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will need to be changed to not be hardcoded to the public cloud values, but rather the env vars dynamically set by the test infra, e.g.

AZURE_CLIENT_ID: $(FORMRECOGNIZER_CLIENT_ID)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But app-config has the same thing, why does it work over there?
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HarshaNalluru it's possible app configuration reads the APPCONFIGURATION_CLIENT_ID, etc. variables and doesn't even use those old ones anymore.

@HarshaNalluru
Copy link
Member Author

HarshaNalluru commented Feb 28, 2022

/azp run js - ai-form-recognizer - tests-weekly

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru HarshaNalluru changed the title Sovereign clouds support [Form Recognizer] Sovereign clouds support Feb 28, 2022
@HarshaNalluru
Copy link
Member Author

/azp run js - ai-form-recognizer - tests-weekly

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Member Author

/azp run js - ai-form-recognizer - tests-weekly

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Member Author

/azp run js - ai-form-recognizer - tests-weekly

@ghost
Copy link

ghost commented Oct 21, 2022

Hi @HarshaNalluru. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@HarshaNalluru HarshaNalluru removed the no-recent-activity There has been no recent activity on this issue. label Oct 21, 2022
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Dec 23, 2022
@ghost
Copy link

ghost commented Dec 23, 2022

Hi @HarshaNalluru. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@HarshaNalluru HarshaNalluru removed the no-recent-activity There has been no recent activity on this issue. label Dec 25, 2022
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-ai-form-recognizer
azure-ai-form-recognizer

@HarshaNalluru
Copy link
Member Author

/azp run js - ai-form-recognizer - tests-weekly

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Apr 7, 2023
@ghost
Copy link

ghost commented Apr 7, 2023

Hi @HarshaNalluru. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@HarshaNalluru HarshaNalluru removed the no-recent-activity There has been no recent activity on this issue. label Apr 13, 2023
@github-actions
Copy link

Hi @HarshaNalluru. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Jun 16, 2023
@github-actions
Copy link

Hi @HarshaNalluru. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing /reopen if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cognitive - Form Recognizer no-recent-activity There has been no recent activity on this issue.
Projects
None yet
10 participants