Skip to content

Bring environment and arguments to parity#2797

Merged
davidfowl merged 3 commits intomainfrom
davidfowl/commandline-args-object
Mar 12, 2024
Merged

Bring environment and arguments to parity#2797
davidfowl merged 3 commits intomainfrom
davidfowl/commandline-args-object

Conversation

@davidfowl
Copy link
Copy Markdown
Contributor

@davidfowl davidfowl commented Mar 12, 2024

  • Added IResourceWithArgs, and moved all of the WithArgs extension methods to it.
  • Allow objects in command line arguments.
  • Removed args array from ExecutableResource and use WithArgs
  • Added tests
Microsoft Reviewers: Open in CodeFlow

- Added IResourceWithArgs, and moved all of the WithArgs extension methods to it.
- Allow objects in command line arguments.
- Added tests
@ghost ghost added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 12, 2024
@davidfowl davidfowl requested a review from mitchdenny March 12, 2024 01:30

var manifest = await ManifestUtils.GetManifest(c2.Resource);

var expectedManifest =
Copy link
Copy Markdown
Contributor Author

@davidfowl davidfowl Mar 12, 2024

Choose a reason for hiding this comment

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

@vhvb1989 in case azd doesn't support expressions in the argument list

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will take a look.
Thanks for the heads up.

- Removed args array from ExecutableResource and use WithArgs
@davidfowl davidfowl added the breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. label Mar 12, 2024
var value = arg switch
{
string s => s,
IValueProvider valueProvider => await GetValue(key: null, valueProvider, resourceLogger, isContainer: false, cancellationToken).ConfigureAwait(false),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: GetValueAsync?

@davidfowl davidfowl merged commit fae6d22 into main Mar 12, 2024
@davidfowl davidfowl deleted the davidfowl/commandline-args-object branch March 12, 2024 03:22
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication breaking-change Issue or PR that represents a breaking API or functional change over a prerelease.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants