Skip to content

Conversation

@benbp
Copy link
Member

@benbp benbp commented Nov 6, 2020

The overarching intent is to give us more control over the test matrix, and enable us to consolidate as much live test pipeline yaml as possible into azure-sdk-tools. Right now there are multiple different solutions across the language repos that could all be consolidated into one place. This will make it easier to roll out testing support for sovereign clouds, etc. across all the languages in the future. The changes here outline the proposed approach going forward for all live test pipelines.

This PR aims to achieve the above via the following:

  1. Simplify the cloud and platform configuration
    • Offload arm parameters and environment variables into the keyvault subscription configuration. This will prevent future duplication and also simplifies the pipeline
    • Make it easier to specify which clouds a pipeline should run (in the case of a daily trigger, which defaults to public clouds), and which clouds a pipeline should not run (in the case of a weekly trigger, which defaults to all clouds).
    • Enable easier definition of a sparse matrix (i.e. which platforms run on which clouds).
  2. Remove as many if conditionals as possible, such as TestCanary, weekly test, etc. When possible, we should prefer to check these values only in a single place instead of littering the template with if conditionals, to reduce complexity.
  3. Split out cloud/platform configuration and test yaml specific to a language as much as possible from the rest of the pipeline logic, so that the latter can be relocated to azure-sdk-tools/eng/common.

I've also pulled in the changes from Azure/azure-sdk-tools#1163 in order to support the new subscription configuration schema while keeping the PR pipelines working. This should be merged soon and then I'll rebase.

The new subscription configuration schema looks like:

{
  "SubscriptionId": "<subscription id>",
  "ProvisionerApplicationId": "<provisioner app id>",
  "ProvisionerApplicationSecret": "<provisioner app secret>",
  "Environment": "AzureCloud | AzureGov | AzureChina | <other environment>"
  "EnvironmentVariables": {
      "SERVICE_MANAGEMENT_URL": "<service management url>",
      "STORAGE_ENDPOINT_SUFFIX": "<storage endpoint suffix>",
      "RESOURCE_MANAGER_URL": "<resource manager url>",
      "SEARCH_ENDPOINT_SUFFIX": "<search endpoint suffix>",
      "COSMOS_TABLES_ENDPOINT_SUFFIX": "<cosmos tables endpoint suffix>"
  },
  "ArmTemplateParameters": {
      "keyVaultDomainSuffix": "<keyVaultDomainSuffix>",
      "storageEndpointSuffix": "<storageEndpointSuffix>",
      "endpointSuffix": "<endpointSuffix>",
      "azureAuthorityHost": "<azureAuthorityHost>",
      "keyVaultEndpointSuffix": "<keyVaultEndpointSuffix>"
  }
}

The cloud selection experience for manually running pipelines is also improved. Clouds are represented as stages, which can be selected for manual runs against the forthcoming weekly pipeline:

image

@jsquire jsquire added Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system. labels Nov 7, 2020
@benbp benbp force-pushed the benbp/cloudconfig-template-test-matrix-pr branch 2 times, most recently from f3dc4c1 to 2b733d8 Compare November 9, 2020 23:20
@benbp benbp force-pushed the benbp/cloudconfig-template-test-matrix-pr branch 2 times, most recently from a5748af to 37b3d30 Compare November 10, 2020 01:59
@benbp
Copy link
Member Author

benbp commented Nov 10, 2020

/azp run net - identity - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@weshaggard
Copy link
Member

@benbp after thinking about this a little I think we should wait until after releases this week before we merge this change as this change has the potential to cause a number of issues for folks trying to get their tests working for release. Lets hold this change until next week.

@benbp
Copy link
Member Author

benbp commented Nov 10, 2020

@weshaggard I agree, but we may want to work with @heaths to figure out a workaround for hsm.

@weshaggard
Copy link
Member

What in this PR was he depending on? I thought he already had a workaround based on just the script changes which were part of the eng/common change you merged earlier.

@benbp
Copy link
Member Author

benbp commented Nov 10, 2020

Nvm you're right.

@benbp benbp force-pushed the benbp/cloudconfig-template-test-matrix-pr branch from 57fe24f to c9fb637 Compare November 16, 2020 19:09
@benbp
Copy link
Member Author

benbp commented Nov 17, 2020

@benbp benbp merged commit 804617a into Azure:master Nov 17, 2020
@benbp benbp deleted the benbp/cloudconfig-template-test-matrix-pr branch November 17, 2020 19:21
- script: sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
displayName: Bypass local DNS server to workaround issue resolving cognitiveservices names
condition: and(succeededOrFailed(), eq(variables['OSVmImage'], 'ubuntu-18.04'))
condition: |
Copy link
Member

Choose a reason for hiding this comment

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

@benbp did you intend these eng/common changes directly into the .NET repo? We should make sure these get into the tools repo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah! Missed the directory for this one. I'll make a sync PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

annelo-msft pushed a commit to annelo-msft/azure-sdk-for-net that referenced this pull request Feb 17, 2021
…ort weekly tests (Azure#16710)

* Consolidate live test cloud/platform configuration, use stages, support weekly tests

* Update live test pipelines to use new cloud configuration

* Remove psdebug statement

* Use preview subscription configuration

* Fix cloud config parameter reference from rebase

* Shorten local dns template path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

App Configuration Azure.ApplicationModel.Configuration Azure.Core Azure.Identity Central-EngSys This issue is owned by the Engineering System team. Cognitive - Form Recognizer Cognitive - Text Analytics EngSys This issue is impacting the engineering system. Event Grid Event Hubs IoT KeyVault Search Service Bus Storage Storage Service (Queues, Blobs, Files) Tables

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants