10BC0 Fix printers tests - remove dependency on leap years by MarSik · Pull Request #123910 · kubernetes/kubernetes · GitHub
[go: up one dir, main page]

Skip to content

Conversation

MarSik
Copy link
Contributor
@MarSik MarSik commented Mar 13, 2024

What type of PR is this?

/kind bug
/kind failing-test

What this PR does / why we need it:

Test that were using AddDate(+y, 0, 0) and then time.Sub were sensitive to a specific date of their execution.

An example is a test with AddDate(-5, 0, 0) when executed on 28th of February 2024 and when executed on 1st of March 2024.

The difference seen by Sub will be 5y1d in the first case and 5y2d in the second case, because 29th of Feb 2024 is a leap year as well as 29th of Feb 2020 that falls within the 5 year difference.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 13, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @MarSik. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Mar 13, 2024
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 13, 2024
@ffromani
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 13, 2024
Test that were using AddDate(+y, 0, 0) and then time.Sub were
sensitive to a specific date of their execution.

An example is a test with AddDate(-5, 0, 0) when executed
on 28th of February 2024 and when executed on 1st of March 2024.

The difference seen by Sub will be 5y1d in the first case
and 5y2d in the second case, because 29th of Feb 2024 is a leap
year as well as 29th of Feb 2020 that falls within the 5 year
difference.

Signed-off-by: Martin Sivak <msivak@redhat.com>
@MarSik MarSik force-pushed the fix-printer-leap-y branch from 9f6b2e7 to 5ba8f88 Compare March 13, 2024 10:11
@ffromani
Copy link
Contributor

the fix looks legit, but which test is failing or flaking?

@MarSik
Copy link
Contributor Author
MarSik commented Mar 13, 2024

@ffromani I see git was smart and actually handled my conflict for me - the failing test was fixed by e9b30a0

The other cases where it will break eventually (in few years :) were left intact by that commit though.

@ffromani
Copy link
Contributor

It seems to me the issue is fixedby #123603 . This is a further improvement over that it seems?

@MarSik
Copy link
Contributor Author
MarSik commented Mar 13, 2024

Yeah, I missed the initial patch and git resolved the conflicts for me. #123603 did not actually explain what happened either, but well...

@ffromani
Copy link
Contributor

/triage accepted
/priority backlog

thanks, labelling as test improvement so

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 13, 2024
Copy link
Contributor
@swatisehgal swatisehgal left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks for the PR!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 21, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4b4064fb826549ffa7f42ddbac02c9fac8dd9a8f

@swatisehgal
Copy link
Contributor

/assign @smarterclayton @soltysh
for approval

@dims
Copy link
Member
dims commented May 22, 2024

/kind cleanup
/sig testing
/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels May 22, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label May 22, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, MarSik, swatisehgal

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 22, 2024
@k8s-ci-robot k8s-ci-robot merged commit 74d5784 into kubernetes:master May 22, 2024
AD07
@k8s-ci-robot k8s-ci-robot added this to the v1.31 milestone May 22, 2024
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", 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. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

0