Repository navigation
Conversation
elastic-package validates string values in integer, short, byte, unsigned_long, half_float and scaled_float fields for packages with format_version 3.8.0 or later (elastic/elastic-package#4140). Assisted-by: Claude Code/Claude Opus 5.5
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.
Note: drafted with 🤖 Claude Code/Claude Opus 5.5 under my supervision.
Why
elastic/elastic-package#4140 makes the fields validator in pipeline and system tests stricter for packages with
format_version3.8.0 or later. Package authors should learn about it when they bump the format version, so it belongs in the spec changelog.Until now, fields mapped as
integer,short,byte,unsigned_long,half_floatorscaled_floataccepted any value, including strings like"-89 dBm". Onlylong,floatanddoublewere type-checked. elastic/integrations#22237 (fortinet_fortigate) is an example: unit-suffixed strings intype: integerfields passedelastic-package test pipeline.What
One
breaking-changeentry under3.8.0-nextinspec/changelog.yml. From 3.8.0, string values in those six types fail validation, as they already do forlong,floatanddouble, unless the field is listed instring_number_fields.For all format versions, elastic-package also rejects values in these fields that Elasticsearch can't coerce to a number at all (
"-89 dBm","Auto", booleans, objects). That part doesn't depend on the spec version, so it isn't in the changelog.There are no spec file changes. The existing
string_number_fieldsdescription ("List of numeric type fields allowed to have a string value if it can be parsed as a number") already covers all numeric types.Rollout
Merge this together with or after elastic/elastic-package#4140. In elastic/integrations
main, all packages useformat_version3.4.2 or lower, so this entry doesn't change anything for them until they bump.Testing
go test ./code/go/internalpasses, which validates the changelog format.