-
Notifications
You must be signed in to change notification settings - Fork 574
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
IDE execution protocol: need a way to specify browser launch URL for projects #7197
Comments
@DamianEdwards @tmat @danegsta @davidfowl FYI Personally I like option 2 the best but can be convinced to go with any of them. Open to other suggestions. |
Also @rafaelldi please share your thoughts! |
Hello! Thanks for the mention! Now in our plugin we generate an environment variable In my opinion, options 1 and 3 can be confusing because the proposed
To be honest, I still don't use a certificate when connecting DCP in the plugin. Mainly because for some users (e.g. with different linux distributions), it can be challenging to configure everything. And we only support a local scenario, and if your local machine is compromised, the certificate probably won't help. So I would ask to add a token to the response even in an unsecured session. For example, if the author of the IDE toolkit fully understands the risks and thinks it's ok to use an insecure connection in their case. |
Background and Motivation
The complete launch URL for Aspire dashboard requires an authentication token, which is not stored (for obvious reasons) in the launch profile. In the current implmentation both Visual Studio and Visual Studio Code special-case the Aspire project, combining the dashboard token generation and launch profile settings with the token to construct the final URL.
This is problematic for other tools that want to support the IDE execution protocol for Aspire, because they have to duplicate the same logic, or rely on error-prone app host log scanning. Instead, we should change the implementation so that the application host generates the token as part of the dashboard setup, and the final browse URL (if any) is passed from the app host, via DCP, to the IDE execution endpoint.
Proposed API
The IDE execution protocol https://github.com/dotnet/aspire/blob/main/docs/specs/IDE-execution.md should gain means to specify the browse URL for a debug session creation request. There are at least 3 ways we can go about it.
Option 1: add
launch_url
(optional) property to the existingproject
-type launch configuration:Pros: very simple addition to the protocol
Cons: it is a new property for existing launch configuration type (
project
), and even if it is specified as optional, some tools may report an error encountering a previously unknown property.Option 2: add a new launch configuration type for data related to browser launch:
Pros:
launch_configurations
was designed from v1 as a collection specifically to separate different concerns associated with launching a program. This option provides clean separation between data associated with launching the dashboard, and the data associated with launching the dashboard client. No change to existingproject
-type launch configuration.Cons: some pragmatists may say why employ another object if a single property suffices? But then again, maybe in future we might want more properties related to browser launch.
Option 3: add the browse URL information as a well-knwon "annotation" (requires adding the notion of "annotations" to
project
launch configuration):Pros: provides more separation between core project launch data and data related to browser launch than option 1 does. Annotations provide loose coupling between Aspire application host and IDE(s) and can be used for other scenarios beyond browser launch.
Cons: similartly to option 1, this introduces new property for existing launch configuration type. Option 2 seems to provide better concern separation AND allow for easier/more thorough request data verification.
Additional notes
The text was updated successfully, but these errors were encountered: