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

Add gateway_api::Duration type to support GEP-2257 Durations #45

Merged
merged 14 commits into from
Aug 16, 2024

Conversation

kflynn
Copy link
Contributor

@kflynn kflynn commented Aug 12, 2024

gateway_api::Duration is a duration type where parsing and formatting obey GEP-2257. This PR adds the type, unit tests, and an example.

Reviewers: reviewing commit by commit might be helpful, but unlike most of my PRs, it's really not that big a deal this time around.

(Many thanks to @shaneutt and @the-wondersmith for answering Rust questions. 😂)

Signed-off-by: Flynn [email protected]

@the-wondersmith
Copy link
Contributor

(Many thanks to ...

Copy link
Contributor

@the-wondersmith the-wondersmith left a comment

Choose a reason for hiding this comment

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

As @kflynn mentioned, we were on a Slack call while he was working this so I probably should have voiced some of these nits then (apologies Flynn 😅).

In any case, it all obviously looks good. I've added a few suggestions, but absolutely none of them are like hard objections. Please feel absolutely free to accept or reject any of them as you see fit.

gateway-api/src/gateway_api/mod.rs Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Outdated Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Outdated Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Outdated Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Show resolved Hide resolved
gateway-api/examples/gep2257.rs Outdated Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Outdated Show resolved Hide resolved
Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

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

Looks great! very thorough, lots of comments, very nice. Thanks for adding this!

I took a first pass of review, but I will be unavailable for most of today, so I didn't get through everything: my goal will be to review again tonight.

gateway-api/examples/gep2257.rs Show resolved Hide resolved
gateway-api/examples/gep2257.rs Show resolved Hide resolved
gateway-api/examples/gep2257.rs Outdated Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Outdated Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Outdated Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Show resolved Hide resolved
Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

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

Once we get the current comments resolved, then 👍

Thanks very much for adding this @kflynn! Appreciate that there are lots of comments and that you covered all the upstream test cases 🙇

gateway-api/src/gateway_api/time_duration.rs Show resolved Hide resolved
gateway-api/src/gateway_api/time_duration.rs Show resolved Hide resolved
gateway-api/src/gateway_api/mod.rs Show resolved Hide resolved
@shaneutt shaneutt enabled auto-merge (squash) August 16, 2024 11:53
@shaneutt shaneutt self-assigned this Aug 16, 2024
@shaneutt shaneutt added this to the Initial Pre-Release milestone Aug 16, 2024
@shaneutt shaneutt added the enhancement New feature or request label Aug 16, 2024
Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@shaneutt shaneutt merged commit db12d1e into kube-rs:main Aug 16, 2024
2 checks passed
@kflynn kflynn deleted the flynn/dev/gep2257 branch August 16, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants