azure-sdk-for-python: [Text Analytics] "Invalid URL '$(js-textanalytics-test-service-endpoint)/text/analytics/v3.2-preview.2/analyze': No schema supplied" in Public, USGOV and China clouds

We are running live Tests against other clouds like US Gov and Azure China Cloud. The goal is to check whether new azure sdk package work with other clouds or not.

Error Description: When running the test test_analyze.py::TestAnalyze::test_disable_service_logs in weekly pipeline, it runs failed and the error message is shown as following. In addition, I ran this test in the local and nightly pipelines, and the result of both is pass. For more details on this issue, please check here: image

Expected Behavior: This service request is a valid url. Maybe we need to confirm whether the value of the environment variable js-textanalytics-test-service-endpoint (textanalytics/tests.yml) in weekly pipeline is correct and exists.

@benbp, @jameszliao-msft, @lmazuel, @meeraharidasa , @mayurid, @abhahn for notification.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

@kristapratico @v-xuto I have a PR up at https://github.com/Azure/azure-sdk-for-python/pull/22376 which updates the yaml to support sovereign cloud testing and removes the dependency on the current variable group. Once that’s merged in I can remove the old variable group reference in the pipeline as well.

@kristapratico if you can double check the contents of the config where I added the env variables and add anyone else relevant to the access policies + as vault owners that would be great. (Docs on the schema and how it gets set up are here).

Vault: https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/2cd617ea-1866-46b1-90e3-fffb087ebf9b/resourceGroups/LiveTestSecrets/providers/Microsoft.KeyVault/vaults/TestSecrets-textanalytic/overview

Or:

az keyvault secret show --vault-name testsecrets-textanalytic -n sub-config-text-analytics-azure-cloud-test-resources --query 'value'

P.S. Sadly I had to name the keyvault TestSecrets-TextAnalytic because the 24 character vault name limit made it to long for “Analytics” plural…

Hi @v-xuto, you can skip samples for UsGov and China. Just move the

MatrixReplace:
  - TestSamples=.*/true

under the PublicCloud config. For example: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/translation/tests.yml#L12-L13

This will skip samples for those clouds and we won’t have to add any code to the sample files themselves.

Ok the subscription configuration for public and the tests.yml config update has been made. I authorized the weekly pipeline to be able to load it for the public stage, and the env variables should not be defined for sovereign environments now.

@kristapratico because the variables are still referenced in tests.yml, devops will try to download them hence the access error.

I recommend we build out a subscription configuration overlay for text analytics and migrate these values out of the variable group, that way we know the values won’t be defined at all for sovereign tests and the test skips can handle that appropriately. I can take this on.

@kristapratico ah ok, in that case I’d say we should skip these tests in sovereign clouds until the feature set is supported.