Add web_application_options setting to configure the web application (#551)#704
Merged
Conversation
…551) The aiohttp web driver always constructed aiohttp.web.Application() with no arguments, so there was no way to set things like client_max_size or install middlewares on the embedded web server. Add a new web_application_options mapping setting whose contents are forwarded as keyword arguments to the web framework's application object. For the default aiohttp driver these go straight to aiohttp.web.Application(**options). Defaults to None (empty), preserving the previous behaviour. Closes #551. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HHPL4VFWQRQPpjR1gXSKyL
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #704 +/- ##
=======================================
Coverage 94.14% 94.15%
=======================================
Files 104 104
Lines 11136 11136
Branches 1201 1201
=======================================
+ Hits 10484 10485 +1
+ Misses 551 550 -1
Partials 101 101 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
wbarnha
added a commit
that referenced
this pull request
Jul 19, 2026
Per review, the v0.12.0 changelog/release notes should describe only what is already on master, not work still in open PRs. - Remove the not-yet-merged items: the offset-commit data-loss fixes (#606/#707, #316/#692), the optional OpenTracing/OpenTelemetry extras (#685/#686, #688/#681), web_application_options (#704), and the reported-issue fix stack (#693-#703, #705). These will be added back as they merge. - Add a Dependencies section noting the current runtime/client libraries: mode-streaming >= 0.4.0, aiokafka >= 0.10.0 (compatible with recent 0.13/0.14 releases), the new confluent-kafka >= 2.0.0 for faust[ckafka], and the faust-cchardet fork replacing unmaintained cchardet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HHPL4VFWQRQPpjR1gXSKyL
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.
What
The aiohttp web driver always constructed
aiohttp.web.Application()with no arguments, so there was no way to configure the embedded web server — e.g. raiseclient_max_sizeor install middlewares.Closes #551.
How
Added a new
web_application_optionsmapping setting. Its contents are forwarded as keyword arguments to the web framework's application object; for the default aiohttp driver they go straight toaiohttp.web.Application(**options):Defaults to
None(no options), preserving the previous behaviour exactly. The accepted keys depend on the configured web driver.Changes
faust/types/settings/settings.py— newweb_application_optionssetting (params.Dict[Any]) +__init__parameter, with a documented docstring.faust/web/drivers/aiohttp.py—Web.__init__now buildsApplication(**(app.conf.web_application_options or {})).Test
tests/unit/web/drivers/test_aiohttp.py—test_web_application_optionsasserts the options are forwarded toApplication(...);test_web_application_options__defaultasserts the no-option default callsApplication().tests/functional/test_app.py— added the setting to the config default check (is None) and to the round-tripassert_config_equivalentset/assert flow.All affected suites pass (138 passed).
🤖 Generated with Claude Code
Generated by Claude Code