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

Resource graph doesn't show linked resources in some cases #8345

Closed
davidfowl opened this issue Mar 27, 2025 · 6 comments · Fixed by #8425
Closed

Resource graph doesn't show linked resources in some cases #8345

davidfowl opened this issue Mar 27, 2025 · 6 comments · Fixed by #8425
Assignees
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Milestone

Comments

@davidfowl
Copy link
Member

I just updated my app to 9.2 and it looks like the front end doesn't talk to the backend (even though it does).

Image

It's because only explicit calls to WithReference add the correct relationship. In theory we should also do this via environment variable and argument resolution. As a stop gap for 9.2, we can add it to this overload

@davidfowl davidfowl added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 27, 2025
@davidfowl davidfowl added this to the 9.2 milestone Mar 27, 2025
@davidfowl
Copy link
Member Author

cc @JamesNK

@JamesNK
Copy link
Member

JamesNK commented Mar 27, 2025

It's because only explicit calls to WithReference add the correct relationship.

There are other methods that add a relationship, e.g. https://github.com/search?q=repo%3Adotnet%2Faspire%20WithRelationship&type=code and https://github.com/search?q=repo%3Adotnet%2Faspire+WithParentRelationship&type=code

It's a known issue that all the ways of resources interacting with each other don't have relationships. It's a matter of adding WithRelationship to the various methods. In this case it's adding a call to WithRelationship inside WithEnvironment.

@mitchdenny
Copy link
Member

@davidfowl so funny that this came up today. I think we should definately fix this for 9.2 :)

@davidfowl
Copy link
Member Author

I'm also not sure why resources don't have endpoints... That looks like a bug.

@davidfowl davidfowl self-assigned this Mar 30, 2025
@davidfowl
Copy link
Member Author

I'll take it

@davidfowl
Copy link
Member Author

Follow up issue #8426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants