Description of the problem including expected versus actual behavior:
Running the generator.py with the --ref option with a tag or commit prior to d8a5e2a will fail with a ValueError exception. Using git checkout <tag> continues to work.
Steps to reproduce:
$ python scripts/generator.py --ref v1.5.0
Provide logs (if relevant):
Working:
$ python scripts/generator.py --ref d8a5e2a
Loading schemas from git ref d8a5e2a
Running generator. ECS version 1.6.0-dev
Failing:
git tag:
$ python scripts/generator.py --ref v1.5.0
Loading schemas from git ref v1.5.0
Running generator. ECS version 1.5.0
Traceback (most recent call last):
File "scripts/generator.py", line 94, in <module>
main()
File "scripts/generator.py", line 44, in main
cleaner.clean(fields)
File "<redacted>/ecs/scripts/schema/cleaner.py", line 23, in clean
visitor.visit_fields(fields, fieldset_func=schema_cleanup, field_func=field_cleanup)
File "<redacted>/ecs/scripts/schema/visitor.py", line 21, in visit_fields
visit_fields(details['fields'],
File "<redacted>/ecs/scripts/schema/visitor.py", line 19, in visit_fields
field_func(details)
File "<redacted>/ecs/scripts/schema/cleaner.py", line 125, in field_cleanup
field_assertions_and_warnings(field)
File "<redacted>/ecs/scripts/schema/cleaner.py", line 168, in field_assertions_and_warnings
single_line_short_description(field)
File "<redacted>/ecs/scripts/schema/cleaner.py", line 189, in single_line_short_description
raise ValueError(msg)
ValueError: Short descriptions must be single line, and under 120 characters (current length: 134).
Offending field or field set: number
Short description:
Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
git commit sha:
$ python scripts/generator.py --ref 75da22b
Loading schemas from git ref 75da22b
Running generator. ECS version 1.6.0-dev
Traceback (most recent call last):
File "scripts/generator.py", line 94, in <module>
main()
File "scripts/generator.py", line 44, in main
cleaner.clean(fields)
File "<redacted>/ecs/scripts/schema/cleaner.py", line 23, in clean
visitor.visit_fields(fields, fieldset_func=schema_cleanup, field_func=field_cleanup)
File "<redacted>/ecs/scripts/schema/visitor.py", line 21, in visit_fields
visit_fields(details['fields'],
File "<redacted>/ecs/scripts/schema/visitor.py", line 19, in visit_fields
field_func(details)
File "<redacted>/ecs/scripts/schema/cleaner.py", line 125, in field_cleanup
field_assertions_and_warnings(field)
File "<redacted>/ecs/scripts/schema/cleaner.py", line 168, in field_assertions_and_warnings
single_line_short_description(field)
File "<redacted>/ecs/scripts/schema/cleaner.py", line 189, in single_line_short_description
raise ValueError(msg)
ValueError: Short descriptions must be single line, and under 120 characters (current length: 134).
Offending field or field set: number
Short description:
Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
Any additional context:
The short descriptions were fixed in a91aa11 to align with the new length checking of short, but previously fields missing short fall back to the description field which is failing the new short character length check. Need to investigate how to improve --ref to handle this change in the generator.
Description of the problem including expected versus actual behavior:
Running the
generator.pywith the--refoption with a tag or commit prior to d8a5e2a will fail with aValueErrorexception. Usinggit checkout <tag>continues to work.Steps to reproduce:
Provide logs (if relevant):
Working:
Failing:
git tag:
git commit sha:
Any additional context:
The short descriptions were fixed in a91aa11 to align with the new length checking of
short, but previously fields missingshortfall back to thedescriptionfield which is failing the newshortcharacter length check. Need to investigate how to improve--refto handle this change in the generator.