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

GEP2257 Duration parsing #3271

Merged
merged 4 commits into from
Aug 24, 2024
Merged

Conversation

xtineskim
Copy link
Contributor

@xtineskim xtineskim commented Aug 15, 2024

Per GEP 2257, adding duration utils for implementing GEP2257 duration format

What type of PR is this?
/kind feature
(not sure if this is the right kind for this 😅 )

What this PR does / why we need it:
Per GEP 2257 Duration formatting's next step to graduation is implementing parsers. Helping out with this push to standard channel 👍
Which issue(s) this PR fixes:

Fixes #
Related PRs:

Does this PR introduce a user-facing change?:

NONE

cc: @kflynn

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. labels Aug 15, 2024
@k8s-ci-robot
Copy link
Contributor

@xtineskim: The label(s) kind/(not, kind/sure, kind/if, kind/this, kind/is, kind/the, kind/right, kind/kind, kind/for, kind/this, kind/😅, kind/) cannot be applied, because the repository doesn't have them.

In response to this:

Per GEP 2257, adding duration utils for implementing GEP2257 duration format

What type of PR is this?
/kind feature (not sure if this is the right kind for this 😅 )

What this PR does / why we need it:
Per GEP 2257 Duration formatting's next step to graduation is implementing parsers. Helping out with this push to standard channel 👍
Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

cc: @kflynn

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 15, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 15, 2024
Added format tests, makeDuration func for duration testing
Copy link
Contributor

@kflynn kflynn left a comment

Choose a reason for hiding this comment

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

So first, many many many thanks for volunteering to write these, @xtineskim! 🙏 🙏 😁 I really appreciate it and it's lovely to see this arrive with comments and tests and everything!

I've left comments which are mostly pretty small things and, honestly, have been informed by writing the Rust version of this, and I'm going to comment rather than approve just to make sure we get other eyes on the FormatDuration function. Many thanks again!! 🙂

pkg/utils/duration.go Outdated Show resolved Hide resolved
pkg/utils/duration.go Show resolved Hide resolved
pkg/utils/duration.go Outdated Show resolved Hide resolved
pkg/utils/duration.go Show resolved Hide resolved
pkg/utils/duration.go Outdated Show resolved Hide resolved
pkg/utils/duration.go Show resolved Hide resolved
pkg/utils/duration_test.go Outdated Show resolved Hide resolved
@xtineskim xtineskim force-pushed the go-durationutils branch 3 times, most recently from bd51d3c to f10052f Compare August 19, 2024 17:16
@youngnick
Copy link
Contributor

/approve

Nice work!

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 21, 2024
Copy link
Contributor

@kflynn kflynn left a comment

Choose a reason for hiding this comment

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

I have a couple of minor comments, and I think I agree with @robscott about making all the formatters look roughly the same. Thanks for sticking with this!! 🙂

pkg/utils/duration.go Outdated Show resolved Hide resolved
pkg/utils/duration.go Outdated Show resolved Hide resolved
pkg/utils/duration.go Outdated Show resolved Hide resolved
@xtineskim xtineskim force-pushed the go-durationutils branch 2 times, most recently from e9f7fdc to 8692bfc Compare August 21, 2024 21:06
@robscott
Copy link
Member

Thanks @xtineskim!

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: robscott, xtineskim, youngnick

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 merged commit ec8a15a into kubernetes-sigs:main Aug 24, 2024
8 checks passed
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. 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.

5 participants