open-nomad/api
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
..
contexts sync 2017-10-13 14:36:02 -07:00
internal/testutil Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
acl.go Self token lookup 2017-10-13 13:12:20 -07:00
acl_test.go Self token lookup 2017-10-13 13:12:20 -07:00
agent.go address feedback, fix gauge metric name 2019-11-05 09:51:57 -05:00
agent_test.go monitor command takes no args 2019-11-05 09:51:55 -05:00
allocations.go cli: recover from client ACL lookup failures 2019-10-04 11:23:59 -04:00
allocations_test.go api: avoid depending on helper internal package 2019-11-12 11:02:33 -05:00
api.go Remove response body from websocket error 2019-11-08 09:28:02 -05:00
api_test.go api: avoid depending on helper internal package 2019-11-12 11:02:33 -05:00
compose_test.go fix tests from introducing new struct fields 2019-07-31 01:03:16 -04:00
constraint.go core: add semver constraint 2019-11-19 08:40:19 -08:00
constraint_test.go Parallel 2017-07-21 16:33:04 -07:00
deployments.go code review fixes 2018-05-31 10:57:08 -07:00
evaluations.go add create and modify timestamps to evaluations (#5881) 2019-08-07 09:50:35 -07:00
evaluations_test.go non-Existent -> nonexistent 2018-03-12 11:59:33 -07:00
fs.go cli: recover from client ACL lookup failures 2019-10-04 11:23:59 -04:00
fs_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
go.mod api: go-uuid is no longer needed 2019-11-12 11:02:33 -05:00
go.sum api: go-uuid is no longer needed 2019-11-12 11:02:33 -05:00
jobs.go Escape job ID in API requests (#2411) 2019-11-07 08:35:39 -05:00
jobs_test.go Escape job ID in API requests (#2411) 2019-11-07 08:35:39 -05:00
namespace.go sync 2017-10-13 14:36:02 -07:00
namespace_test.go sync 2017-09-19 10:08:23 -05:00
nodes.go api: add StartedAt in Node.DrainStrategy 2019-11-13 17:54:40 -05:00
nodes_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
operator.go Rename to match system scheduler config. 2019-05-03 14:06:12 -05:00
operator_autopilot.go Fix make check errors 2018-09-04 16:03:52 -07:00
operator_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
quota.go sync 2017-10-13 14:36:02 -07:00
quota_test.go sync 2017-10-13 14:36:02 -07:00
raw.go
regions.go fix a copy/paste error on api.Regions() comment 2017-01-17 22:48:01 -08:00
regions_test.go Divest api/ package of deps elsewhere in the nomad repo. (#5488) 2019-03-29 14:47:40 -04:00
resources.go cli: display group ports and address in alloc status command output (#6189) 2019-08-27 23:59:36 -04:00
search.go Search respects QueryOptions and returns QueryMeta 2017-08-27 22:17:51 -07:00
search_test.go Add new reschedule options to API layer and unit tests 2018-03-14 16:10:32 -05:00
sentinel.go sync 2017-09-19 10:08:23 -05:00
sentinel_test.go sync 2017-09-19 10:08:23 -05:00
services.go connect: enable setting tags on consul connect sidecar service in jobspec (#6415) 2019-10-17 19:25:20 +00:00
services_test.go client/connect: ConsulProxy LocalServicePort/Address (#6358) 2019-09-23 14:30:48 -04:00
status.go
status_test.go Parallel 2017-07-21 16:33:04 -07:00
system.go Add missing ReconcileSummaries API method 2017-08-24 11:55:10 +02:00
system_test.go Parallel 2017-07-21 16:33:04 -07:00
tasks.go volumes: Add support for mount propagation 2019-10-14 14:09:58 +02:00
tasks_test.go volumes: Add support for mount propagation 2019-10-14 14:09:58 +02:00
util_test.go api: avoid depending on helper internal package 2019-11-12 11:02:33 -05:00
utils.go Update comment on int8ToPtr 2019-01-30 12:23:14 -08:00
utils_test.go api: move formatFloat function 2019-01-18 15:31:31 -05:00