Fix ISM and other timestamp fields typed as integer instead of int64 causing numeric overflow#2039
Open
gingeekrishna wants to merge 2 commits into
Conversation
…nt64 Epoch-millisecond timestamps were typed as plain integer in the spec, causing the codegen to emit Integer (max ~2.1B) instead of Long for: - IsmTemplate.lastUpdatedTime (fixes opensearch-project#1717, opensearch-project#1898) - Policy.lastUpdatedTime (fixes opensearch-project#1717, opensearch-project#1898) - flow_framework created_time / last_updated_time (same root cause) - SM policy last_updated_time Any timestamp after ~2038-01-19 in milliseconds overflows int and Jackson raises: Numeric value out of range of int. Add format: int64 to all affected last_updated_time / created_time fields in opensearch-openapi.yaml and update the two generated ISM Java classes from Integer/integerDeserializer to Long/longDeserializer. Fixes opensearch-project#1717 Fixes opensearch-project#1898 Signed-off-by: Radhakrishnan Pachyappan <gingeekrishna@gmail.com>
Signed-off-by: Radhakrishnan Pachyappan <gingeekrishna@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1717, Fixes #1898
Epoch-millisecond timestamps were typed as plain
integerin the spec with noformat: int64, so the codegen emittedInteger(max ~2.1B) instead ofLong. Any real timestamp value (e.g.1755915614485) overflowsintand Jackson raises:Fix: Add
format: int64to affected fields —IsmTemplate.last_updated_time,Policy.last_updated_time, and the same fields inflow_frameworkand SM — and update the two generated ISM Java classes fromInteger/integerDeserializertoLong/longDeserializer.