Commit 1462fa1
authored
Treat pre-releases as final releases in feature gates (#4296)
`_parse_version` returned `None` for any pre-release or dev build, which
`_check_min_version` interprets as "latest", opening every feature gate.
Since we publish rc builds (e.g. `0.21.4rc1`), a shim or runner on an rc
was assumed to support features it does not have. For example, a shim on
`0.20.25rc1` passed the `(0, 21, 3)` gate for restart-safe RUNNING tasks,
letting the server restart a shim with running jobs on it.
Ignore the pre-release, dev, post-release, and local segments instead, so
`0.20.1rc1` is treated as `0.20.1`. An rc is cut from the release branch,
so it normally carries the features of the version it leads to. Bare run
numbers of staging builds (e.g. `1234`) still resolve to "latest".1 parent abb8ce8 commit 1462fa1
2 files changed
Lines changed: 20 additions & 16 deletions
File tree
- src
- dstack/_internal/server/services/runner
- tests/_internal/server/services/runner
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
855 | 855 | | |
856 | 856 | | |
857 | 857 | | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
865 | 864 | | |
866 | 865 | | |
867 | 866 | | |
868 | 867 | | |
869 | 868 | | |
870 | | - | |
871 | | - | |
872 | 869 | | |
873 | 870 | | |
874 | 871 | | |
| |||
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
248 | 247 | | |
249 | 248 | | |
250 | 249 | | |
| |||
687 | 686 | | |
688 | 687 | | |
689 | 688 | | |
690 | | - | |
691 | | - | |
692 | | - | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
693 | 700 | | |
694 | 701 | | |
695 | 702 | | |
| |||
0 commit comments