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

[Improvement] Add pre event to event listeners #5112

Closed
Tracked by #5049
FANNG1 opened this issue Oct 11, 2024 · 0 comments · Fixed by #5110
Closed
Tracked by #5049

[Improvement] Add pre event to event listeners #5112

FANNG1 opened this issue Oct 11, 2024 · 0 comments · Fixed by #5110
Assignees
Labels
0.7.0 Release v0.7.0 improvement Improvements on everything

Comments

@FANNG1
Copy link
Contributor

FANNG1 commented Oct 11, 2024

What would you like to be improved?

Add a pre hook to support some scenarios like check the validation of the request, set the default values of the request.

How should we improve?

No response

@FANNG1 FANNG1 added the improvement Improvements on everything label Oct 11, 2024
@FANNG1 FANNG1 self-assigned this Oct 14, 2024
jerryshao pushed a commit that referenced this issue Oct 15, 2024
### What changes were proposed in this pull request?
support pre event for event listener systems
1. add new `PreEvent` to represent Pre event and only `SYNC` event
listeners could process `PreEvent`
2. keep `Event` as post event to keep compatibility.
3. `EventBus` dispatch event to corresponding event listeners.

### Why are the changes needed?
Fix: #5112 

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
add UT
@jerryshao jerryshao added the 0.7.0 Release v0.7.0 label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.7.0 Release v0.7.0 improvement Improvements on everything
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants