Repository navigation
#570 Update NuGet packages; fix the worker's content-staging retention job - #575
Merged
Merged
Conversation
Bumps every package to its latest release that adds no cost, and fixes what the majors broke: - Refit 16 builds requests at compile time. IZendeskApi.GetTicketsForView takes a Dictionary query it cannot flatten (RF006), so Infrastructure now references Refit.Reflection; without it resolving the Zendesk client threw at startup and the rules-engine worker crash-looped. - GovUk.Frontend.AspNetCore 5 copies the GOV.UK Frontend build into wwwroot on every build (it no longer serves it from the assembly) - those paths are gitignored - and <govuk-date-input> now throws without an error-message prefix, so the three window-admin dates carry [DateInput(ErrorMessagePrefix)] with the wording they rendered before. - SixLabors.ImageSharp stays on 3.1.12 in the E2E project: 4.x fails the build without a paid Six Labors licence key. Directory.Packages.props only reaches the projects under src/, so its test package entries were never used and had drifted from the versions the test projects pin. Those, plus the NUnit, Hosting, Options.ConfigurationExtensions and Cryptography.Pkcs entries nothing references, are removed (17 in all). The Playwright pin check, the CI browser-cache key and the docs read the E2E .csproj instead, and the E2E image moves to v1.63.0-noble to match the bindings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… job needs ContentStagingSessionRetentionJob (#354) resolves IContentStagingSessionStore from a fresh scope each tick. The worker opts out of AddPersistenceDependencies and registers its persistence services by hand, and this one was never added, so every hourly tick since 1 September has logged "No service for type ... IContentStagingSessionStore" and purged nothing. Abandoned previews - each a whole parsed CMS bundle - were only removed when someone started another import. The worker's registrations move out of the top-level Program into WorkerServiceExtensions.AddWorkerServices, unchanged apart from the missing store, so a test can build the container the worker actually runs with. WorkerMaintenanceJobsTests runs every Maintenance job's tick through it against Postgres, and fails for any new job that is not wired into it. It failed with the production error before the registration was added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paulc1983
approved these changes
Oct 9, 2026
11 tasks done
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.
Closes #570.
Every NuGet package is on its latest release that adds no cost. Every production project now reports no known vulnerabilities (
dotnet list package --vulnerable --include-transitive). One Moderate advisory remains, in a test-only package; see Known limit.What changed
Package updates. The upgrades were made in Visual Studio. Three of them needed code changes:
Refit.ReflectionIZendeskApi.GetTicketsForViewtakes aDictionaryquery that can't be flattened at compile time (warning RF006). Without the reflection builder, resolving the Zendesk client throwsNotSupportedException. The worker crash-looped and 11 unit tests failed. RF006 is still reported as a warning; it's now only a notice.[DateInput(ErrorMessagePrefix = …)]on the three window-admin dates: exercise start and end, and next opportunity<govuk-date-input>now throws without a prefix, so those pages returned an error page. The prefixes keep the wording users saw before ("Next opportunity must be a real date")..gitignoreentries for the GOV.UK Frontend fileswwwrooton every build. They come from the package, so they aren't committed. The app's own images inwwwroot/assets/imagesstay tracked.v1.63.0-nobleDirectory.Packages.propscleanup. The file only applies to the projects undersrc/. The test projects set their own versions in their.csprojfiles, so the test-package entries in props did nothing and had drifted, for example Playwright 1.62 vs 1.63. I removed 17 entries that nothing insrc/references:Microsoft.Extensions.Hosting,Options.ConfigurationExtensionsandCryptography.PkcsThe file is now sorted, with a comment saying it doesn't reach
tests/. The Playwright pin check (scripts/check-playwright-pin.sh), the CI browser-cache key anddocs/E2E-Playwright.mdwere all reading the dead entry; they now read the E2E.csproj.Worker bug fix (pre-existing, found during the upgrade).
ContentStagingSessionRetentionJob, added in #354, looks upIContentStagingSessionStorefrom a new scope on each hourly run. The worker deliberately skipsAddPersistenceDependenciesand registers its persistence services by hand, and this store was never added. So since 1 September every run has thrown, logged "Content staging session retention tick failed", and deleted nothing. Abandoned import previews, each holding a whole parsed CMS bundle, were only removed when someone started another import. Host startup didn't catch it, because the job only looks the store up when it runs, and its unit tests pass the store in directly.Program.csintoWorkerServiceExtensions.AddWorkerServices, plus the one missing line.RulesEngineWorkerProgramTestschecks the text of the worker's startup code. It now reads both files.Known limit
SixLabors.ImageSharpstays on 3.1.12 in the E2E project. GHSA-gwg2-r3hj-4w44 (Moderate) is only fixed in 4.1.2. ImageSharp 4 fails the build without a Six Labors licence key, which #570 rules out as added cost. The exposure is small:Dependabot PR #572 proposes the same 4.1.2 bump and will fail for the same reason. It should be closed, or ImageSharp added to Dependabot's ignore list, unless DfE takes a licence.
Verification
All run locally on this branch, with the containers rebuilt from it:
make test-e2e)web:/healthcheckreturns 200./govuk-frontend.min.css,.min.js, the fonts,favicon.icoandmanifest.jsonall return 200 from the published image.rules_engine: stays up. Its first maintenance run logs 0 exceptions; before the fix it logged the retention failure.scripts/check-playwright-pin.shpasses (NuGet 1.63.0 == image v1.63.0).Tests added
IntegrationTests/Worker/WorkerMaintenanceJobsTestsbuilds the worker's real service registrations (AddWorkerServices) against the Testcontainers Postgres:Both failed with the production error ("No service for type
IContentStagingSessionStore") before the store was registered.