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

[Communication] - PhoneNumbers - Implement a phone number pool for live test pipelines #26910

Conversation

danielortega-msft
Copy link
Member

@danielortega-msft danielortega-msft commented Feb 9, 2022

This implements a simple pool of available phone numbers to use in live test pipelines. This solves an issue with the update capabilities live tests caused when multiple tests attempt to modify the state of a phone number simultaneously.

In order to make use of this, the following environment variables need to be passed:

  • AZURE_TEST_AGENT specifies the OS and runtime configuration for the job. It should contain the OS, the OS version and the framework/runtime version separated by underscores; e.g. windows_2019_netcore31.
  • AZURE_PHONE_NUMBER_<AZURE_TEST_AGENT>, where <AZURE_TEST_AGENT> corresponds to the value of the variable described prior; e.g. AZURE_PHONE_NUMBER_windows_2019_netcore31.

NOTE: If at least one of these variables is not present, tests will default to use the phone number set in the AZURE_PHONE_NUMBER environment variable as a fallback.

Additionally, by using setting the SKIP_UPDATE_CAPABILITIES_LIVE_TESTS variable to TRUE, update capabilities tests can be skipped altoghether. This is useful because the amount of phone numbers available for testing (currently limited to 3) is smaller than the number of test jobs running in parallel.

NOTE: The phone numbers pool is intended to be used when running live tests in parallel (e.g. in live test pipelines). If this is not the case, it is encouraged to use the existing AZURE_PHONE_NUMBER environment variable.

This PR is a follow-up to #26759.

@ghost ghost added the Communication label Feb 9, 2022
@check-enforcer
Copy link

check-enforcer bot commented Feb 9, 2022

This pull request is protected by Check Enforcer.
For more information about how to run a pipeline against this pull request, see this.

Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
This avoids the need to make code changes when the test matrix or the phone numbers pool is modified.

This approach requires that the test agent identifier is explicitly defined as an environment variable in the job matrix in order to have a consistent way to get that information at runtime across different framework and OS versions.
@danielortega-msft danielortega-msft merged commit c04cc51 into Azure:main Feb 14, 2022
@danielortega-msft danielortega-msft deleted the feature/update-capabilities-configurations branch February 14, 2022 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants