Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

willydouhard
Copy link

@willydouhard willydouhard commented Oct 10, 2025

What does this PR do?

Respect eventActions filter in prompt version triggers

Fixes # #9630

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • This change requires a documentation update

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Important

Fixes bug in promptVersionProcessor to respect eventActions filter, with new tests added.

  • Behavior:
    • promptVersionProcessor now checks if event.action is in trigger.eventActions before processing in promptVersionProcessor.ts.
    • Adds test cases in promptVersionProcessor.test.ts to verify correct behavior when event.action is included or not in trigger.eventActions.
  • Tests:
    • Adds test for non-execution when event.action is not in trigger.eventActions.
    • Adds test for execution when event.action is in trigger.eventActions.

This description was created by Ellipsis for 900515d. You can customize this summary. It will automatically update as commits are pushed.

Fixes a bug where webhooks configured to trigger only on specific actions (e.g., "created", "deleted") were incorrectly being triggered by all actions including "updated" events. The processor now properly checks if the event action is in the trigger's eventActions array before executing.

Closes langfuse#9630

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 10, 2025
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Twill seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

expect(executions).toHaveLength(0);
});

it("should not execute when event action is not in trigger's eventActions array", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

The added tests for eventActions filtering are comprehensive. To reduce duplication, consider abstracting common trigger/action creation logic into helper functions.

@dosubot dosubot bot added the bug Something isn't working label Oct 10, 2025
@willydouhard willydouhard changed the title Respect eventActions filter in prompt version triggers fix: Respect eventActions filter in prompt version triggers Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.