Skip to content

Removing events from Context #538

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

Closed
csviri opened this issue Sep 16, 2021 · 1 comment
Closed

Removing events from Context #538

csviri opened this issue Sep 16, 2021 · 1 comment
Assignees
Labels
api-changes-epic core kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@csviri
Copy link
Collaborator

csviri commented Sep 16, 2021

Currently the event(s) triggered the controller execution is accessible from the Conext object. There is already a consensus that using these events is an antipattern in operators. Controller Runtime does not expose these event either.

Removing them will have two benefits:

  • The intended usage is more obvious, so we won't even allow users to use events, so the mentioned anti-patter is not even possible to implement
  • We can simplify the DefaultEventHandler so we don't store events, just a flag is the controller should be executed or not. This will reduce memory consumption.

Side effects:

  • The framework will be more opinionated (in this situation is not necessarily a bad thing).
@csviri csviri added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 16, 2021
@lburgazzoli
Copy link
Collaborator

Would fix also: #469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes-epic core kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants