New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hot Reloading: HTTP Middleware Reloading #7286
Merged
artursouza
merged 6 commits into
dapr:master
from
JoshVanL:hot-reloading-components-middleware
Jan 26, 2024
Merged
Hot Reloading: HTTP Middleware Reloading #7286
artursouza
merged 6 commits into
dapr:master
from
JoshVanL:hot-reloading-components-middleware
Jan 26, 2024
Conversation
This file contains 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
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #7286 +/- ##
==========================================
+ Coverage 62.41% 62.42% +0.01%
==========================================
Files 240 244 +4
Lines 22062 22125 +63
==========================================
+ Hits 13769 13811 +42
- Misses 7153 7175 +22
+ Partials 1140 1139 -1 ☔ View full report in Codecov by Sentry. |
JoshVanL
force-pushed
the
hot-reloading-components-middleware
branch
from
January 9, 2024 14:48
58ae82e
to
5f54ae6
Compare
JoshVanL
added
the
autoupdate
DaprBot will keep the Pull Request up to date with master branch
label
Jan 10, 2024
daixiang0
reviewed
Jan 10, 2024
yaron2
reviewed
Jan 10, 2024
JoshVanL
force-pushed
the
hot-reloading-components-middleware
branch
from
January 14, 2024 16:47
ad10c8a
to
e40f04a
Compare
Open
JoshVanL
force-pushed
the
hot-reloading-components-middleware
branch
from
January 18, 2024 19:39
2ef1713
to
9c4cee4
Compare
Part of dapr#1172 Branched from dapr#7260 Adds support for HTTP middleware hot reloading. PR adds support for HTTP middlewares to be dynamically updated. The HTTP Middleware returns a middleware.HTTP pipleine built from a config spec. This pipeline implements a single handler which it itself runs the spec configured HTTP middleware chain. When a middleware Component is added or removed, the HTTP middleware store is updated and both the HTTP server and App HTTP channel's pipeline's chains are updated dynamically. Like today, if a pipeline spec contains handlers whose names, version, or type does not match that from the store, then the handler is skipped for that chain. Pipeline handler order is preserved (i.e. reverse order). The middleware store has been made generic so can be used in future for planned gRPC middleware support. Middleware init has been moved from the runtime channel manager to the runtime processor init procedure to allow for dynamic loading. The middleware HTTP manager is passed to the runtime processor to expose the store, and relevant built pipelines passed to the HTTP app channel and HTTP server. Middleware integration tests has been added for daprd to check functionality, ordering, and hotreloading, Signed-off-by: joshvanl <me@joshvanl.dev>
Co-authored-by: Loong Dai <long0dai@foxmail.com> Signed-off-by: Josh van Leeuwen <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
metadata component checks Signed-off-by: joshvanl <me@joshvanl.dev>
JoshVanL
force-pushed
the
hot-reloading-components-middleware
branch
from
January 25, 2024 20:05
ddd2069
to
5ed4391
Compare
artursouza
approved these changes
Jan 26, 2024
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.
Part of #1172
Branched from #7260
Adds support for HTTP middleware hot reloading.
PR adds support for HTTP middlewares to be dynamically updated. The HTTP
Middleware returns a middleware.HTTP pipleine built from a config spec.
This pipeline implements a single handler which it itself runs the spec
configured HTTP middleware chain. When a middleware Component is added
or removed, the HTTP middleware store is updated and both the HTTP
server and App HTTP channel's pipeline's chains are updated dynamically.
Like today, if a pipeline spec contains handlers whose names, version,
or type does not match that from the store, then the handler is skipped
for that chain. Pipeline handler order is preserved (i.e. reverse order).
The middleware store has been made generic so can be used in future for
planned gRPC middleware support.
Middleware init has been moved from the runtime channel manager to the
runtime processor init procedure to allow for dynamic loading. The
middleware HTTP manager is passed to the runtime processor to expose the
store, and relevant built pipelines passed to the HTTP app channel and
HTTP server.
Middleware integration tests has been added for daprd to check
functionality, ordering, and hotreloading,
Signed-off-by: joshvanl me@joshvanl.dev