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

[PR] Skip handling & logging when there are no handlers #103

Closed
kopf-archiver bot opened this issue Aug 18, 2020 · 0 comments
Closed

[PR] Skip handling & logging when there are no handlers #103

kopf-archiver bot opened this issue Aug 18, 2020 · 0 comments
Labels
archive enhancement New feature or request

Comments

@kopf-archiver
Copy link

kopf-archiver bot commented Aug 18, 2020

A pull request by nolar at 2019-06-06 17:11:49+00:00
Original URL: zalando-incubator/kopf#103
Merged by nolar at 2019-06-12 13:35:22+00:00

Issue : #60

Description

Currently, if there are no handlers, the handling attempt is anyway done, and the messages are logged that all handlers (zero out of zero) have succeeded.

With this PR, Kopf does not even attempt doing the handling cycle, if there are no handlers for the current event/cause. This also eliminates the unnecessary logging for fake handling cycles.

Notes

This PR is part of a chain leading to the resuming handlers on operator restarts: #103 -> #104 -> #105.

Refactoring

For simplicity in the future, a little refactoring is also performed: all causes are grouped into the internal and user-facing causes.

Also, the handling stack is now one call shorter (the all-purpose execute() is bypassed):

  • Now:custom_object_handler→handle_cause→_execute→call_handler
  • Was: custom_object_handler→handle_cause→execute→_execute→call_handler

Types of Changes

  • Refactor/improvements
@kopf-archiver kopf-archiver bot closed this as completed Aug 18, 2020
@kopf-archiver kopf-archiver bot changed the title [archival placeholder] [PR] Skip handling & logging when there are no handlers Aug 19, 2020
@kopf-archiver kopf-archiver bot added the enhancement New feature or request label Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archive enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

0 participants