Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] azd doesn't support args with Aspire on project.v0 resource #3678

Closed
1 task done
eerhardt opened this issue Apr 9, 2024 · 0 comments · Fixed by #3720
Closed
1 task done

[Issue] azd doesn't support args with Aspire on project.v0 resource #3678

eerhardt opened this issue Apr 9, 2024 · 0 comments · Fixed by #3720
Assignees
Milestone

Comments

@eerhardt
Copy link
Member

eerhardt commented Apr 9, 2024

Output from azd version
Run azd version and copy and paste the output here:

❯ azd version
azd version 1.8.0-daily.3678431 (commit 8246323c2472148288be4b3cbc3c424bd046b985)
WARNING: your version of azd is out of date, you have 1.8.0-daily.3678431 and the latest version is 1.8.0

To update to the latest version, run:
powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' | Invoke-Expression"

If the install script was run with custom parameters, ensure that the same parameters are used for the upgrade. For advanced install instructions, see: https://aka.ms/azd/upgrade/windows

Describe the bug
When specifying args on a project's manifest, the args aren't getting applied to the ACA container app. For example:

    "apiservice": {
      "type": "project.v0",
      "path": "../Qdrant.ApiService/Qdrant.ApiService.csproj",
      "args": [
        "one",
        "two",
        "three",
        "ten"
      ],

To Reproduce
Use an Aspire manifest that has args specified for a project. azd init and azd up.

In the .NET project, log the args to the console:

var builder = WebApplication.CreateBuilder(args);

Console.WriteLine("args: " + JsonSerializer.Serialize(args));

Expected behavior
When the app starts in ACA, it should log args: ["one","two","three","ten"]

Actual behavior

Connecting...
2024-04-09T23:22:11.97591  Connecting to the container 'apiservice'...
2024-04-09T23:22:12.00086  Successfully Connected to container: 'apiservice' [Revision: 'apiservice--kwg1sa9-98cd7dbbc-4f9cn', Replica: 'apiservice--kwg1sa9']
2024-04-09T23:20:00.451322786Z args: []
2024-04-09T23:20:00.747323640Z info: Microsoft.Hosting.Lifetime[14]
2024-04-09T23:20:00.747342245Z       Now listening on: http://[::]:8080
2024-04-09T23:20:00.749448225Z info: Microsoft.Hosting.Lifetime[0]
2024-04-09T23:20:00.749457513Z       Application started. Press Ctrl+C to shut down.
2024-04-09T23:20:00.750279001Z info: Microsoft.Hosting.Lifetime[0]
2024-04-09T23:20:00.750287367Z       Hosting environment: Production
2024-04-09T23:20:00.750290993Z info: Microsoft.Hosting.Lifetime[0]
2024-04-09T23:20:00.750295231Z       Content root path: /app

Environment
Information on your environment:
* Language name and version: .NET 8
* IDE and version : Visual Studio 17.11 Preview 1

Additional context
Add any other context about the problem here.

cc @vhvb1989 @ellismg

@rajeshkamal5050 rajeshkamal5050 added this to the April 2024 milestone Apr 11, 2024
@ellismg ellismg assigned ellismg and unassigned vhvb1989 Apr 16, 2024
davidfowl referenced this issue in prom3theu5/aspirational-manifests Apr 20, 2024
* Remove placeholder substitution strategies, add JSON expression processing

This commit removes all the placeholder substitution strategies and their associated code. Instead, JSON expression processing has been introduced to handle binding replacements and resource connections. Moreover, extensions methods have been added to handle conversion between JSON document and JSON node. Additionally, two new classes namely, ResourceExpressionProcessor and JsonExpressionProcessor have been added to handle evaluations and to resolve JSON expressions respectively. This new approach provides a more flexible and streamlined way to handle resource substitutions and binding.

* Update package versions in Directory.Packages.props

Several packages have had their versions updated. This includes HandleBars.Net, JsonPath.Net, YamlDotNet, and a few testing-related packages such as TestableIO.System.IO.Abstractions and xunit.runner.visualstudio. These updates should bring improvements and fixes from respective packages.
ellismg added a commit that referenced this issue Apr 22, 2024
We allow binding expressions to refer to properties of other
resources, but we fail if any of these values are secrets (since ACA
has no way to treat these as ACA or KeyVault secrets and reference
them). If we detect this case, we fail and encourage the user to pass
these values via environment variaibles.

Fixes #3678
ellismg added a commit that referenced this issue Apr 22, 2024
We allow binding expressions to refer to properties of other
resources, but we fail if any of these values are secrets (since ACA
has no way to treat these as ACA or KeyVault secrets and reference
them). If we detect this case, we fail and encourage the user to pass
these values via environment variaibles.

Fixes #3678
ellismg added a commit that referenced this issue Apr 23, 2024
We allow binding expressions to refer to properties of other
resources, but we fail if any of these values are secrets (since ACA
has no way to treat these as ACA or KeyVault secrets and reference
them). If we detect this case, we fail and encourage the user to pass
these values via environment variaibles.

Fixes #3678
ellismg added a commit that referenced this issue Apr 23, 2024
We allow binding expressions to refer to properties of other
resources, but we fail if any of these values are secrets (since ACA
has no way to treat these as ACA or KeyVault secrets and reference
them). If we detect this case, we fail and encourage the user to pass
these values via environment variaibles.

Fixes #3678
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants