Skip to content

Commit

Permalink
agent: Fix a stop discovery channel issue (#612)
Browse files Browse the repository at this point in the history
* agent: Fix a stop discovery channel issue

The stop discovery channel is shared by all Configuration resources of a
given discovery handler endpoint, this channel was used without giving
any context of the targeted DiscoveryOperator, leading to a stop of
discovery for all Configurations when a Configuration is modified or
deleted.

This commit makes the stop discovery channel send the concerned
Configuration ID (namespace + name) on the channel, allowing to filter
out requests targeting another DiscoveryOperator, the channel is still
shared so the cases where we really want to stop discovery for all
Configurations still works.

Signed-off-by: Nicolas Belouin <[email protected]>

* Update patch version

Signed-off-by: Nicolas Belouin <[email protected]>

---------

Signed-off-by: Nicolas Belouin <[email protected]>
  • Loading branch information
diconico07 committed Jul 25, 2023
1 parent 98b3bd5 commit 46ed7d3
Show file tree
Hide file tree
Showing 20 changed files with 183 additions and 58 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agent"
version = "0.11.3"
version = "0.11.4"
authors = ["Kate Goldenring <[email protected]>", "<[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand Down
2 changes: 1 addition & 1 deletion agent/src/util/config_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::{
};
use tokio::sync::{broadcast, mpsc, RwLock};

type ConfigId = (String, String);
pub type ConfigId = (String, String);
type ConfigMap = Arc<RwLock<HashMap<ConfigId, ConfigInfo>>>;

/// Information for managing a Configuration, such as all applied Instances of that Configuration
Expand Down
Loading

0 comments on commit 46ed7d3

Please sign in to comment.