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] Refactoring [1/3]: renames for better terminology #209

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

[PR] Refactoring [1/3]: renames for better terminology #209

kopf-archiver bot opened this issue Aug 18, 2020 · 0 comments
Labels
archive refactoring Code cleanup without new features added

Comments

@kopf-archiver
Copy link

kopf-archiver bot commented Aug 18, 2020

A pull request by nolar at 2019-10-22 23:14:42+00:00
Original URL: zalando-incubator/kopf#209
Merged by nolar at 2019-10-23 12:41:14+00:00

Code refactoring (part 1 of 3): terminology fixes and look-ahead alignments.

Issue : preparation for #59 #187 #142
Followed by #210 (part 2/3), #211 (part 3/3).

Description

This PR is purely for renaming the classes and methods (massive, but simple) — a part of the code refactoring needed to extend Kopf with the startup/cleanup/(re-)authentication background activities.

Adding "activities" requires some terminology corrections, specifically naming the "resource"-related causes/handlers/registries as such.

Now: they exist as the only possible form of causes/handlers/registries. Adding the activity-specialised classes/methods in addition to generic-looking but resource-specialised classes/methods will create a confusion.

Briefly:

  • custom_object_handler -> resource_handler (to be paired with activity_handler).
  • SimpleRegistry -> ResourceRegistry (to be paired with ActivityRegistry)
  • GlobalRegistry -> OperatorRegistry (for the legacy method extraction & deprecation later).
  • ..._event_watching_... -> ..._resource_watching_... (causes, handlers, registries).
  • ..._state_changing_... -> ..._resource_changing_... (causes, handlers, registries).
  • get_state -> get_essence (a leftover from [PR] Annotate all the code with the types #200: the "state" word is reserved for the reactor's state persistance, and should not be used for the resources' minified bodies (now: "essence")).

There are NO behavioral changes. The public interfaces are kept unmodified. These are the internal changes only.

Some of these renames were introduced in #202, and never were released yet (despite merged to master), so it is safe to rename it again without breaking the public interfaces of any Kopf version.

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] Refactoring [1/3]: renames for better terminology Aug 19, 2020
@kopf-archiver kopf-archiver bot added the refactoring Code cleanup without new features added label Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archive refactoring Code cleanup without new features added
Projects
None yet
Development

No branches or pull requests

0 participants