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] Refactor the FIELD pseudo-cause into the catch-all events and a field filter #69

Closed
kopf-archiver bot opened this issue Aug 18, 2020 · 0 comments
Labels
archive automation CI/CD: testing, linting, releasing automatically

Comments

@kopf-archiver
Copy link

kopf-archiver bot commented Aug 18, 2020

A pull request by nolar at 2019-05-22 14:12:10+00:00
Original URL: zalando-incubator/kopf#69
Merged by nolar at 2019-05-28 15:36:27+00:00

Issue : #13

The FIELD pseudo-cause was introduced as an easy way to mark the per-field handlers (@kopf.on.field), and then to select them on the event handling. The field handlers were handled separately, after all the object handlers.

Over time, this pseudo-cause was merged into the overall handling routine, and has become a problem: it prevents further refactoring (of event/cause detection and handling), which in turn is needed for the test coverage.


This PR is a set of changes extracted from a bigger branch for the ease of code review (one small part at a time). It does NOT change the behaviour of the framework or of any handlers; it just changes the internal implementation of it:

  • No more FIELD pseudo-causes in the code.
  • The catch-all handlers (event==None) with field property set are now used — i.e. any event as long as this field is in the diff. Efficiently, it means only the UPDATE events — same as before.

In addition, the tests of handler selection were improved to reflect all cases; and to make the test ids more readable.

@kopf-archiver kopf-archiver bot closed this as completed Aug 18, 2020
@kopf-archiver kopf-archiver bot changed the title [archival placeholder] [PR] Refactor the FIELD pseudo-cause into the catch-all events and a field filter Aug 19, 2020
@kopf-archiver kopf-archiver bot added the automation CI/CD: testing, linting, releasing automatically label Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archive automation CI/CD: testing, linting, releasing automatically
Projects
None yet
Development

No branches or pull requests

0 participants