Skip to content

Server-triggered circuit pause section updates#37146

Merged
guardrex merged 6 commits into
mainfrom
guardrex/server-triggered-circuit-pause
May 13, 2026
Merged

Server-triggered circuit pause section updates#37146
guardrex merged 6 commits into
mainfrom
guardrex/server-triggered-circuit-pause

Conversation

@guardrex

@guardrex guardrex commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Fixes #37145

Wade, this comes from Ilona's feedback on #37133. She's OOF at the moment, and we can go ahead with this based on your review. When she sees my remarks below, she can comment on if I broke anything with my updates. If I did break something, I'll issue a patch PR later, probably sometime next week.

Ilona ... Thanks so much for the implementation updates to Javier's original code. I think devs are really going to ❤️ this feature and the implementation example that you provided. You don't need to look at the whole thing, but this one paragraph might need a little more work. I applied some grammar and style manual updates that might have 💥 some of the concepts 🙈😆. That paragraph currently goes like this (Line 229 on the diff) ...

Using the following approach, the fact that the code sends the `RequestCircuitPauseAsync` asynchronously doesn't mean that upon returning the value that the client is already paused. It's only a request to pause the client, which the client can defer. That's why the code includes the <xref:System.Threading.Tasks.TaskCompletionSource> (`_shutdownTcs`), which is set when there aren't any circuits connected (all of them are successfully shut down). In case a client requests a deferral longer than the server allows, longer than `ShutdownTimeout`, the client doesn't persist state and experiences a normal connection loss. Other clients that don't defer the pause request have their connections re-established after the app goes back online with state persisted.


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/state-management/server.md aspnetcore/blazor/state-management/server
aspnetcore/host-and-deploy/health-checks.md aspnetcore/host-and-deploy/health-checks
aspnetcore/release-notes/aspnetcore-11.md aspnetcore/release-notes/aspnetcore-11

@guardrex

Copy link
Copy Markdown
Collaborator Author

@tdykstra @wadepickett ... This popped up here ...

aspnetcore/host-and-deploy/health-checks.md
Line 186: [Warning] Cross reference not found: 'Microsoft.Extensions.DependencyInjection.EntityFrameworkCoreHealthChecksBuilderExtensions.AddDbContextCheck*'.

aspnetcore/host-and-deploy/health-checks/includes/health-checks6-7.md
Line 169: [Warning] Cross reference not found: 'Microsoft.Extensions.DependencyInjection.EntityFrameworkCoreHealthChecksBuilderExtensions.AddDbContextCheck*'.

No worries! I'll fix it on this PR.

@guardrex

guardrex commented May 13, 2026

Copy link
Copy Markdown
Collaborator Author

Ah!!! @tdykstra, @wadepickett ... and looping in @BillWagner (👋 Bill ... hope ur well!!!) .....

There's an API Browser regression. The API for ...

Microsoft.Extensions.DependencyInjection.EntityFrameworkCoreHealthChecksBuilderExtensions.AddDbContextCheck

... shows up ...

image

... but there's no API for it. Clicking the link results in a 404 ...

https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.entityframeworkcorehealthchecksbuilderextensions.adddbcontextcheck#microsoft-extensions-dependencyinjection-entityframeworkcorehealthchecksbuilderextensions-adddbcontextcheck-1

image

I'm going to code-fence the API in these markdown files for now to unblock this PR. I'll open a new issue to put the XREF links back after the API Browser comes back online with the bits.

UPDATE: Done! 👍 I've opened ...

Reactivate XREF cross-links after API Broswer regression is addressed
#37147

... to reactivate the XREF cross-links in the markdown files after the API shows back up.

@guardrex guardrex requested a review from wadepickett May 13, 2026 18:06
Comment thread aspnetcore/blazor/state-management/server.md Outdated

@wadepickett wadepickett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guardrex, approved. Looks great. One crucial item in the code to fix before you merge. I noted it inline.

Co-authored-by: Wade Pickett <wpickett@microsoft.com>
@guardrex

Copy link
Copy Markdown
Collaborator Author

Thanks for spotting that, @wadepickett!

@wadepickett

wadepickett commented May 13, 2026

Copy link
Copy Markdown
Contributor

@guardrex, For Microsoft.Extensions.DependencyInjection.EntityFrameworkCoreHealthChecksBuilderExtensions.AddDbContextCheck:

It does exist in the API Ref:
AddDbContextCheck on Microsoft Learn

Looks like the xref cross-reference sysetem can't resolve the wildcard link?
xref:Microsoft.Extensions.DependencyInjection.EntityFrameworkCoreHealthChecksBuilderExtensions.AddDbContextCheck*

So by regression, you mean the xref cross-ref system used to handle wildcards like this but now they are not resolving, correct? (As opposed to the API Ref regressing and a once documented reference item is now missing)

@guardrex

Copy link
Copy Markdown
Collaborator Author

Not sure. Let me check again on that. Maybe it was a passing problem.

@guardrex

guardrex commented May 13, 2026

Copy link
Copy Markdown
Collaborator Author

Your link and this ...

https://learn.microsoft.com/en-us/dotnet/api/?term=Microsoft.Extensions.DependencyInjection.EntityFrameworkCoreHealthChecksBuilderExtensions.AddDbContextCheck

... results in a 404 for me ...

image

... and the XREF breaks this PR.

I hazard a guess that there's a regression in the API Browser or how the API Browser is being served out here in my local area.

@guardrex

guardrex commented May 13, 2026

Copy link
Copy Markdown
Collaborator Author

a once documented reference item is now missing

I think so. I'm going by the build report and the 404 in the API Browser. The build report threw ...

https://buildapi.docs.microsoft.com/Output/PullRequest/332f35cd-658d-4914-0f85-907e40ee89f0/202605131739242434-37146/BuildReport?accessString=ff106d11859c8f58ec44cf75059ca607f87bfb1d572f3a443b44136b799d13af

I suggest that we code-fence for now to unblock this and go back to the proper XREF links, which is tracked by #37147. If you and Tom want, I'll babysit that issue until this is sorted out.

In passing tho, I still disagree that a build report warning in an unrelated article should block a PR. I think that's a poor process choice.

@wadepickett

Copy link
Copy Markdown
Contributor

"In passing tho, I still disagree that a build report warning in an unrelated article should block a PR. I think that's a poor process choice."

I do not think a build report warning on an unrelated article should ever block a PR. We are on the same page.

@guardrex

Copy link
Copy Markdown
Collaborator Author

I'll go ahead with this so that we have a great example from Ilona on how to implement the new API.

I'll take that issue that I opened and keep an eye on the API Browser. I think Alma Jenks was helping us with these API-related problems. I'll ping him on that issue to ask about it. However, let me know if he's the wrong cat to discuss it with.

@guardrex guardrex merged commit acba8a5 into main May 13, 2026
4 checks passed
@guardrex guardrex deleted the guardrex/server-triggered-circuit-pause branch May 13, 2026 20:35
@wadepickett

wadepickett commented May 13, 2026

Copy link
Copy Markdown
Contributor

Intersting:
Going here in the API browser, the class below shows up in the list, but it is 404 if you click on the class link:
https://learn.microsoft.com/en-us/dotnet/api/?term=entityframeworkcorehealthchecksbuilderextensions

@guardrex

Copy link
Copy Markdown
Collaborator Author

Yes, that's what I'm seeing here.

Let's take this up on the issue that I opened at #37147.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[11.0 P4] Server-triggered pause section updates

2 participants