-
Notifications
You must be signed in to change notification settings - Fork 146
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
agent: Fix a stop discovery channel issue #612
agent: Fix a stop discovery channel issue #612
Conversation
It's been awhile since I've looked at this, but aren't we creating a discovery operator for each configuration, regardless of whether they have a shared Discovery Handler / protocol? akri/agent/src/util/config_action.rs Line 256 in 54d5584
|
We indeed create a discovery operator per configuration, but the akri/agent/src/util/discovery_operator.rs Lines 97 to 98 in 54d5584
This is needed as we do an akri/agent/src/util/discovery_operator.rs Lines 601 to 616 in 54d5584
And as the |
460d454
to
94e7692
Compare
94e7692
to
61d020e
Compare
61d020e
to
1b4acfc
Compare
1b4acfc
to
4a3bea1
Compare
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]>
Signed-off-by: Nicolas Belouin <[email protected]>
4a3bea1
to
c45fca5
Compare
@bfjelds I added/modified the comments, please tell me if it better now |
What this PR does / why we need it:
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.
Fixes #601
Special notes for your reviewer:
Currently in draft as I still need to add some tests
If applicable:
cargo fmt
)cargo build
)cargo clippy
)cargo test
)cargo doc
)