Azure / azure-sdk-for-go

This repository is for active development of the Azure SDK for Go. For consumers of the SDK we recommend visiting our public developer docs at:
https://docs.microsoft.com/azure/developer/go/
MIT License
1.64k stars 844 forks source link

Azure Arc test pass: Azure Identity For Go Client Library #17143

Closed joshfree closed 2 years ago

joshfree commented 2 years ago

Tracking issue to follow up with @zzkaii to unblock manual test pass of Azure Identity for Go Client Library running on Azure Arc:

https://github.com/Azure/azure-sdk/issues/1908 https://github.com/Azure/azure-sdk/issues/1908#issuecomment-1047450255

Hi,@joshfree When test the Testing azure-identity in Azure Arc(in go) nd run the go test -run TestManagedIdentityCredential_AzureArc command,it display the error: image

Through the investigation , I tried to use internal v0.8.2, it works normally. But use internal v0.8.3 and later version, it can't work. Can you provide some help on this issue?

joshfree commented 2 years ago

@chlowell could you please follow up with @zzkaii?

chlowell commented 2 years ago

@zzkaii your test run is failing because azidentity wasn't able to configure the server we use to play back test recordings. This test case doesn't use that proxy--it's an offline test using fakes--but test runs always begin with configuring the proxy. Usually, this error means the proxy isn't running. You can start it with the docker-start-proxy.ps1 script in eng/common/testproxy.

All that said, why are you using internal 0.8.x? The latest version of azidentity requires internal 0.9.1.

zzkaii commented 2 years ago

@chlowell I tried to start docker-start-proxy.ps1 script in eng/common/testproxy before I run the test. But test reported the same error as before. Details are shown in the image below. Am I missing any steps? If so, please provide me more details.

Our test use the latest version internal 0.9.1. The reason I mention internal 0.8.x is that I tried to find the solution to this error. After investigation, I found that the test can pass when using the internal 0.8.2 version https://github.com/Azure/azure-sdk-for-go/commit/b509a3746c241234ddf116193fa9979cae667a3c. I'm not sure if this will help us solve this problem.

If you have any questions please let me know.

image

chlowell commented 2 years ago

The script does nothing when not given a parameter. Try this:

> ./eng/common/testproxy/docker-start-proxy.ps1 start
Attempting creation of Docker host ambitious_azsdk_test_proxy
...

You can use docker to verify the container is running:

❯ docker ps -a
NAMES                        CONTAINER ID   STATUS       PORTS
ambitious_azsdk_test_proxy   7c9371d6c42d   Up 3 days    0.0.0.0:5000-5001->5000-5001/tcp, :::5000-5001->5000-5001/tcp
zzkaii commented 2 years ago

@chlowell , Thank you for your help. The result of this test is pass after execute the command you provided.

chlowell commented 2 years ago

I'll close this then, since we're past the original problem. However, note again that the test in question is an offline one that fakes an Azure Arc environment. If you intended to run a live test on a real Arc VM, follow these instructions.