-
Notifications
You must be signed in to change notification settings - Fork 733
Make URLs available on snapshot of unstarted and waiting resources #9123
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
Conversation
|
Confused by this. Does that mean urls will be clickable before the resource starts? |
No, because they're inactive. And the UI only displays active URLs. But traces UI in the dashboard can use them to match requests to a resource. For example, if the |
|
This is basically an improvement to #7906. It now works for resources that have never been started, e.g. resource has explicit start annotation, or is in a waiting state. |
|
|
||
| try | ||
| { | ||
| await ProcessUrls(resource, cancellationToken).ConfigureAwait(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does moving this to DcpExecutor impact adding URLs to custom resources? Or is the name just misleading 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved ProcessUrls out of the OnResourceStarting method. That method is only called by the DCP. I believe this only would have been called for DCP resources.
Do you intend to ProcessUrls to be called for non-DCP resources? I assume non-DCP resources should have ResourceUrlAnnotation added to them directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this might actually be an oversight in the original implementation. We had intended for URLs to be supported on any resource type, not just resources with endpoints (which is why the WithUrls extension method is only constrained to IResource) but the code in ApplicationOrchestrator is only calling callbacks for IResourceWithEndpoints resources. I'll log an issue to track this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
URLs weren't populated for unstarted and waiting resources. This means they weren't properly linked to in traces.
Fix is to make sure
ResourceUrlAnnotationvalues are populated before the snapshot is published.Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate