We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Test file: https://github.com/Azure/azure-dev/blob/main/cli/azd/test/functional/testdata/vs-server/tests/AcceptanceTests.cs
In the Azure subscription where functional tests are run, create a deployment that has "env2" in the name.
One way using Azure CLI:
main.bicep:
targetScope = 'subscription' param resourceGroupName string resource newRG 'Microsoft.Resources/resourceGroups@2024-03-01' = { name: resourceGroupName location: 'East US' }
az deployment sub create --name myenv2deployment --location eastus --template-file main.bicep --parameters resourceGroupName=<resource group name>
Run the test Test_CLI_VsServer/ManageEnvironments. If using VS Code, you can use the Test explorer:
The test fails with:
vs_server_test.go:199: DIR: /var/folders/ps/c0906c6x6pnghyl4jw54srz00000gn/T/Test_CLI_VsServerManageEnvironments792598557/001 aspire_test.go:357: 701ms [t-out] Test run for /Users/runner/work/1/s/cli/azd/test/functional/testdata/vs-server/tests/bin/Debug/net8.0/AzdVsServerTests.dll (.NETCoreApp,Version=v8.0) aspire_test.go:357: 771ms [t-out] VSTest version 17.11.1 (x64) aspire_test.go:357: 772ms [t-out] aspire_test.go:357: 866ms [t-out] Starting test execution, please wait... aspire_test.go:357: 892ms [t-out] A total of 1 test files matched the specified pattern. aspire_test.go:357: 13.018s [svr-out] [9IxdLZ5Z7oI= spinner] Analyzing Aspire Application (this might take a moment...) aspire_test.go:357: 19.341s [svr-out] [9IxdLZ5Z7oI= spinner] Analyzing Aspire Application (this might take a moment...) aspire_test.go:357: 24.836s [svr-out] [9IxdLZ5Z7oI= spinner] Initialize bicep provider aspire_test.go:357: 28.611s [svr-out] [9IxdLZ5Z7oI= spinner] Discovering resources to delete... aspire_test.go:357: 34.557s [t-out] Failed ManageEnvironments [32 s] aspire_test.go:357: 34.557s [t-out] Error Message: aspire_test.go:357: 34.557s [t-out] StreamJsonRpc.RemoteInvocationException : deleting infrastructure: error deleting Azure resources: getting resources to delete: environment name not found in deployment tags aspire_test.go:357: 34.557s [t-out] Stack Trace: aspire_test.go:357: 34.557s [t-out] at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject) aspire_test.go:357: 34.557s [t-out] at AzdVsServerTests.AcceptanceTests.ManageEnvironments() in /Users/runner/work/1/s/cli/azd/test/functional/testdata/vs-server/tests/AcceptanceTests.cs:line 108 aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted() aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter) aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke) aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke) aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context) aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context) aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.Execution.SimpleWorkItem.<>c__DisplayClass3_0.<PerformWork>b__0() aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.ContextUtils.<>c__DisplayClass1_0`1.<DoIsolated>b__0(Object _) aspire_test.go:357: 34.557s [t-out] at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) aspire_test.go:357: 34.557s [t-out] --- End of stack trace from previous location --- aspire_test.go:357: 34.557s [t-out] at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.ContextUtils.DoIsolated(ContextCallback callback, Object state) aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.ContextUtils.DoIsolated[T](Func`1 func) aspire_test.go:357: 34.557s [t-out] at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork()
Place where error is returned:
azure-dev/cli/azd/pkg/azapi/standard_deployments.go
Lines 354 to 358 in 835fc6e
This seems to be where we iterate through deployments and check if the hint env2 is in the deployment name:
env2
azure-dev/cli/azd/pkg/infra/deployment_manager.go
Lines 117 to 120 in 835fc6e
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Test file: https://github.com/Azure/azure-dev/blob/main/cli/azd/test/functional/testdata/vs-server/tests/AcceptanceTests.cs
Repro steps
In the Azure subscription where functional tests are run, create a deployment that has "env2" in the name.
One way using Azure CLI:
main.bicep:
Run the test Test_CLI_VsServer/ManageEnvironments. If using VS Code, you can use the Test explorer:
Observed
The test fails with:
Additional info
Place where error is returned:
azure-dev/cli/azd/pkg/azapi/standard_deployments.go
Lines 354 to 358 in 835fc6e
This seems to be where we iterate through deployments and check if the hint
env2
is in the deployment name:azure-dev/cli/azd/pkg/infra/deployment_manager.go
Lines 117 to 120 in 835fc6e
The text was updated successfully, but these errors were encountered: