open-nomad/jobspec
Michael Schurter 796758b8a5 core: add semver constraint
The existing version constraint uses logic optimized for package
managers, not schedulers, when checking prereleases:

- 1.3.0-beta1 will *not* satisfy ">= 0.6.1"
- 1.7.0-rc1 will *not* satisfy ">= 1.6.0-beta1"

This is due to package managers wishing to favor final releases over
prereleases.

In a scheduler versions more often represent the earliest release all
required features/APIs are available in a system. Whether the constraint
or the version being evaluated are prereleases has no impact on
ordering.

This commit adds a new constraint - `semver` - which will use Semver
v2.0 ordering when evaluating constraints. Given the above examples:

- 1.3.0-beta1 satisfies ">= 0.6.1" using `semver`
- 1.7.0-rc1 satisfies ">= 1.6.0-beta1" using `semver`

Since existing jobspecs may rely on the old behavior, a new constraint
was added and the implicit Consul Connect and Vault constraints were
updated to use it.
2019-11-19 08:40:19 -08:00
..
test-fixtures core: add semver constraint 2019-11-19 08:40:19 -08:00
parse.go core: add semver constraint 2019-11-19 08:40:19 -08:00
parse_group.go quota: parse network stanza in quotas (#6511) 2019-10-24 10:41:54 -04:00
parse_job.go Add sidecar_task stanza parsing (#6104) 2019-08-09 15:18:53 -04:00
parse_network.go quota: parse network stanza in quotas (#6511) 2019-10-24 10:41:54 -04:00
parse_service.go connect: enable setting tags on consul connect sidecar service in jobspec (#6415) 2019-10-17 19:25:20 +00:00
parse_task.go quota: parse network stanza in quotas (#6511) 2019-10-24 10:41:54 -04:00
parse_test.go core: add semver constraint 2019-11-19 08:40:19 -08:00
utils.go consul: add Connect structs 2019-08-06 08:15:07 -07:00
utils_test.go consul: add Connect structs 2019-08-06 08:15:07 -07:00