You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2024-09-03 17:53:39 [ ERROR] elbv2.testALB - Definition is not conform to schema.
Traceback (most recent call last):
File "/usr/local/bin/ecs-compose-x", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/ecs_composex/cli.py", line 206, in main
root_stack = generate_full_template(settings)
File "/usr/local/lib/python3.10/site-packages/ecs_composex/ecs_composex.py", line 248, in generate_full_template
settings.mod_manager.init_mods_resources(settings)
File "/usr/local/lib/python3.10/site-packages/ecs_composex/mods_manager.py", line 307, in init_mods_resources
module.set_resources(settings)
File "/usr/local/lib/python3.10/site-packages/ecs_composex/mods_manager.py", line 266, in set_resources
new_definition = self.resource_class(
File "/usr/local/lib/python3.10/site-packages/ecs_composex/elbv2/elbv2_stack/elbv2.py", line 75, in __init__
super().__init__(name, definition, module, settings)
File "/usr/local/lib/python3.10/site-packages/ecs_composex/compose/x_resources/network_x_resources.py", line 37, in __init__
super().__init__(name, definition, module, settings)
File "/usr/local/lib/python3.10/site-packages/ecs_composex/compose/x_resources/services_resources.py", line 39, in __init__
super().__init__(name, definition, module, settings)
File "/usr/local/lib/python3.10/site-packages/ecs_composex/compose/x_resources/__init__.py", line 79, in __init__
self.validate_schema(name, definition, module.mod_key)
File "/usr/local/lib/python3.10/site-packages/ecs_composex/compose/x_resources/__init__.py", line 191, in validate_schema
_eval.validate(definition)
File "/usr/local/lib/python3.10/site-packages/jsonschema/validators.py", line 451, in validate
raise error
jsonschema.exceptions.ValidationError: '8080' is not of type 'integer'
The text was updated successfully, but these errors were encountered:
This actually seems more broad than just the port. Attempts to use environment variables almost anywhere a number is expected, results in an error, like the following:
Traceback (most recent call last):
File "/usr/local/bin/ecs-compose-x", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/ecs_composex/cli.py", line 194, in main
settings = ComposeXSettings(**vars(args))
File "/usr/local/lib/python3.10/site-packages/ecs_composex/common/settings.py", line 177, in __init__
self.set_content(kwargs, content)
File "/usr/local/lib/python3.10/site-packages/ecs_composex/common/settings.py", line 526, in set_content
content_def = ComposeDefinition(files, content)
File "/usr/local/lib/python3.10/site-packages/compose_x_render/compose_x_render.py", line 324, in __init__
jsonschema.validate(
File "/usr/local/lib/python3.10/site-packages/jsonschema/validators.py", line 1332, in validate
raise error
jsonschema.exceptions.ValidationError: '5' is not of type 'number'
Failed validating 'type' in schema['properties']['services']['patternProperties']['^[a-zA-Z0-9._-]+$']['properties']['healthcheck']['properties']['retries']:
{'type': 'number'}
On instance['services']['web']['healthcheck']['retries']:
'5'
Hello @dfrank-a
Apologies for the late reply, I had forgotten to click "Comment" :/
The reason you are seeing this issue is that your env vars even though look and feel like an int are in fact str and therefore they are not the expected type. I might have a look at trying to soften the schema to allow either only a string of with digits or numbers.
Using
docker run
and the latest image, the relevant snippet of my docker-compose file is:And
.env
containing:The text was updated successfully, but these errors were encountered: