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

Replace int64 durations with durationpb in proto files #7097

Closed
pgporada opened this issue Sep 22, 2023 · 0 comments · Fixed by #7147
Closed

Replace int64 durations with durationpb in proto files #7097

pgporada opened this issue Sep 22, 2023 · 0 comments · Fixed by #7147
Assignees

Comments

@pgporada
Copy link
Member

pgporada commented Sep 22, 2023

Related to #7060

There are int64's masquerading as time.Durations in protobuf files. We can replace those with durationpb instead and do some nice cleanup.

Example of an int64 that could be a durationpb

int64 window = 1;

which is used at

ssa.clk.Now().Add(-time.Duration(req.Window)),

In that instance, req.Window could be no different than 1 * time.Hour.

@aarongable aarongable added this to the Sprint 2023-10-10 milestone Oct 10, 2023
pgporada added a commit that referenced this issue Oct 26, 2023
…ation fields (#7115)

* Renames all of int64 as a time.Duration fields to `<fieldname>NS` to
indicate they are Unix nanoseconds.
* Adds new `google.protobuf.Duration` fields to each .proto file where
we previously had been using an int64 field to populate a time.Duration.
* Updates relevant gRPC messages.

Part 1 of 3 for #7097
pgporada added a commit that referenced this issue Nov 13, 2023
Switch to reading grpc duration values from the new durationpb protofbuf
fields, completely ignoring the old int64 fields.

Part 2 of 3 for #7097
pgporada added a commit that referenced this issue Nov 28, 2023
This is a cleanup PR finishing the migration from int64 durations to
protobuf `*durationpb.Duration` by removing all usage of the old int64
fields. In the previous PR
#7146 all fields were
switched to read from the protobuf durationpb fields.

Fixes #7097
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants