-
Notifications
You must be signed in to change notification settings - Fork 893
Fix deployment E2E nightly failures #16086
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 all commits
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 |
|---|---|---|
|
|
@@ -86,28 +86,60 @@ 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() | ||
| var waitingForTemplateVersionPrompt = new CellPatternSearcher() | ||
| .Find("NuGet.config"); | ||
| var waitingForInitComplete = new CellPatternSearcher() | ||
| .Find("Aspire initialization complete"); | ||
| var waitingForAgentInitPrompt = new CellPatternSearcher() | ||
| .Find("configure AI agent environments"); | ||
| var waitingForSuccessPrompt = new CellPatternSearcher() | ||
| .FindPattern(counter.Value.ToString()) | ||
| .RightText(" OK] $ "); | ||
|
Comment on lines
+89
to
+95
|
||
|
|
||
| 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 | ||
| var sawTemplateVersionPrompt = false; | ||
| var sawAgentInitPrompt = false; | ||
| await auto.WaitUntilAsync(s => | ||
| { | ||
| if (waitingForTemplateVersionPrompt.Search(s).Count > 0) | ||
| { | ||
| sawTemplateVersionPrompt = true; | ||
| return true; | ||
| } | ||
|
|
||
| await auto.WaitUntilAsync( | ||
| s => waitingForInitComplete.Search(s).Count > 0, | ||
| timeout: TimeSpan.FromMinutes(2), | ||
| description: "aspire initialization complete"); | ||
| if (waitingForAgentInitPrompt.Search(s).Count > 0) | ||
| { | ||
| sawAgentInitPrompt = true; | ||
| return true; | ||
| } | ||
|
|
||
| return waitingForSuccessPrompt.Search(s).Count > 0; | ||
| }, timeout: TimeSpan.FromMinutes(2), description: "template version prompt, agent init prompt, or init success prompt"); | ||
|
|
||
| if (sawTemplateVersionPrompt) | ||
| { | ||
| await auto.EnterAsync(); | ||
|
|
||
| await auto.DeclineAgentInitPromptAsync(counter); | ||
| await auto.WaitUntilAsync(s => | ||
| { | ||
| if (waitingForAgentInitPrompt.Search(s).Count > 0) | ||
| { | ||
| sawAgentInitPrompt = true; | ||
| return true; | ||
| } | ||
|
|
||
| return waitingForSuccessPrompt.Search(s).Count > 0; | ||
| }, timeout: TimeSpan.FromMinutes(2), description: "agent init prompt or init success prompt"); | ||
| } | ||
|
|
||
| if (sawAgentInitPrompt) | ||
| { | ||
| await auto.DeclineAgentInitPromptAsync(counter); | ||
| } | ||
| else | ||
| { | ||
| await auto.WaitForSuccessPromptAsync(counter); | ||
| } | ||
|
|
||
| // Step 4a: Add Aspire.Hosting.Azure.AppContainers | ||
| output.WriteLine("Step 4a: Adding Azure Container Apps hosting package..."); | ||
|
|
||
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.
waitingForTemplateVersionPromptis searching for"NuGet.config", but the template-version prompt itself has a stable header (e.g., "Select a template version:"). Depending on the configured channel/source, the selection items may not include "NuGet.config", which would make this state machine miss the prompt and time out whileaspire initis still waiting for input. Prefer matching the prompt header text rather than a source-detail substring.