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

Change terminology from "freezing" to "pausing" #680

Merged
merged 2 commits into from
Feb 13, 2021

Conversation

nolar
Copy link
Owner

@nolar nolar commented Feb 13, 2021

This covers:

  • Documentation and examples.
  • Code comments and docstrings.
  • Variable names.
  • Log messages.
  • Tests.

But not:

  • kopf freeze CLI — that would require the public interface change.

As the primary goal, the variables are now named after their main purpose and meaning (operator_paused, conflicts_found) instead of their type or role (freeze_checker, freeze_toggle). This makes code more readable semantically (as if reading English). And also enabled adding more checkers & toggle with different roles (e.g. for cache pre-population).

As a secondary goal, it is now called "pausing", as there are already too many things named after "freezing": freezegun, frozen_time, task freezing, API requests freezing (for auth), frozen dataclasses, throttling freezes on errors, etc. The word is overloaded with meanings, while "pausing" is nearly unused.

This is also related to #675, where the daemons were temporarily stopped because the operator is "pausing", not "freezing" (that was done intentionally, with this renaming in mind).

IMPORTANT: The code and logic are exactly the same! Nothing is changed, just renamed. The public interface is not affected, only the internal things are.

This covers:

* Documentation and examples.
* Code comments and docstrings.
* Variable names.
* Log messages.
* Tests.

But not:

* `kopf freeze` CLI — that would require the public interface change.

As the primary goal, the variables are now named after their main purpose and meaning (operator_paused, conflicts_found) instead of their type or role (freeze_checker, freeze_toggle). This makes code more readable semantically (as if reading English). And also enabled adding more checkers & toggle with different roles (e.g. for cache pre-population).

As a secondary goal, it is now called "pausing", as there are already too many things named after "freezing": `freezegun`, `frozen_time`, task freezing, API requests freezing (for auth), frozen dataclasses, throttling freezes on errors, etc. The word is overloaded with meanings, while "pausing" is nearly unused.

**IMPORTANT:** The code and logic are exactly the same! Nothing is changed, just renamed. The public interface is not affected, only the internal things are.

Signed-off-by: Sergey Vasilyev <[email protected]>
@nolar nolar added the refactoring Code cleanup without new features added label Feb 13, 2021
@nolar nolar enabled auto-merge February 13, 2021 16:21
@nolar nolar merged commit 2a4867d into master Feb 13, 2021
@nolar nolar deleted the terminology-for-peering branch February 13, 2021 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code cleanup without new features added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant