-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Merged
danielortega-msft
merged 5 commits into
Azure:main
from
danielortega-msft:feature/update-capabilities-configurations
Feb 14, 2022
Merged
[Communication] - PhoneNumbers - Implement a phone number pool for live test pipelines #26910
danielortega-msft
merged 5 commits into
Azure:main
from
danielortega-msft:feature/update-capabilities-configurations
Feb 14, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also, rename matrix configuration file
ghost
added
the
Communication
label
Feb 9, 2022
This pull request is protected by Check Enforcer. |
danielortega-msft
requested review from
chidozieononiwu,
weshaggard,
benbp,
miguhern,
whisper6284,
lucasrsant,
RoyHerrod and
danielav7
as code owners
February 10, 2022 00:56
benbp
reviewed
Feb 10, 2022
benbp
approved these changes
Feb 10, 2022
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
lucasrsant
reviewed
Feb 10, 2022
sdk/communication/Azure.Communication.Common/tests/CommunicationTestEnvironment.cs
Outdated
Show resolved
Hide resolved
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.
benbp
reviewed
Feb 11, 2022
sdk/communication/Azure.Communication.PhoneNumbers/phone-numbers-livetest-matrix.json
Show resolved
Hide resolved
benbp
approved these changes
Feb 11, 2022
lucasrsant
approved these changes
Feb 14, 2022
sdk/communication/Azure.Communication.Common/tests/CommunicationTestEnvironment.cs
Show resolved
Hide resolved
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
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.
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 toTRUE
, 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.