Describe the bug
When publishing a single Python resource to Helm using aspire publish -o publish, container startup args are generated as expected.
If I add an empty PublishAsDockerFile callback, the Dockerfile is still generated correctly, but the args block disappears from publish/templates/app/deployment.yaml.
This looks like a regression/side-effect because only the callback was added and all other deployment content remains effectively unchanged.
Expected Behavior
Adding an empty PublishAsDockerFile callback should not change generated container runtime args in the Helm deployment manifest.
I expect this block to still be present:
args:
- "main:app"
- "--host"
- "0.0.0.0"
- "--port"
- "8000"
Steps To Reproduce
Minimal AppHost:
var builder = Aspire.Hosting.DistributedApplication.CreateBuilder(args);
builder.AddUvicornApp("app", "./app", "main:app")
.WithUv()
.PublishAsDockerFile(configure =>
{
});
builder.AddKubernetesEnvironment("k8s");
builder.Build().Run();
- Run
aspire publish -o publish-with-callback with the AppHost above.
- Inspect
publish-with-callback/templates/app/deployment.yaml.
- Observe there is no
args section under the app container.
- Remove only
.PublishAsDockerFile(configure => { }) from the chain.
- Run
aspire publish -o publish-no-callback.
- Inspect
publish-no-callback/templates/app/deployment.yaml.
- Observe
args is present:
main:app
--host
0.0.0.0
--port
8000
Observed in controlled local repro:
WITH_CALLBACK_ARGS=False
WITHOUT_CALLBACK_ARGS=True
Exceptions (if any)
No exception is thrown.
Aspire doctor output
Aspire Environment Check
========================
.NET SDK
✅ .NET 11.0.100-preview.3.26207.106 installed (x64)
Container Runtime
⚠️ Podman: installed but not running ← active
Start Podman service: sudo systemctl start podman
Environment
✅ HTTPS development certificate is trusted
Summary: 2 passed, 1 warnings, 0 failed
For detailed prerequisites: https://aka.ms/aspire-prerequisites
Anything else?
- .NET SDK:
11.0.100-preview.3.26207.106
- Aspire CLI:
13.3.0+4517e4a1ffb7f00a4c0e66882c2db952d637c0cc
- AppHost SDK:
Aspire.AppHost.Sdk/13.3.0
- Package refs:
Aspire.Hosting.Kubernetes 13.3.0-preview.1.26256.5
Aspire.Hosting.Python 13.3.0
- OS: Windows
- Tooling: VS Code + CLI
AI disclosure: this issue report was prepared with assistance from GitHub Copilot (GPT-5.3-Codex), and all technical observations were verified locally.
Describe the bug
When publishing a single Python resource to Helm using
aspire publish -o publish, container startup args are generated as expected.If I add an empty
PublishAsDockerFilecallback, the Dockerfile is still generated correctly, but theargsblock disappears frompublish/templates/app/deployment.yaml.This looks like a regression/side-effect because only the callback was added and all other deployment content remains effectively unchanged.
Expected Behavior
Adding an empty
PublishAsDockerFilecallback should not change generated container runtime args in the Helm deployment manifest.I expect this block to still be present:
Steps To Reproduce
Minimal AppHost:
aspire publish -o publish-with-callbackwith the AppHost above.publish-with-callback/templates/app/deployment.yaml.argssection under theappcontainer..PublishAsDockerFile(configure => { })from the chain.aspire publish -o publish-no-callback.publish-no-callback/templates/app/deployment.yaml.argsis present:main:app--host0.0.0.0--port8000Observed in controlled local repro:
WITH_CALLBACK_ARGS=FalseWITHOUT_CALLBACK_ARGS=TrueExceptions (if any)
No exception is thrown.
Aspire doctor output
Anything else?
11.0.100-preview.3.26207.10613.3.0+4517e4a1ffb7f00a4c0e66882c2db952d637c0ccAspire.AppHost.Sdk/13.3.0Aspire.Hosting.Kubernetes13.3.0-preview.1.26256.5Aspire.Hosting.Python13.3.0AI disclosure: this issue report was prepared with assistance from GitHub Copilot (GPT-5.3-Codex), and all technical observations were verified locally.