Skip to content

Consolidate Docker verification for CI workflows#16841

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/consolidate-verify-docker-step
Open

Consolidate Docker verification for CI workflows#16841
Copilot wants to merge 3 commits into
mainfrom
copilot/consolidate-verify-docker-step

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

Summary

Three related CI changes around the CLI E2E Docker images and Docker daemon verification:

  1. Consolidate Docker verification into a shared composite action (4ae1be0)

    • New .github/actions/verify-docker composite action runs docker info as the gating check and always emits docker version and docker buildx version diagnostics, so the build log is useful even when the daemon is broken. docker info's exit code is re-raised at the end so the step still fails on a missing or unreachable daemon.
    • Step-level if: runner.os == 'Linux' makes the action a no-op on non-Linux runners, so cross-OS callers can drop their if: runner.os == 'Linux' guards.
    • Replaces ad-hoc run: docker info in five workflows: build-cli-e2e-image.yml, deployment-tests.yml, reproduce-flaky-tests.yml, run-tests.yml, tests-daily-smoke.yml.
    • Documented in docs/ci/verify-docker.md.
  2. Always build CLI E2E Docker image, independent of matrix gate (b98720b)

    • The build_cli_e2e_image reusable workflow was gated on tests_matrix_requires_cli_archive, which forced the image build to wait on setup_for_tests and delayed every downstream CLI E2E test. Drop the gate so the image build runs as soon as setup completes, in parallel with the rest of the test matrix.
  3. Build Java polyglot CLI E2E image via local docker daemon (577c460)

    • The Java image extends the polyglot base via FROM aspire-e2e-polyglot-base, which only exists in the local docker daemon (loaded via --load from the previous buildx step). The docker-container buildx driver cannot resolve local-daemon images and tries to pull from docker.io/library/..., which 401s.
    • Branch build_image on the cache scope: non-empty → cached buildx docker-container path; empty → daemon-driven DOCKER_BUILDKIT=1 docker build. Route the Java image through the empty-scope path. Matches what docs/ci/cli-e2e-images.md already documents.

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 — CI-only workflow changes; covered by the workflows themselves running on this PR.
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
    • No

Copilot AI linked an issue May 6, 2026 that may be closed by this pull request
6 tasks
Copilot AI changed the title [WIP] Consolidate verify Docker is running step into a composite action Consolidate Docker verification for CI workflows May 6, 2026
Copilot finished work on behalf of radical May 6, 2026 21:55
Copilot AI requested a review from radical May 6, 2026 21:55
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16841

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16841"

@radical radical closed this May 11, 2026
@radical radical reopened this May 11, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.4 milestone May 11, 2026
@radical radical force-pushed the copilot/consolidate-verify-docker-step branch 2 times, most recently from c0ab1d6 to 916e79e Compare May 11, 2026 22:44
@github-actions
Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

radical and others added 3 commits May 11, 2026 19:26
The CLI E2E Java polyglot image extends the polyglot base via
`FROM aspire-e2e-polyglot-base`, which only exists in the local docker
daemon (it is loaded there via the `--load` option of the previous
buildx build). The docker-container buildx driver cannot see local
daemon images, so any attempt to build the Java image through the
shared `cli-e2e-builder` instance fails with `pull access denied for
docker.io/library/aspire-e2e-polyglot-base`.

Branch the `build_image` helper on the cache scope:
- non-empty scope  → cached buildx docker-container path
- empty scope      → daemon-driven `DOCKER_BUILDKIT=1 docker build`

Route the Java image through `build_with_mirror_retry` with an empty
cache scope so it picks the daemon-driven path and the special-case
`build_java_image` helper can be removed. Behavior matches what
docs/ci/cli-e2e-images.md already calls out: the Java image is built
from the local polyglot base and does not use a shared BuildKit cache
scope.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The build_cli_e2e_image reusable workflow was previously gated on
`tests_matrix_requires_cli_archive` so it only ran when the test matrix
contained at least one job that needed the CLI archive. That gate also
forced the image build to wait for setup_for_tests to finish computing
the matrix, which delayed test jobs that depend on the image.

Drop the gate so the image build kicks off in parallel with setup. The
extra cost on PRs that don't need the image is one short-lived Docker
build job, which is preferable to serializing every CLI E2E test run on
matrix setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace ad-hoc `docker info` calls in the CI workflows with a single
shared composite action at `.github/actions/verify-docker`. The action
runs `docker info` as the gating check and always emits
`docker version` and `docker buildx version` diagnostics, so the
build log is useful even when the daemon is broken. `docker info`'s
exit code is re-raised at the end so the step still fails on a missing
or unreachable daemon.

The action is a no-op on non-Linux runners, so callers in cross-OS
matrices (run-tests.yml, reproduce-flaky-tests.yml) can drop their
`if: runner.os == 'Linux'` guards.

Migrate all five callers (build-cli-e2e-image, deployment-tests,
reproduce-flaky-tests, run-tests, tests-daily-smoke) and add
docs/ci/verify-docker.md.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@radical radical force-pushed the copilot/consolidate-verify-docker-step branch from 916e79e to 4ae1be0 Compare May 11, 2026 23:26
@radical radical marked this pull request as ready for review May 11, 2026 23:28
Copilot AI review requested due to automatic review settings May 11, 2026 23:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates Docker daemon verification used by multiple CI workflows into a shared composite action, and adjusts the CLI E2E image build workflow so downstream Docker-based tests get earlier, more consistent diagnostics.

Changes:

  • Introduces a new .github/actions/verify-docker composite action that gates on docker info while still emitting docker version and docker buildx version diagnostics.
  • Updates multiple CI workflows to use the shared Docker verification action (removing per-workflow docker info snippets and Linux-only guards at call sites).
  • Adjusts the CLI E2E image build workflow to route the Java polyglot image through a daemon-backed docker build path when a cache scope is empty.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/ci/verify-docker.md Adds documentation for the new shared Docker verification action.
.github/actions/verify-docker/action.yml New composite action that verifies Docker availability and emits diagnostics (Linux only).
.github/workflows/tests.yml Removes the conditional gate so the CLI E2E Docker image workflow always runs after setup_for_tests.
.github/workflows/tests-daily-smoke.yml Switches Docker verification to the shared action.
.github/workflows/run-tests.yml Switches Docker verification to the shared action (call sites no longer need Linux guards).
.github/workflows/reproduce-flaky-tests.yml Switches Docker verification to the shared action.
.github/workflows/deployment-tests.yml Switches Docker verification to the shared action (replacing inline diagnostic script).
.github/workflows/build-cli-e2e-image.yml Uses shared Docker verification; changes image build logic to choose cached buildx vs daemon-backed build for local-image FROM support.

Comment thread docs/ci/verify-docker.md
@@ -0,0 +1,7 @@
# Verify Docker action

Workflows that need Docker should use `.github/actions/verify-docker` instead of running `docker info` directly. The action checks that the Docker daemon is reachable with `docker info` and always emits `docker version` and `docker buildx version` so logs are useful when the daemon is broken.
@github-actions
Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@github-actions
Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 78 recordings uploaded (commit 4ae1be0)

View all recordings
Status Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireInitSingleFileAppHostRunsViaDotnetRunAppHost ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJavaEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateJavaAppHostWithViteApp ▶️ View Recording
CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain ▶️ View Recording
DashboardRunWithOtelTracesReturnsNoTraces ▶️ View Recording
DeployK8sBasicApiService ▶️ View Recording
DeployK8sWithExternalHelmChart ▶️ View Recording
DeployK8sWithGarnet ▶️ View Recording
DeployK8sWithMongoDB ▶️ View Recording
DeployK8sWithMySql ▶️ View Recording
DeployK8sWithPostgres ▶️ View Recording
DeployK8sWithRabbitMQ ▶️ View Recording
DeployK8sWithRedis ▶️ View Recording
DeployK8sWithSqlServer ▶️ View Recording
DeployK8sWithValkey ▶️ View Recording
DeployTypeScriptAppToKubernetes ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance ▶️ View Recording
DoListStepsShowsPipelineSteps ▶️ View Recording
DocsCommand_RendersInteractiveMarkdownFromLocalSource ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ▶️ View Recording
InteractiveCSharpInitCreatesExpectedFiles ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LatestCliCanStartStableChannelAppHost ▶️ View Recording
LatestCliCanStartStableChannelTypeScriptAppHost ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
OtelLogsReturnsStructuredLogsFromStarterAppCore ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithConfigureEnvFileUpdatesEnvOutput ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
PublishWithoutOutputPathUsesAppHostDirectoryDefault ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RestoreGeneratesSdkFiles_WithConfiguredToolchain ▶️ View Recording
RestoreRefreshesGeneratedSdkAfterAddingIntegration ▶️ View Recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View Recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View Recording

📹 Recordings uploaded automatically from CI run #25703369768

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking issue for follow-up work on #16787 (Prebuild CLI E2E Docker image)

3 participants