Wire v6.1 - time range check breaks app
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 4.4k
- Forks
- 627
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 20
Description
When using Wire v6.1, the app breaks in a lot of different places due to this change:
Validate Timestamp during serialization that values are within spec's range (#3550)
Error message:
Timestamp seconds (-3217862419201) must be in range [-62135596800, 253402300799]
We are using kotlin's Instant.DISTANT_PAST for certain default values and converting those cases to java's Instant (via Kotlin's toJavaInstant) when using GRPC.
I potentially agree that this is an issue for me to resolve but I would also argue that this is a breaking behaviour change and should not be part of a minor release.
Could you please consider putting this behind a feature flag so that projects like mine could slowly adopt to that new spec range check instead of preventing us to keep using newer versions of wire?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the timestamp serialization validation introduced in #3550 and the Kotlin Instant.DISTANT_PAST values converted through toJavaInstant for gRPC. Determine how the v6.1 range check affects these defaults and define what feature-flag behavior is needed; done means existing applications can adopt the check without breaking those values, with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, java, kotlin
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100