GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: construct content-backed services at startup by BenjaminMichaelis · Pull Request #1734 · IntelliTect/EssentialCSharp.Web

Conversation

@BenjaminMichaelis

@BenjaminMichaelis BenjaminMichaelis commented Nov 26, 2026

Copy link
Copy Markdown
Member

Why

On dev, a bad sitemap.descriptions.json made every page return 500 while /health stayed green, because ChapterDescriptionService (and IGuidelinesService) are singletons built lazily on the first page request. The failure only appeared after the revision was already serving traffic.

What changed

  • Program.cs resolves ChapterDescriptionService and IGuidelinesService at startup, right after the routes are mapped. An unreadable content file now fails startup, so the new container revision never takes traffic.

Relation to #1561

This is the startup-check part of #1561, rebased onto current main. The rest of #1561 is intentionally not included:

  • The Key/Keys compatibility code is no longer needed (tooling now ships Keys, chore: bump tooling packages to 1.1.1.19573 #1562).
  • The smoke-test script is redundant: main now runs the Playwright Deployed smoke tests (including the reading journey) after the dev deploy, and prod promotion needs them.
  • The NuGet-credential / AccessToNugetFeed=true CI changes carry more risk and should be reviewed on their own.

Test plan

  • EssentialCSharp.Web.Tests: 350 passed
  • Not tested end to end: startup failing on a deliberately bad content file. The first dev deploy after merge will exercise the normal path.
  • Note: the solution build fails locally on EssentialCSharp.Web.AppHost (NETSDK1228, Aspire workload deprecated in this SDK); unrelated to this change. I built and tested the web and test projects directly.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@BenjaminMichaelis
fix: construct content-backed services at startup
1ac14a5
ChapterDescriptionService and IGuidelinesService are singletons built lazily on the
first page request, so an unreadable content file left /health green while pages
returned 500. Resolve them at startup so a bad content package fails the new
revision before it takes traffic.
This was referenced Nov 26, 2026
test: keep placeholder content in the content package's shape #1561
Closed
test: keep placeholder content in the content package's shape #1737
Open

This branch has not been deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@BenjaminMichaelis
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.