Skip to content
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 Reload: Subscription #7583

Merged
merged 8 commits into from
Apr 18, 2024
Merged

Conversation

JoshVanL
Copy link
Contributor

@JoshVanL JoshVanL commented Mar 4, 2024

Adds support for Subscription Hot Reloading.

If the Hot Reloading preview feature is enabled, create, update and
delete events to declarative Subscriptions will be reflected in the
Subscriptions runtime without needing to restart the Dapr runtime. Works
in both self-hosted and Kubernetes modes.

Note that, because topic routes and not indexed by Subscription
resources, all Subscriptions will be cancelled and topic routes re-built
and re-subscribed when a Subscription event occurs. A possible
improvement would to only cancel all topic route subscriptions which are
related to the Subscription pubsub or include an index of the
Subscription which a topic is routed for, however this is out of scope
of this change.

Closes #7139
Docs dapr/docs#4116

@JoshVanL JoshVanL added this to the v1.13 milestone Mar 6, 2024
@JoshVanL JoshVanL force-pushed the runtime-hotreload-subscriptions branch from 9baf837 to 74468a2 Compare April 11, 2024 01:00
Adds support for Subscription Hot Reloading.

If the Hot Reloading preview feature is enabled, create, update and
delete events to declarative Subscriptions will be reflected in the
Subscriptions runtime without needing to restart the Dapr runtime. Works
in both self-hosted and Kubernetes modes.

Note that, because topic routes and not indexed by Subscription
resources, all Subscriptions will be cancelled and topic routes re-built
and re-subscribed when a Subscription event occurs. A possible
improvement would to only cancel all topic route subscriptions which are
related to the Subscription pubsub or include an index of the
Subscription which a topic is routed for, however this is out of scope
of this change. Support for per topic route cancellation will be needed
for on-demand bi-directional subscriptions.

In-flight messages are not effected by Subscription hot reloading.

Branched from dapr#7582

Closes dapr#7139

Signed-off-by: joshvanl <[email protected]>
@JoshVanL JoshVanL force-pushed the runtime-hotreload-subscriptions branch from 74468a2 to 311ef31 Compare April 11, 2024 19:14
@JoshVanL JoshVanL marked this pull request as ready for review April 11, 2024 19:14
@JoshVanL JoshVanL requested review from a team as code owners April 11, 2024 19:14
@JoshVanL JoshVanL added the autoupdate DaprBot will keep the Pull Request up to date with master branch label Apr 11, 2024
JoshVanL added a commit to JoshVanL/dapr-docs that referenced this pull request Apr 18, 2024
Document Declarative Subscription hot reloading preview feature from
dapr/dapr#7583

Signed-off-by: joshvanl <[email protected]>
pkg/operator/api/components.go Show resolved Hide resolved
pkg/runtime/processor/subscriptions.go Outdated Show resolved Hide resolved
@yaron2 yaron2 merged commit 6ef8029 into dapr:master Apr 18, 2024
18 of 20 checks passed
@marcduiker
Copy link
Contributor

@holopin-bot @JoshVanL

Copy link

holopin-bot bot commented Apr 24, 2024

Congratulations @JoshVanL, you just earned a badge! Here it is: https://holopin.io/claim/clvdtt9ln492740gl50f737kc2

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

cicoyle pushed a commit to cicoyle/dapr that referenced this pull request May 24, 2024
* Hot Reload: Subscription

Adds support for Subscription Hot Reloading.

If the Hot Reloading preview feature is enabled, create, update and
delete events to declarative Subscriptions will be reflected in the
Subscriptions runtime without needing to restart the Dapr runtime. Works
in both self-hosted and Kubernetes modes.

Note that, because topic routes and not indexed by Subscription
resources, all Subscriptions will be cancelled and topic routes re-built
and re-subscribed when a Subscription event occurs. A possible
improvement would to only cancel all topic route subscriptions which are
related to the Subscription pubsub or include an index of the
Subscription which a topic is routed for, however this is out of scope
of this change. Support for per topic route cancellation will be needed
for on-demand bi-directional subscriptions.

In-flight messages are not effected by Subscription hot reloading.

Branched from dapr#7582

Closes dapr#7139

Signed-off-by: joshvanl <[email protected]>

* Load all Subscriptions before reloading on boot

Signed-off-by: joshvanl <[email protected]>

* Adds unit tests for subscription client side scope filtering

Signed-off-by: joshvanl <[email protected]>

* Linting

Signed-off-by: joshvanl <[email protected]>

---------

Signed-off-by: joshvanl <[email protected]>
Co-authored-by: Dapr Bot <[email protected]>
msfussell added a commit to dapr/docs that referenced this pull request May 30, 2024
* HotReload: Subscription feature preview

Document Declarative Subscription hot reloading preview feature from
dapr/dapr#7583

Signed-off-by: joshvanl <[email protected]>

* Apply suggestions from code review

Co-authored-by: Hannah Hunter <[email protected]>
Signed-off-by: Josh van Leeuwen <[email protected]>

* Move feature preview line to top of note

Signed-off-by: joshvanl <[email protected]>

* Add subscription hot reload note to pubsub-overview

Signed-off-by: joshvanl <[email protected]>

* Adds extra not about subscription hot reloading

Signed-off-by: joshvanl <[email protected]>

* Update daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md

Signed-off-by: Mark Fussell <[email protected]>

---------

Signed-off-by: joshvanl <[email protected]>
Signed-off-by: Josh van Leeuwen <[email protected]>
Signed-off-by: Mark Fussell <[email protected]>
Co-authored-by: Mark Fussell <[email protected]>
Co-authored-by: Hannah Hunter <[email protected]>
elena-kolevska pushed a commit to elena-kolevska/dapr that referenced this pull request Jun 10, 2024
* Hot Reload: Subscription

Adds support for Subscription Hot Reloading.

If the Hot Reloading preview feature is enabled, create, update and
delete events to declarative Subscriptions will be reflected in the
Subscriptions runtime without needing to restart the Dapr runtime. Works
in both self-hosted and Kubernetes modes.

Note that, because topic routes and not indexed by Subscription
resources, all Subscriptions will be cancelled and topic routes re-built
and re-subscribed when a Subscription event occurs. A possible
improvement would to only cancel all topic route subscriptions which are
related to the Subscription pubsub or include an index of the
Subscription which a topic is routed for, however this is out of scope
of this change. Support for per topic route cancellation will be needed
for on-demand bi-directional subscriptions.

In-flight messages are not effected by Subscription hot reloading.

Branched from dapr#7582

Closes dapr#7139

Signed-off-by: joshvanl <[email protected]>

* Load all Subscriptions before reloading on boot

Signed-off-by: joshvanl <[email protected]>

* Adds unit tests for subscription client side scope filtering

Signed-off-by: joshvanl <[email protected]>

* Linting

Signed-off-by: joshvanl <[email protected]>

---------

Signed-off-by: joshvanl <[email protected]>
Co-authored-by: Dapr Bot <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
AnnuCode pushed a commit to AnnuCode/dapr that referenced this pull request Aug 7, 2024
* Hot Reload: Subscription

Adds support for Subscription Hot Reloading.

If the Hot Reloading preview feature is enabled, create, update and
delete events to declarative Subscriptions will be reflected in the
Subscriptions runtime without needing to restart the Dapr runtime. Works
in both self-hosted and Kubernetes modes.

Note that, because topic routes and not indexed by Subscription
resources, all Subscriptions will be cancelled and topic routes re-built
and re-subscribed when a Subscription event occurs. A possible
improvement would to only cancel all topic route subscriptions which are
related to the Subscription pubsub or include an index of the
Subscription which a topic is routed for, however this is out of scope
of this change. Support for per topic route cancellation will be needed
for on-demand bi-directional subscriptions.

In-flight messages are not effected by Subscription hot reloading.

Branched from dapr#7582

Closes dapr#7139

Signed-off-by: joshvanl <[email protected]>

* Load all Subscriptions before reloading on boot

Signed-off-by: joshvanl <[email protected]>

* Adds unit tests for subscription client side scope filtering

Signed-off-by: joshvanl <[email protected]>

* Linting

Signed-off-by: joshvanl <[email protected]>

---------

Signed-off-by: joshvanl <[email protected]>
Co-authored-by: Dapr Bot <[email protected]>
Signed-off-by: Annu Singh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autoupdate DaprBot will keep the Pull Request up to date with master branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hot-reloading of Subscriptions
4 participants