Skip to content

khepri_machine: Use initial tree to list sprocs triggered by deletions#357

Merged
dumbbell merged 1 commit into
v0.17.xfrom
md/triggers-patterns
Feb 4, 2026
Merged

khepri_machine: Use initial tree to list sprocs triggered by deletions#357
dumbbell merged 1 commit into
v0.17.xfrom
md/triggers-patterns

Conversation

@the-mikedavis
Copy link
Copy Markdown
Collaborator

When handling a deletion change, the tree node will certainly not be in the tree after the deletion occurred. So when listing triggered sprocs for deletions we should use the tree as it was before the deletion.

Fixes #356. I'm not very familiar with the triggers / sprocs code so I'm not 100% confident in this patch 😅

@the-mikedavis the-mikedavis added this to the v0.17.5 milestone Jan 28, 2026
@the-mikedavis the-mikedavis self-assigned this Jan 28, 2026
@the-mikedavis the-mikedavis added the bug Something isn't working label Jan 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.56%. Comparing base (0666e83) to head (183a566).
⚠️ Report is 2 commits behind head on v0.17.x.

Additional details and impacted files
@@             Coverage Diff             @@
##           v0.17.x     #357      +/-   ##
===========================================
+ Coverage    86.26%   86.56%   +0.29%     
===========================================
  Files           22       22              
  Lines         3517     3521       +4     
===========================================
+ Hits          3034     3048      +14     
+ Misses         483      473      -10     
Flag Coverage Δ
erlang-26 86.53% <100.00%> (+0.29%) ⬆️
erlang-27 86.25% <100.00%> (+0.01%) ⬆️
erlang-28 86.25% <100.00%> (+0.01%) ⬆️
os-ubuntu-latest 86.56% <100.00%> (+0.29%) ⬆️
os-windows-latest 86.28% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@dumbbell dumbbell left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thank you for adding the testcase as well!

Could you please rebase your patch against the v0.17.x branch?

When handling a deletion change, the tree node will certainly not be
in the tree after the deletion occurred. So when listing triggered
sprocs for deletions we should use the tree as it was before the
deletion.
@the-mikedavis the-mikedavis changed the base branch from main to v0.17.x February 3, 2026 13:50
Copy link
Copy Markdown
Collaborator

@dumbbell dumbbell left a comment

Choose a reason for hiding this comment

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

Thank you :-)

@dumbbell dumbbell merged commit c61f62b into v0.17.x Feb 4, 2026
26 checks passed
@dumbbell dumbbell deleted the md/triggers-patterns branch February 4, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Path pattern event filter can cause errors on deletion triggers

2 participants