Skip to content

Fix TLS redirect doc example to use startup()#3155

Open
ChihweiLHBird wants to merge 1 commit into
mainfrom
zhiwei/tls-doc-example-update
Open

Fix TLS redirect doc example to use startup()#3155
ChihweiLHBird wants to merge 1 commit into
mainfrom
zhiwei/tls-doc-example-update

Conversation

@ChihweiLHBird

Copy link
Copy Markdown
Member

Replace manual app.signalize(), app.finalize(), and app.state.is_started = True with await app_server.startup() in the HTTP-to-HTTPS redirect documentation

The create_server docstring explicitly recommends using await app_server.startup() for app initialization. The manual signalize()/finalize() approach skips steps that _startup() performs — extension setup, route duplicate checking, uvloop conflict detection, and touchup optimizations. While the manual approach works for trivial cases, startup() is the correct API and safer to recommend in docs where users may adapt the pattern for more complex apps.

Resolves #2832 (remaining work after #2864)

…`/`finalize`

Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
@ChihweiLHBird ChihweiLHBird requested a review from a team as a code owner April 10, 2026 00:49
@codecov

codecov Bot commented Apr 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.731%. Comparing base (785d77f) to head (84c4b53).

Additional details and impacted files
@@              Coverage Diff              @@
##              main     #3155       +/-   ##
=============================================
- Coverage   87.793%   87.731%   -0.062%     
=============================================
  Files          105       105               
  Lines         8143      8143               
  Branches      1290      1290               
=============================================
- Hits          7149      7144        -5     
- Misses         687       692        +5     
  Partials       307       307               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ChihweiLHBird ChihweiLHBird changed the title Fix TLS redirect docs to use startup() instead of manual `signalize… Fix TLS redirect doc example to use startup() Apr 10, 2026
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.

Outdated docs on http to https redirection

1 participant