-
Notifications
You must be signed in to change notification settings - Fork 909
Fix deployment E2E nightly failures #16072
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,9 +100,12 @@ private async Task UpgradeFromGaToDevDoesNotDuplicateStorageAccountsCore(Cancell | |
| output.WriteLine("Step 5: Creating single-file AppHost with GA CLI..."); | ||
| await auto.TypeAsync("aspire init"); | ||
| await auto.EnterAsync(); | ||
| // Wait for and dismiss the language selection (auto-selected or prompt) | ||
| await auto.WaitAsync(TimeSpan.FromSeconds(5)); | ||
| await auto.EnterAsync(); | ||
| await auto.WaitUntilTextAsync("Aspire initialization complete", timeout: TimeSpan.FromMinutes(2)); | ||
| // The CLI may show a "Select a template version" prompt — dismiss it | ||
| await auto.WaitUntilTextAsync("based on NuGet.config", timeout: TimeSpan.FromSeconds(60)); | ||
| await auto.EnterAsync(); | ||
| await auto.DeclineAgentInitPromptAsync(counter); | ||
|
||
|
|
||
| // Step 6: Add ACA package using GA CLI (uses GA NuGet packages) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,27 +86,12 @@ private async Task DeployTypeScriptVnetSqlServerInfrastructureCore(CancellationT | |
| // Step 3: Create TypeScript AppHost using aspire init | ||
| output.WriteLine("Step 3: Creating TypeScript AppHost with aspire init..."); | ||
|
|
||
| var waitingForNuGetConfigPrompt = new CellPatternSearcher() | ||
| .Find("NuGet.config"); | ||
| var waitingForInitComplete = new CellPatternSearcher() | ||
| .Find("Aspire initialization complete"); | ||
|
|
||
| await auto.TypeAsync("aspire init --language typescript"); | ||
| await auto.EnterAsync(); | ||
|
|
||
| // NuGet.config prompt may or may not appear depending on environment. | ||
| await auto.WaitUntilAsync( | ||
| s => waitingForNuGetConfigPrompt.Search(s).Count > 0 | ||
| || waitingForInitComplete.Search(s).Count > 0, | ||
| timeout: TimeSpan.FromMinutes(2), | ||
| description: "NuGet.config prompt or init completion"); | ||
| await auto.EnterAsync(); // Dismiss NuGet.config prompt if present | ||
|
|
||
| await auto.WaitUntilAsync( | ||
| s => waitingForInitComplete.Search(s).Count > 0, | ||
| timeout: TimeSpan.FromMinutes(2), | ||
| description: "aspire initialization complete"); | ||
|
|
||
| // When using bundle install, the CLI auto-selects the package version | ||
| // from the local hive without showing a NuGet.config prompt. | ||
| // Go straight to waiting for the agent init prompt / success prompt. | ||
| await auto.DeclineAgentInitPromptAsync(counter); | ||
|
|
||
|
||
| // Step 4a: Add Aspire.Hosting.Azure.AppContainers | ||
|
|
||
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.
The new
WaitAsync(5s)+EnterAsync()is timing-based and can send input at the wrong time (or too early/late) if the language selection prompt is slower/faster, making this test flaky. Other E2E tests typicallyWaitUntilTextAsync("Which language would you like to use?")before sending Enter. Consider waiting for the actual prompt text (or for the success/agent-init prompt if it auto-selects) instead of sleeping.