Skip to content

Re-enable running previously disabled samples using AzureCliCredential.#5818

Merged
ahsonkhan merged 5 commits intoAzure:mainfrom
ahsonkhan:EnableAllSamples
Jul 18, 2024
Merged

Re-enable running previously disabled samples using AzureCliCredential.#5818
ahsonkhan merged 5 commits intoAzure:mainfrom
ahsonkhan:EnableAllSamples

Conversation

@ahsonkhan
Copy link
Copy Markdown
Contributor

@ahsonkhan ahsonkhan commented Jul 18, 2024

All the SDK samples continue to build for all cross-platform CI pipelines that have BUILD_SAMPLES=ON.

We had previously disabled running the samples using DISABLE_RUN: #5799 after turning FederatedAuth on, here: #5754

This PR re-enables running most of the samples that can be run, using AzureCliCredential in an AzureCLI task, specifically on Ubuntu. Only the identity sample client_secret_credential_sample is left disabled since it relies on AZURE_CLIENT_SECRET env var being set, which we don't use anymore with FederatedAuth.

It is not required for samples to only use AzurePipelinesCredential. Any credential that doesn't require secrets set or shared is allowed (this includes AzureCliCredential, AzurePowershellCredential, ManagedIdentityCredential, etc.). Since AzureCliCredential is already part of the DAC (and C++ currently doesn't have AzurePowershellCredential), that is a viable alternative.

There is an on-going investigation why the AzureCLI@2 task behaves differently between Ubuntu and Windows. It works as expected on Ubuntu, so we limit our runs to that. See related issues: microsoft/azure-pipelines-tasks#20167 / actions/runner-images#10246

Previous experiments: #5800

Further details shared offline.

Since we already have unit/live tests, and the samples already get built, there are diminishing returns in running samples, and even more so across multiple OSes. C++ samples are compiled, so majority of the bugs/typos (especially if the API surface changes) will get caught at build time. Having them run in our CI is extra/nice to have. Therefore, it isn't required for us to run the samples on Windows. The only other language that runs the samples (as-is), is JS, while all the other language SDKs only build the samples. That is sufficient for most cases.

cc @RickWinter

@ahsonkhan ahsonkhan added EngSys This issue is impacting the engineering system. Azure.Identity KeyVault Attestation Event Hubs labels Jul 18, 2024
@ahsonkhan ahsonkhan self-assigned this Jul 18, 2024
@ahsonkhan
Copy link
Copy Markdown
Contributor Author

/azp run cpp - attestation, cpp - keyvault, cpp - identity, cpp - eventhubs

@azure-pipelines

This comment was marked as duplicate.

@ahsonkhan

This comment was marked as duplicate.

@azure-pipelines

This comment was marked as duplicate.

@ahsonkhan

This comment was marked as duplicate.

@azure-pipelines

This comment was marked as duplicate.

@ahsonkhan
Copy link
Copy Markdown
Contributor Author

FYI @weshaggard for review

@ahsonkhan

This comment was marked as duplicate.

@azure-pipelines

This comment was marked as duplicate.

Comment thread eng/pipelines/templates/jobs/live.tests.yml
@ahsonkhan ahsonkhan merged commit 9b9f76a into Azure:main Jul 18, 2024
@ahsonkhan ahsonkhan deleted the EnableAllSamples branch July 18, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Attestation Azure.Identity EngSys This issue is impacting the engineering system. Event Hubs KeyVault

Projects

Development

Successfully merging this pull request may close these issues.

5 participants