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

Hide default parameters in project resources #7333

Closed

Conversation

adamint
Copy link
Member

@adamint adamint commented Jan 30, 2025

Description

Hides default parameters added by DCP for project resources. Works in both IDE and CLI, with/without dotnet watch enabled.

image
image
image

Fixes #6835

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@adamint adamint requested review from JamesNK and drewnoakes January 30, 2025 21:02
@davidfowl
Copy link
Member

I didnt think we wanted to hide all arguments by default, just the dotnet command line ones right?

@adamint
Copy link
Member Author

adamint commented Jan 31, 2025

It's not hiding all arguments! Just hiding the dotnet arguments DCP adds

@davidfowl
Copy link
Member

Oh I see the code now to attempt to remove the args. This looks less than ideal. I wonder if there's a cleaner way we can accomplish this.

@adamint
Copy link
Member Author

adamint commented Jan 31, 2025

How would you suggest doing that? AppHost could send a list of the default args added to a resource

@davidfowl
Copy link
Member

davidfowl commented Feb 1, 2025

Discussed offline, we will store the args specified from the app host instead of the resolved args from dcp. This will be another property. It matches what we do with environment variables (isFromSpec).

We should do this for containers, and projects.

@danmoseley danmoseley added area-dashboard needs-author-action An issue or pull request that requires more info or actions from the author. labels Feb 2, 2025
@adamint adamint closed this Feb 4, 2025
@adamint
Copy link
Member Author

adamint commented Feb 4, 2025

Discussed offline, we will store the args specified from the app host instead of the resolved args from dcp. This will be another property. It matches what we do with environment variables (isFromSpec).

We should do this for containers, and projects.

Containers don't currently have any args added from the app host. All are resolved from CommandLineArgsCallbackAnnotation, and the only place to add that is in WithArgs. So I'll make it for projects only.

@dotnet-policy-service dotnet-policy-service bot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants