Repository navigation
Fix ISM and other timestamp fields typed as integer instead of int64 causing numeric overflow - #2039
Conversation
Signed-off-by: Radhakrishnan Pachyappan <gingeekrishna@gmail.com>
Signed-off-by: Radhakrishnan Pachyappan <gingeekrishna@gmail.com>
b53cdbc to
dd4ac95
Compare
There was a problem hiding this comment.
Please submit a change against https://github.com/opensearch-project/opensearch-api-specification/blob/main/spec/schemas/ism._common.yaml, thank you
There was a problem hiding this comment.
Submitted the spec fix upstream: opensearch-project/opensearch-api-specification#1196
|
Submitted the spec fix upstream: opensearch-project/opensearch-api-specification#1196 |
Signed-off-by: Radhakrishnan Pachyappan <gingeekrishna@gmail.com>
dd4ac95 to
2914dd8
Compare
…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>
enabled_time is an epoch-millisecond timestamp on sm._common___SMPolicy, same as last_updated_time fixed in the previous commit, but was missed there. No generated Java class exists yet for the sm package, so this is a spec-only fix to keep the vendored spec consistent; it has no Java-code counterpart to update. Matches the same correction made upstream after review on opensearch-project/opensearch-api-specification#1196. Signed-off-by: Radhakrishnan P <gingeekrishna@gmail.com>
238cc35 to
63e110c
Compare
|
Hi @reta , Could you help me merge this PR? |
@gingeekrishna once #2039 (comment) is merged, the changes will be included automatically |
|
Thanks @reta — opensearch-api-specification#1196 is mergeable. The reviewer's follow-up ( |
|
@reta are you good with my comment and PR now? |
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.