microsoft / microsoft/aspire

`publishValueAsDefault` overload of `AddParameter` does not seem to affect publish/deploy

Open
#16,479 1 comment 1 reaction 0 assignees View on GitHub
area-deployment
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

```csharp
public static IResourceBuilder AddParameter(this IDistributedApplicationBuilder builder, [ResourceName] string name, string value, bool publishValueAsDefault = false, bool secret = false)
```

The overload with `publishValueAsDefault` does not seem to affect any deployment-related behavior. It does not ask me for a parameter value when publishing.

Had a brief look at the source, may be wrong, the value getter is always getting the hard coded value.

### Expected Behavior

When setting `bool publishValueAsDefault = false`, it should ask me the value for publish.

### Steps To Reproduce

_No response_

### Exceptions (if any)

_No response_

### Aspire doctor output

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at the AddParameter overload shown in the issue and trace the value getter used during publishing and deployment. Reproduce the case with publishValueAsDefault set to false; done means publishing prompts for the parameter value instead of always using the hard-coded value.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.