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

Extend ConditionBuilder interface with a WithClock(...) function #6729

Merged

Conversation

oliver-goetz
Copy link
Member

@oliver-goetz oliver-goetz commented Sep 23, 2022

How to categorize this PR?

/area dev-productivity
/kind enhancement|

What this PR does / why we need it:
This PR extends ConditionBuilder interface with a WithClock(...) function as suggested in the linked issue.
Additionally, new ...WithClock(...) condition helper function are introduced. In the final step, those functions replace the existing helper functions, wherever a clock is available.

Which issue(s) this PR fixes:
Fixes #6689

Special notes for your reviewer:

Release note:

ConditionBuilder interface is extended by a `WithClock(...)` function.
`...WithClock(...)` condition helper functions are introduced.
`WithNowFunc(...)` function is removed from ConditionBuilder interface.

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Sep 23, 2022

@oliver-goetz: The label(s) kind/enhancement| cannot be applied, because the repository doesn't have them.

In response to this:

How to categorize this PR?

/area dev-productivity
/kind enhancement|

What this PR does / why we need it:
This PR extends ConditionBuilder interface with a WithClock(...) function as suggested in the linked issue.
Additionally, new ...WithClock(...) condition helper function are introduced. In the final step, those functions replace the existing helper functions, wherever a clock is available.

Which issue(s) this PR fixes:
Fixes #6689

Special notes for your reviewer:

Release note:

ConditionBuilder interface is extended by a `WithClock(...)` function.
`...WithClock(...)` condition helper functions are introduced.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@gardener-prow gardener-prow bot added area/dev-productivity Developer productivity related (how to improve development) do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 23, 2022
@oliver-goetz
Copy link
Member Author

/retitle Extend ConditionBuilder interface with a WithClock(...) function
/kind kind/enhancement

@gardener-prow gardener-prow bot changed the title Enh/condition builder interface Extend ConditionBuilder interface with a WithClock(...) function Sep 23, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Sep 23, 2022

@oliver-goetz: The label(s) kind/kind/enhancement cannot be applied, because the repository doesn't have them.

In response to this:

/retitle Extend ConditionBuilder interface with a WithClock(...) function
/kind kind/enhancement

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@oliver-goetz
Copy link
Member Author

/kind enhancement

@gardener-prow gardener-prow bot added kind/enhancement Enhancement, improvement, extension and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 23, 2022
@oliver-goetz
Copy link
Member Author

/cc @plkokanov

pkg/apis/core/v1beta1/helper/condition_builder.go Outdated Show resolved Hide resolved
pkg/apis/core/v1beta1/helper/condition_builder.go Outdated Show resolved Hide resolved
pkg/apis/core/v1beta1/helper/helper.go Outdated Show resolved Hide resolved
pkg/apis/core/v1beta1/helper/condition_builder.go Outdated Show resolved Hide resolved
pkg/apis/core/v1beta1/helper/helper_test.go Outdated Show resolved Hide resolved
pkg/operation/care/health_check_test.go Outdated Show resolved Hide resolved
@rfranzke rfranzke self-assigned this Oct 4, 2022
@gardener-prow gardener-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 4, 2022
@oliver-goetz oliver-goetz force-pushed the enh/condition-builder-interface branch from 4fe0407 to ce80738 Compare October 4, 2022 10:20
@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 4, 2022
@rfranzke
Copy link
Member

rfranzke commented Oct 4, 2022

PR looks great now :) Only remaining open question is #6729 (comment)

@rfranzke
Copy link
Member

rfranzke commented Oct 5, 2022

/lgtm
/approve

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 5, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rfranzke

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 5, 2022
@acumino acumino added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 6, 2022
@gardener-prow gardener-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 6, 2022
@oliver-goetz oliver-goetz force-pushed the enh/condition-builder-interface branch from c426a51 to be45be9 Compare October 6, 2022 14:34
@gardener-prow gardener-prow bot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 6, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 6, 2022

@oliver-goetz: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gardener-check-vulnerabilities be45be9 link false /test pull-gardener-check-vulnerabilities

Full PR test history. Your PR dashboard. Command help for this repository.
Please help us cut down on flakes by linking this test failure to an open flake report or filing a new flake report if you can't find an existing one. Also see our testing guideline for how to avoid and hunt flakes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 6, 2022
@gardener-prow gardener-prow bot merged commit 9444417 into gardener:master Oct 6, 2022
@oliver-goetz oliver-goetz deleted the enh/condition-builder-interface branch October 6, 2022 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/dev-productivity Developer productivity related (how to improve development) cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a new WithClock(...) function to the ConditionBuilder interface and deprecate WithNowFunc(...)
4 participants