Repository navigation
Remove duplicate Vimeo DI registration; upgrade NimblePros.Vimeo to 2.3.0 - #1487
Merged
Merged
Conversation
Delete the local RegisterVimeoServicesDependencies (and the unused AuthHeaderHandler); AddVimeoServices in Program.cs already registers everything. Drop the now-unused vimeoToken parameter and the stale commented-out Autofac line. Add unit tests guarding against re-introducing the duplicate registration. Relates to #1486 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Check named HttpClient options via IOptionsMonitor so any configuration style is caught, and drop the client-name assertion that depended on NimblePros.Vimeo internals. Record review outcome in the plan. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge latest main (Aspire AppHost) and resolve the Program.cs conflict, then bump NimblePros.Vimeo to 2.3.0. The duplicate registration removed earlier in this branch would otherwise make 2.3.0 throw at startup. Fixes #1486 Co-Authored-By: Claude Opus 5.5 <[email protected]>
AddServiceDefaults adds the standard resilience handler to every HttpClient. Its 10s attempt / 30s total timeouts override the Vimeo clients' 60-minute timeout and would cut off large chunk uploads. Wrap AddVimeoServices in AddDevBetterVimeoServices, which removes the resilience handlers from VimeoApi, VimeoTusApi and VimeoOEmbed after registration, and add tests against a host built like Program.cs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This removes the duplicate Vimeo DI registration described in #1486.
AddVimeoServices(vimeoSettings.Token)inProgram.csis now the only registration.src/DevBetterWeb.Infrastructure/VimeoServiceCollectionExtensions.cs. That removesRegisterVimeoServicesDependenciesand the unusedAuthHeaderHandler.AddInfrastructureServicesno longer registers Vimeo services, and its unusedvimeoTokenparameter is gone.Program.cs: removed thevimeoTokenlocal, which readVimeo:Token, a key nothing configures. Also removed the commented-outAutofacServiceProviderFactoryline.Behavior notes
Acceptonce, and the Tus client sendsTus-Resumableonce. Before, both were sent twice.ClientApiConfigurationswas already resolved fromAddVimeoServices, which wins as the last registration. The Tus client still sends no bearer token.Acceptheader from devBetter. It only issues PATCHes to the absolute, signed upload link, so this has no functional effect.Package upgrade
main(Aspire AppHost, feat: add .NET Aspire AppHost and ServiceDefaults #1488) and resolved aProgram.csconflict.Vimeo clients exempted from the ServiceDefaults resilience handler
AddServiceDefaults(#1488) addsAddStandardResilienceHandlerto every HttpClient. Its timeouts are 10s per attempt and 30s total. On the Vimeo clients they would override the 60-minute timeout and cut off large chunk uploads.AddDevBetterVimeoServices(src/DevBetterWeb.Web/VimeoServiceCollectionExtensions.cs) callsAddVimeoServices, thenRemoveAllResilienceHandlers()onVimeoApi,VimeoTusApiandVimeoOEmbed. It runs afterAddVimeoServices, as 2.3.0 requires, andProgram.csnow calls it.RemoveAllResilienceHandlersis marked experimental (EXTEXP0001), so that one call has a scoped#pragma. It is the documented way to opt a client out ofConfigureHttpClientDefaults. The other options rely on the internal"{name}-standard"pipeline naming or mean editing the shared ServiceDefaults.Before merging
Tests
New
tests/DevBetterWeb.UnitTests/Infrastructure/InfrastructureServiceCollectionExtensionsTests.cs:AddInfrastructureServicesconfigures none of theVimeoApi,VimeoOEmbedorVimeoTusApiHttpClients. This is checked throughIOptionsMonitor<HttpClientFactoryOptions>.AddInfrastructureServicesregisters no Vimeo services: noClientApiConfigurations, and none of the tus or sleep services.AddInfrastructureServicesfollowed byAddVimeoServicesregisters each of those services exactly once, and the Vimeo services resolve.New
tests/DevBetterWeb.UnitTests/Web/VimeoServiceCollectionExtensionsTests.csbuilds the host withAddServiceDefaults, asProgram.csdoes:ResilienceHandlerin the handler chain of any Vimeo client. These tests fail when the removal is taken out.Verification
dotnet BuildTestFormat.cswas run after the last change:dotnet formatstep still fails, butmainfails it the same way: about 11k repo-wide whitespace, imports and charset issues. Runningdotnet format --verify-no-changeson the solution, limited to the new files, exits 0. The full-solution run reports one extra IMPORTS issue at (1,1) ofVimeoServiceCollectionExtensions.cs, which I couldn't reproduce in isolation; the file's usings are already sorted.The change set was also reviewed by an independent agent. There were no blockers, and its test-quality suggestions were applied. Notes are in
.claude/plans/2026-11-15-issue-1486-vimeo-di-cleanup.md.Fixes #1486 (pending the manual smoke test above).
🤖 Generated with Claude Code