Skip to content

Conversation

@danegsta
Copy link
Member

@danegsta danegsta commented May 9, 2025

Description

Windows tests seem to have started having issues with container runtime detection. This PR forces the tests to use the Docker runtime since that's what's installed. It'll cause us to skip most of the detection logic hopefully the issue.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 9, 2025
@radical
Copy link
Member

radical commented May 9, 2025

this should probably also be added to

env:
DOCKER_BUILDKIT: 1
# https://github.com/dotnet/aspire/issues/5195#issuecomment-2271687822
DOTNET_ASPIRE_DEPENDENCY_CHECK_TIMEOUT: 180
DCP_DIAGNOSTICS_LOG_LEVEL: debug
DCP_DIAGNOSTICS_LOG_FOLDER: $(Build.ArtifactStagingDirectory)/artifacts/log/dcp
DCP_PRESERVE_EXECUTABLE_LOGS: 1
DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet
and
<HelixPreCommand Include="$(_EnvVarSetKeyword) DCP_DIAGNOSTICS_LOG_LEVEL=debug" />
<HelixPreCommand Include="$(_EnvVarSetKeyword) DCP_DIAGNOSTICS_LOG_FOLDER=$(_HelixLogsPath)" />
<HelixPreCommand Include="$(_EnvVarSetKeyword) DCP_PRESERVE_EXECUTABLE_LOGS=1" />

@danegsta danegsta requested a review from eerhardt as a code owner May 9, 2025 15:58
@danmoseley
Copy link
Member

failure is
Download failed: server closed connection. URL: https://cdn.playwright.dev/dbazure/download/playwright/builds/chromium/1155/chromium-linux.zip
@radical do we have enough retries on this ? I've seen it before.

@danegsta
Copy link
Member Author

danegsta commented May 9, 2025

failure is Download failed: server closed connection. URL: https://cdn.playwright.dev/dbazure/download/playwright/builds/chromium/1155/chromium-linux.zip @radical do we have enough retries on this ? I've seen it before.

Saw the same error from the test runs on the first commit to this PR. The URL works fine from my home network; test pool getting rate limited?

@danmoseley
Copy link
Member

@radical copilot says htere's no way to request retries of the playwright download short of looping in msbuild

<PropertyGroup>
  <MaxRetries>3</MaxRetries>
  <RetryCount>0</RetryCount>
</PropertyGroup>

<Target Name="InstallPlaywrightWithRetry">
  <Exec Command="dotnet exec --runtimeconfig $(MSBuildThisFileDirectory)Microsoft.Playwright.runtimeconfig.json $(_MicrosoftPlaywrightDllPath) install @(BrowsersForPlaywrightToInstall, ' ')"
        EnvironmentVariables="@(_EnvVarsForPlaywrightInstall)"
        IgnoreExitCode="true">
    <Output TaskParameter="ExitCode" PropertyName="PlaywrightExitCode" />
  </Exec>

  <Message Text="Playwright install attempt $(RetryCount), ExitCode: $(PlaywrightExitCode)" Importance="high" />

  <Error Condition="'$(PlaywrightExitCode)' != '0' and '$(RetryCount)' == '$(MaxRetries)'" Text="Playwright install failed after $(MaxRetries) attempts." />

  <PropertyGroup>
    <RetryCount Condition="'$(PlaywrightExitCode)' != '0'">$(RetryCount)</RetryCount>
    <RetryCount Condition="'$(PlaywrightExitCode)' != '0'">$([MSBuild]::Add($(RetryCount), 1))</RetryCount>
  </PropertyGroup>

  <CallTarget Condition="'$(PlaywrightExitCode)' != '0' and '$(RetryCount)' != '$(MaxRetries)'" Targets="InstallPlaywrightWithRetry" />
</Target>

@danegsta
Copy link
Member Author

danegsta commented May 9, 2025

Green tests, so I'll merge this to unblock the other PRs hitting test failures.

@danegsta danegsta merged commit 8692e43 into dotnet:main May 9, 2025
332 of 334 checks passed
@danmoseley
Copy link
Member

thanks @danegsta . is there a product bug here for 9.3?

@danmoseley danmoseley added area-orchestrator and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 9, 2025
@davidfowl
Copy link
Member

Are we sure this isn’t a product issue?

@danegsta
Copy link
Member Author

danegsta commented May 9, 2025

thanks @danegsta . is there a product bug here for 9.3?

Best guess is that Docker on the test pool is hanging on the docker info command. We added the workaround we're using here in 9.2 after a couple users reported similar behavior (but we couldn't reproduce at the time). I do want to make a change to switch from using docker info in our runtime health check to checking if Docker is a symlink instead, but I don't know if we want to take that change in 9.3 if we aren't running into it outside of the test machines.

@afscrome
Copy link
Contributor

afscrome commented May 9, 2025

This sounds related to #8737 - I see tests intermittently fail on 9.2 for RuntimeUnhealthy, even though other containers have started up successfully (had one fail like that this morning). Also see similar with the dashboard, although dashboard is less impacted as the RuntimeHealthy resources eventually retry and start up.

@danegsta
Copy link
Member Author

danegsta commented May 9, 2025

I've made a change in DCP main to avoid calling docker info in the runtime checks.

danegsta added a commit to danegsta/aspire that referenced this pull request May 15, 2025
karolz-ms pushed a commit that referenced this pull request May 15, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants