Repository navigation
Graduate Dockerfile builder APIs - #20823
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20823Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20823" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟢 Approval recommended
The changes consistently remove the diagnostic while preserving implementation and generated API behavior.
0 open findings
What changed in this PR
Graduates the annotation-driven Dockerfile builder and polyglot APIs from experimental status without changing behavior or signatures.
Changes:
- Removes
ASPIREDOCKERFILEBUILDER001attributes and suppressions. - Updates generated TypeScript documentation and authoring guidance.
- Removes imports made unused by graduation.
| File | Description |
|---|---|
tests/Aspire.Hosting.Tests/Publishing/ResourceContainerImageManagerTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Tests/ApplicationModel/Docker/WithDockerfileBuilderTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Tests/ApplicationModel/Docker/DockerfileStatementsTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Tests/ApplicationModel/Docker/DockerfileStageTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Tests/ApplicationModel/Docker/DockerfileBuilderTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Tests/ApplicationModel/Docker/DockerfileBuilderIntegrationTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Tests/ApplicationModel/Docker/DockerfileBuilderEdgeCasesTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Tests/ApplicationModel/Docker/DockerfileBuilderCallbackContextTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Tests/ApplicationModel/Docker/DockerfileBuilderCallbackAnnotationTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Tests/ApplicationModel/Docker/DockerfileBuildAnnotationTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Rust.Tests/AddRustAppPublishTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Python.Tests/AddUvicornAppTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.MongoDB.Tests/SingleMemberReplicaSetTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.JavaScript.Tests/AddViteAppTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.JavaScript.Tests/AddNodeAppTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.JavaScript.Tests/AddDenoAppTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.JavaScript.Tests/AddBunAppTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Java.Tests/AddJavaAppPublishTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Go.Tests/AddGoAppTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts |
Removes generated experimental tags. |
tests/Aspire.Hosting.Blazor.Tests/AddBlazorGatewayTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Azure.Tests/AzureDeployerTests.cs |
Removes obsolete suppression. |
tests/Aspire.Hosting.Azure.Tests/AzureContainerAppsTests.cs |
Removes obsolete suppression. |
src/Aspire.Hosting/Publishing/ResourceContainerImageManager.cs |
Removes obsolete suppression. |
src/Aspire.Hosting/ContainerResourceBuilderExtensions.cs |
Graduates public builder extensions. |
src/Aspire.Hosting/Ats/DockerfileBuilderExports.cs |
Removes obsolete suppression. |
src/Aspire.Hosting/ApplicationModel/DotnetProgramPublishing.cs |
Removes obsolete suppression. |
src/Aspire.Hosting/ApplicationModel/DockerfileBuilderCallbackContext.cs |
Graduates callback context. |
src/Aspire.Hosting/ApplicationModel/DockerfileBuilderCallbackAnnotation.cs |
Graduates callback annotation. |
src/Aspire.Hosting/ApplicationModel/DockerfileBaseImageAnnotation.cs |
Graduates base-image annotation. |
src/Aspire.Hosting/ApplicationModel/Docker/DockerfileStatements.cs |
Removes obsolete suppression. |
src/Aspire.Hosting/ApplicationModel/Docker/DockerfileStatement.cs |
Graduates statement base class. |
src/Aspire.Hosting/ApplicationModel/Docker/DockerfileStage.cs |
Graduates stage APIs. |
src/Aspire.Hosting/ApplicationModel/Docker/DockerfileBuilder.cs |
Graduates builder APIs. |
src/Aspire.Hosting/ApplicationModel/Docker/ContainerFilesExtensions.cs |
Graduates container-file helpers. |
src/Aspire.Hosting.Yarp/YarpResourceExtensions.cs |
Removes obsolete suppression. |
src/Aspire.Hosting.Rust/RustHostingExtensions.cs |
Removes obsolete suppression pair. |
src/Aspire.Hosting.Rust/RustDockerfileGenerator.cs |
Removes obsolete suppression pair. |
src/Aspire.Hosting.Redis/RedisBuilderExtensions.cs |
Removes obsolete suppression. |
src/Aspire.Hosting.Python/PythonAppResourceBuilderExtensions.cs |
Removes obsolete suppression. |
src/Aspire.Hosting.MongoDB/MongoDBBuilderExtensions.cs |
Removes obsolete suppression. |
src/Aspire.Hosting.JavaScript/JavaScriptPackageManagerAnnotation.cs |
Graduates Docker stage callbacks. |
src/Aspire.Hosting.JavaScript/JavaScriptHostingExtensions.cs |
Removes obsolete suppression. |
src/Aspire.Hosting.Java/JavaHostingExtensions.cs |
Removes obsolete suppression pair. |
src/Aspire.Hosting.Java/JavaDockerfileGenerator.cs |
Removes obsolete suppression pair. |
src/Aspire.Hosting.Go/GoHostingExtensions.cs |
Removes obsolete suppression. |
src/Aspire.Hosting.Blazor/BlazorGatewayExtensions.cs |
Removes obsolete suppression. |
playground/withdockerfile/WithDockerfile.AppHost/AppHost.cs |
Removes obsolete playground suppression. |
.agents/skills/hosting-integration-authoring/resources/api-naming-and-shape.md |
Documents stable Dockerfile APIs. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟢 Approval recommended
The changes consistently graduate the API family while preserving signatures, behavior, exports, and generated code.
0 open findings
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Remove ASPIREDOCKERFILEBUILDER001 attributes and obsolete suppressions without changing API shape or behavior. Update authoring guidance and generated TypeScript experimental documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
c73f83d to
59b5ed4
Compare
This comment has been minimized.
This comment has been minimized.
Preserve the C# examples while overriding shared ATS remarks for Dockerfile builder and base-image exports. Regenerate the TypeScript documentation snapshot without changing generated code. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Tests selector50 / 98 PR test projects · 4 PR jobs, from 49 changed files. Selected PR test projects (50 / 98)
Selected PR jobs (4)
How these were chosen — grouped by what changed
🔧 show 27
🔧 🔧 🔧 🔧 🔧 🧪 🧪 📦 affected project 📄 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
James Newton-King (JamesNK)
left a comment
There was a problem hiding this comment.
Reviewed the current revision. No net-new high-confidence issues found. The changes are limited to graduating the Dockerfile builder API family, removing corresponding suppressions, and updating generated documentation; executable generated TypeScript code is unchanged. Existing review threads were not duplicated, and all current PR checks pass or are skipped.
Removes ASPIREDOCKERFILEBUILDER001 suppression guidance from app-host/withdockerfile.mdx, integrations/compute/docker.mdx, integrations/frameworks/javascript.mdx, and deployment/docker-compose.mdx now that AddDockerfileBuilder/WithDockerfileBuilder are generally available. Updates the diagnostics overview table and diagnostics/aspiredockerfilebuilder001.mdx with a graduation note, and adds a What's new in Aspire 17.0 entry. Documents microsoft/aspire#20823 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Pull request created: #1857
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#1857 targeting Triggered signals: Note This draft PR needs human review before merging. |


