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

feat: implement callbacks from vertices when serving is used as source #2311

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

BulkBeing
Copy link
Contributor

@BulkBeing BulkBeing commented Jan 7, 2025

Implements callbacks to source vertex when Serving source is used. #2318

@vigith vigith changed the title Implement callbacks from vertices when serving is used as source feat: implement callbacks from vertices when serving is used as source Jan 8, 2025
Comment on lines 253 to 255
if let Some(ref callback_handler) = this.callback_handler {
let metadata = message.metadata.ok_or_else(|| {
Error::Source(format!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should write the callback after pafs are resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update. I wrongly assumed .resolve_pafs() would wait for them to resolve.

Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 79.62428% with 141 lines in your changes missing coverage. Please review.

Project coverage is 67.72%. Comparing base (05cd792) to head (ea5d6ab).

Files with missing lines Patch % Lines
rust/numaflow-core/src/tracker.rs 74.80% 63 Missing ⚠️
rust/serving/src/callback.rs 81.28% 32 Missing ⚠️
rust/numaflow-core/src/config/monovertex.rs 31.25% 11 Missing ⚠️
rust/numaflow-core/src/config/pipeline.rs 65.62% 11 Missing ⚠️
rust/numaflow/src/main.rs 0.00% 9 Missing ⚠️
rust/numaflow-core/src/mapper/map.rs 86.36% 6 Missing ⚠️
rust/numaflow-core/src/pipeline.rs 83.33% 3 Missing ⚠️
rust/numaflow-core/src/message.rs 50.00% 2 Missing ⚠️
rust/serving/src/app.rs 88.88% 2 Missing ⚠️
rust/numaflow-core/src/config.rs 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2311      +/-   ##
==========================================
+ Coverage   67.47%   67.72%   +0.25%     
==========================================
  Files         351      352       +1     
  Lines       45822    46306     +484     
==========================================
+ Hits        30918    31363     +445     
- Misses      13828    13868      +40     
+ Partials     1076     1075       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pub(crate) async fn update(&self, message: &Message) -> Result<()> {
let offset = message.id.offset.clone();
let mut responses: Option<Vec<String>> = None;
if self.enable_callbacks {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

match, to avoid mut

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants