feat: bump Geo/Invision/Servers clients and enable L1 read-only caching - #55
Merged
Merged
Conversation
Bump three client packages to their latest crash-safe releases and turn on the library-default in-memory read-only caching now that MX.Api.Client 2.3.77 scopes each captured policy via SharedCacheConfiguration: - MX.GeoLocation.Api.Client.V1 1.2.96 -> 1.2.98 (caching on) - MX.InvisionCommunity.Api.Client 1.0.61 -> 1.0.63 (caching on) - XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1 4.1.9 -> 4.1.14 (currency + crash-safety; no defaults to enable) - XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1 4.1.9 -> 4.1.14 (transitive dependency lockstep) Registration is extracted into GeoLocationApiClientRegistration, InvisionApiClientRegistration, and ServersApiClientRegistration helpers so Program.cs and the boot-composition tests share a single source of truth for each client's option chain — matching the RepositoryApiClient pattern re-enabled in #54. Add xUnit startup-composition tests that build the real ServiceProvider with caching enabled and resolve every typed sub-API the Processor App touches at runtime (Geo v1 + v1.1 GeoLookup, Invision Core/Downloads/ Forums, Servers Cod2/Cod4/Cod5/CoD4x Rcon + Maps). A dedicated Geo test also resolves IMxCache to guard the L1 auto-wiring. Any future regression of the 2.3.76-era 'The expression must invoke a method declared by ...' ArgumentException now fails these tests instead of the Functions host. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dependency ReviewThe following issues were found:
License Issuessrc/XtremeIdiots.Portal.Server.Events.Processor.App/XtremeIdiots.Portal.Server.Events.Processor.App.csproj
OpenSSF Scorecard
Scanned Files
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Processor Function App to newer GeoLocation / Invision Community / Servers client package versions and centralizes their DI registration into single-purpose helpers, enabling the new safe, read-only L1 in-memory caching where supported and adding startup-composition tests to guard against regressions like the historical boot crash.
Changes:
- Bump GeoLocation, Invision Community, and Servers integration client package versions in the Processor App.
- Introduce DI registration helpers for GeoLocation, Invision, and Servers clients (mirroring the existing Repository registration helper) and enable library-default L1 caching for GeoLocation + Invision with a shared cache partition.
- Add startup-composition tests that build a validating
ServiceProviderand resolve key typed sub-APIs (andIMxCachefor GeoLocation) to catch DI/caching composition regressions at test time.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/XtremeIdiots.Portal.Server.Events.Processor.App/XtremeIdiots.Portal.Server.Events.Processor.App.csproj | Bumps GeoLocation/Invision/Servers client package versions. |
| src/XtremeIdiots.Portal.Server.Events.Processor.App/Program.cs | Switches to the new registration helpers; enables conditional GeoLocation registration without breaking boot when unconfigured. |
| src/XtremeIdiots.Portal.Server.Events.Processor.App/GeoLocationApiClientRegistration.cs | Adds centralized GeoLocation client registration with cache partition + library-default L1 caching and a “try-add if configured” overload. |
| src/XtremeIdiots.Portal.Server.Events.Processor.App/InvisionApiClientRegistration.cs | Adds centralized Invision client registration with cache partition + library-default L1 caching. |
| src/XtremeIdiots.Portal.Server.Events.Processor.App/ServersApiClientRegistration.cs | Adds centralized Servers client registration (no caching enabled, per package behavior). |
| src/XtremeIdiots.Portal.Server.Events.Processor.App.Tests/Startup/GeoLocationApiClientRegistrationTests.cs | Adds DI composition tests that resolve GeoLocation APIs and IMxCache with caching enabled. |
| src/XtremeIdiots.Portal.Server.Events.Processor.App.Tests/Startup/InvisionApiClientRegistrationTests.cs | Adds DI composition tests that resolve Invision client and typed sub-APIs with caching enabled. |
| src/XtremeIdiots.Portal.Server.Events.Processor.App.Tests/Startup/ServersApiClientRegistrationTests.cs | Adds DI composition tests that resolve Servers client and representative typed sub-APIs after the bump. |
frasermolyneux
temporarily deployed
to
Development
August 3, 2026 19:35 — with
GitHub Actions
Inactive
|
🏗️ Terraform Plan
✅ Validate — Passed ✅ Plan
|
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
Bump the three MX / XtremeIdiots client packages to the versions we just released and turn on the safe, read-only L1 in-memory caching those packages now ship, with startup-composition tests that guard against a repeat of the 4.2.21-era boot crash. Requested via the coding-agent task "Update portal-server-events to the latest XtremeIdiots/MX client packages…".
Closes #
Type of change
Required reading consulted
AGENTS.md(repo brief).github/copilot-instructions.md(repo orientation).github-copilot/.github/instructions/personal.working-preferences.instructions.md(always-on rules)AGENTS.md(standards.*,patterns.*,platform.*,shared.*)Validation evidence
Build
Tests
Ten of those 387 are the new / expanded startup-composition tests under
Tests/Startup/:RepositoryApiClientRegistrationTests(3, unchanged)GeoLocationApiClientRegistrationTests(3 — builds real provider with caching enabled; resolvesIGeoLocationApiClient, v1 and v1.1IGeoLookupApi, andIMxCache)InvisionApiClientRegistrationTests(2 — resolvesIInvisionApiClientand eachCore/Downloads/Forumstyped sub-API with caching enabled)ServersApiClientRegistrationTests(2 — resolvesIServersApiClient+Cod2Rcon.V1/Cod4Rcon.V1/Cod5Rcon.V1/CoD4xRcon.V1/Maps.V1)Format check
Other
code-reviewsub-agent:No significant issues found in the reviewed changes.See "Reviewer focus areas" for the summary of what was verified.Risk and rollout
mainviadeploy-dev.yml; prd promotes viadeploy-prd.yml.Confidence rationale (mirrors the
code-reviewfindings):ArgumentException: The expression must invoke a method declared by ...IAdminActionsApi ...root cause is fixed upstream in MX.Api.Client 2.3.77 (already at head), which uses the reflection-freeSharedCacheConfigurationto scope each captured cache policy to its matching typed sub-API instead of walking one expression across siblings. All three registration helpers now use.WithCachePartition(CachePartition).WithCaching(c => c.UseLibraryDefaults())— the exact chain re-enabled for Repository in feat: roll Repository client to 4.2.22 and re-enable consumer L1 caching #54.GeoLocationApiClientRegistrationTests/InvisionApiClientRegistrationTests/ServersApiClientRegistrationTestsbuild the realServiceProvider(withvalidateScopes: true) and resolve every typed sub-API the Processor App touches at runtime. A future package bump that regresses the shared-caching composition would fail these tests before it reached the Functions host.Forums.PostTopic(uncached by the library); GeoLocation call sites (PlayerConnectedProcessor,PlayerIpResolvedProcessor,ServerStatusProcessor,VpnProtectionEvaluation,WhoAmICommand) are pureGetIpIntelligencereads. No.NotCached<...>(...)exclusions were required.Consumer impact
No published contracts changed. The Abstractions NuGet package (
XtremeIdiots.Portal.Server.Events.Abstractions.V1) and every queue-name constant it exports are untouched — the diff is entirely inside the Processor App, its csproj, and its test project.portal-server-agentis not affected.Reviewer focus areas
GeoLocationApiClientRegistration,InvisionApiClientRegistration,ServersApiClientRegistration) intentionally mirrorRepositoryApiClientRegistration.CachePartitionis a single constant reused viaconst string = RepositoryApiClientRegistration.CachePartitionso all four helpers share one partition namespace — verified safe because eachAddTypedApiClientcall scopes cache keys per client type.MX.GeoLocation.Api.Client.Testingpackage'sFakeVersionedGeoLookupApireplaces the typed sub-API in the container, which bypasses the DI cache decorator, so it cannot demonstrate a real cache hit. The DI composition test (which additionally resolvesIMxCache) covers the primary production-startup risk the task called out. Behavioural correctness of the cache is guaranteed by MX.Api.Client / MX.GeoLocation.Api.Client's own tests.Agent attestation
code-reviewsub-agent; High/Medium findings resolved or justified above in Reviewer focus areasstandards.oidc-and-secrets.instructions.md)