Description
Consumers can use the existing Dockerfile builder API family without suppressing
ASPIREDOCKERFILEBUILDER001. This is an attribute-only graduation accepting the existing API shape; no redesign or behavior change is included.Remove all 34 source markers in
Aspire.Hostingand the two additional markers on JavaScript package-manager Dockerfile stage callbacks. Remove 44 obsolete disable/restore pragmas across production, tests, and the Dockerfile playground, together with now-unused imports. No diagnostic-specific build suppressions were found.Preserve every signature/default, public class extensibility, mutable
DockerfileStage.Statements, callback ordering/composition, cancellation, Dockerfile output/encoding/newlines, base-image/container-file behavior, and run/publish semantics. ATS exports and wrappers are unchanged. Update authoring guidance and the TypeScript codegen snapshot to remove experimental documentation for the graduated family; the snapshot's generated code is unchanged. Other experimental diagnostics and generated*/api/*.csbaselines are untouched.This branch starts independently from
main. No new dependencies.User-facing usage
Existing C# usage now works without an experimental diagnostic suppression:
Validation
Executed on macOS arm64. All test commands exclude quarantined and outerloop tests. Initial validation commands below compile the changes; post-rebase tests use
--no-buildonly after a successful full managed build. Commands below were run withMSBUILDTERMINALLOGGER=false../restore.shdotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-namespace 'Aspire.Hosting.Tests.ApplicationModel.Docker' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-method '*.DockerfileResource_*' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.JavaScript.Tests/Aspire.Hosting.JavaScript.Tests.csproj --no-launch-profile -- --filter-method '*Dockerfile*' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.Python.Tests/Aspire.Hosting.Python.Tests.csproj --no-launch-profile -- --filter-method '*Dockerfile*' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.Go.Tests/Aspire.Hosting.Go.Tests.csproj --no-launch-profile -- --filter-method '*Dockerfile*' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.Java.Tests/Aspire.Hosting.Java.Tests.csproj --no-launch-profile -- --filter-method '*Dockerfile*' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.Rust.Tests/Aspire.Hosting.Rust.Tests.csproj --no-launch-profile -- --filter-method '*Dockerfile*' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests.csproj --no-launch-profile -- --filter-class '*.AtsTypeScriptCodeGeneratorTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.CodeGeneration.Go.Tests/Aspire.Hosting.CodeGeneration.Go.Tests.csproj --no-launch-profile -- --filter-class '*.AtsGoCodeGeneratorTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.CodeGeneration.Python.Tests/Aspire.Hosting.CodeGeneration.Python.Tests.csproj --no-launch-profile -- --filter-class '*.AtsPythonCodeGeneratorTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.CodeGeneration.Rust.Tests/Aspire.Hosting.CodeGeneration.Rust.Tests.csproj --no-launch-profile -- --filter-class '*.AtsRustCodeGeneratorTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.CodeGeneration.Java.Tests/Aspire.Hosting.CodeGeneration.Java.Tests.csproj --no-launch-profile -- --filter-method '*.TwoPassScanning_GeneratesWithEnvironmentOnTestRedisBuilder' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet build playground/withdockerfile/WithDockerfile.AppHost/WithDockerfile.AppHost.csproj --no-restoredotnet build tests/Aspire.Hosting.Blazor.Tests/Aspire.Hosting.Blazor.Tests.csproj --no-restore -v:qdotnet build tests/Aspire.Hosting.Go.Tests/Aspire.Hosting.Go.Tests.csproj --no-restore -v:qdotnet build tests/Aspire.Hosting.Java.Tests/Aspire.Hosting.Java.Tests.csproj --no-restore -v:qdotnet build tests/Aspire.Hosting.Rust.Tests/Aspire.Hosting.Rust.Tests.csproj --no-restore -v:qdotnet build tests/Aspire.Hosting.MongoDB.Tests/Aspire.Hosting.MongoDB.Tests.csproj --no-restore -v:qdotnet build tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj --no-restore -v:qgit diff --checkgit grep -n ASPIREDOCKERFILEBUILDER001 -- ':!**/api/*.cs'Additional scope checks confirmed exactly 36 source attributes and 44 pragmas removed, all other nonblank C# code lines unchanged apart from unused imports, and no generated API baseline edits.
Validation after rebasing onto main
Rebased onto
mainata0353f1506ccbc689d1000ce2eb6ba5a0abc196aas the single graduation commit59b5ed4756fe3c261ba0ce50600d2a4c24b252a3. The worktree remains clean and no unrelated build fixes were added../build.sh --rebuildeng/OuterPreBuild.projhas noRebuildtarget; native steps also require full Xcode rather than the active CommandLineTools directory. Switched to artifact cleanup plus normal build without changing repository infrastructure../build.sh --clean./restore.shDEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer ./build.sh --build./build.sh --build /p:SkipNativeBuild=truedotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-build --no-launch-profile -- --filter-namespace 'Aspire.Hosting.Tests.ApplicationModel.Docker' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'dotnet test --project tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests.csproj --no-build --no-launch-profile -- --filter-namespace 'Aspire.Hosting.CodeGeneration.TypeScript.Tests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'git diff --check origin/mainEnvironment limitations:
dotnet test --project tests/Aspire.Hosting.CodeGeneration.Java.Tests/Aspire.Hosting.CodeGeneration.Java.Tests.csproj --no-launch-profile -- --filter-class '*.AtsJavaCodeGeneratorTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'/usr/bin/javacreports "Unable to locate a Java Runtime." The focused Java SDK snapshot subsequently passed.dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class '*.ResourceContainerImageBuilderTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'file-appcontainer-image build. Real container-image execution is unvalidated; the focused run/publish/default-image tests above passed.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?