microsoft / microsoft/aspire

Docker compose published environment values computed incorrectly

Open
#11,622 1 comment 0 reactions 0 assignees View on GitHub
area-deployment silent-failure
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

The compose publisher doesn't properly handle all types of value providers and always uses the default value for an environment variable if one is provided. This causes it to ignore overrides in ContainerImageReference and always provide `:latest` as the image name for compose services, even if a user provided a custom `.WithDeploymentImageTag()` value. It likely impacts other environment variables as well.

### Expected Behavior

Custom values should apply to environment based configuration for compose publish output.

### Steps To Reproduce

Add a Docker Compose publish environment (`.AddDockerComposeEnvironment("docker-compose")`) and configure a Project resource with a custom deployment image tag (`.WithDeploymentImageTag((_) => "mycustomtag")`). Publish the app host and check to see the image tag used for the resource.

### Exceptions (if any)

_No response_

### .NET Version info

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.