-
Notifications
You must be signed in to change notification settings - Fork 393
Refactor and simplify Microsoft.Identity.Test.LabInfrastructure #5631
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
Merged
Conversation
This file contains hidden or 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
bgavrilMS
reviewed
Jan 5, 2026
bgavrilMS
reviewed
Jan 5, 2026
bgavrilMS
reviewed
Jan 5, 2026
tests/Microsoft.Identity.Test.LabInfrastructure/KeyVaultSecrets.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
reviewed
Jan 5, 2026
bgavrilMS
reviewed
Jan 5, 2026
bgavrilMS
approved these changes
Jan 5, 2026
Member
|
@MZOLN @gladjohn @cpp11nullptr - can you please review this as this introduces breaking changes to the lab API |
gladjohn
reviewed
Jan 6, 2026
tests/Microsoft.Identity.Test.Integration.netcore/HeadlessTests/ManagedIdentityTests.NetFwk.cs
Show resolved
Hide resolved
tests/Microsoft.Identity.Test.Integration.netcore/HeadlessTests/PoPTests.NetFwk.cs
Outdated
Show resolved
Hide resolved
RyAuld
approved these changes
Jan 6, 2026
Contributor
RyAuld
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed changes with Bogdan during labsync.
This was referenced Jan 9, 2026
This was referenced Jan 12, 2026
This was referenced Jan 12, 2026
This was referenced Jan 21, 2026
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.
Continues the lab migration work begun in #5558 and other PRs based on discussions and similar refactoring done in AzureAD/microsoft-authentication-library-for-java#1002
In short, these changes remove the last pieces of the old API-based system of retrieving test config in favor of the new key vault-based approach, and should make the Microsoft.Identity.Test.LabInfrastructure package easier to maintain going forward by simplifying the various helper classes/methods
Although a lot of files were changed, the majority of them don't need a deep review: they are test classes that were only changed to use the new helper class/method names and behavior, each file received the same sort of adjustment, and no test behavior was actually changed.
The only files that need a real review are in the Microsoft.Identity.Test.LabInfrastructure namespace, and here is a brief summary of the changes:
LabResponse: Previously just a container for user/app/lab config JSON classes, deleted in favor of separateXYZConfigclassesAppConfigandUserConfig: Represents the JSON-based configurations stored in the key vaultKeyVaultSecrets: Added to store the names of secrets in our key vaults, rather than hardcoding them in helper methodsKeyVaultSecretsProvider: Minor changes to comments to clarify what the key vaults are used forLabResponseHelper: The main helper for retrieving configuration from the key vault, and the class that received the most meaningful changesLabUserHelper, as it does more than user configGetXYZUserAsyncmethods which had hardcoded secret names and, despite the name, returned a merged response containing user, app, and lab configurationGetUserConfigAsyncandGetAppConfigAsyncmethods to return separateXYZConfiginstances based on key vault secret namesConcurrentDictionaryfields to cache deserialized JSON config responses from the key vaultLabApiConstants: Previously stored query parameters and other constants for API calls, deleted because those calls are no longer madeLabServiceParameters: Previously stored numerous enums that were compared to results in API calls, deleted in favor of a simplerLabConstantsfile as the vast majority weren't actually usedLabConstants: Remnants of the enums that were inLabServiceParameters, left here to avoid changing tests and making this PR even largerLabServiceApi: Previously was the main API helper class, deleted because those calls are no longer madeUserQueryParametersandLabUserNotFoundException: Previously used only to help format a strings in a few debug logs, deleted in favor of simpler error message behavior