Steps to reproduce
- Save this task configuration as
task.dstack.yml:
type: task
commands:
- echo hi
ports:
- 65536
- Run
dstack apply -f task.dstack.yml.
The same issue occurs with a service configuration that sets port: 65536, and with port mappings such as 65536:80 and 80:65536.
Actual behaviour
The configuration is accepted. The invalid port is converted to a port mapping and reaches the run specification instead of being rejected by CLI configuration validation.
Expected behaviour
dstack apply should reject every port above 65535 before it requests an apply plan. TCP and UDP port numbers are in the range 1 through 65535.
dstack version
master at ccef71f46b8e61ce3c139d3c147911b6dd19f8a2
Server logs
Not applicable: the invalid value passes client-side configuration validation.
Additional information
The shared ValidPort constraint currently accepts 65536, so the problem affects task port lists, port mappings, and service ports.
Steps to reproduce
task.dstack.yml:dstack apply -f task.dstack.yml.The same issue occurs with a service configuration that sets
port: 65536, and with port mappings such as65536:80and80:65536.Actual behaviour
The configuration is accepted. The invalid port is converted to a port mapping and reaches the run specification instead of being rejected by CLI configuration validation.
Expected behaviour
dstack applyshould reject every port above 65535 before it requests an apply plan. TCP and UDP port numbers are in the range 1 through 65535.dstack version
masteratccef71f46b8e61ce3c139d3c147911b6dd19f8a2Server logs
Not applicable: the invalid value passes client-side configuration validation.
Additional information
The shared
ValidPortconstraint currently accepts 65536, so the problem affects task port lists, port mappings, and service ports.