werkmeister-core 0.89.3 → 0.90.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/scheduler.js +6 -2
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# sandbox-core
|
|
2
2
|
|
|
3
|
+
## 0.90.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c08040c: A starved queue head no longer deadlocks with the feature it waits on (SW-699). A services start from a feature whose gate is running (its lease is busy) now starts past a queue head that holds the line, when it fits: it is how that gate ends and frees the room the head waits for. Before, a head waiting on a busy gate's lease and that gate's own request for one more service each waited on the other until someone stopped a container by hand.
|
|
8
|
+
|
|
9
|
+
## 0.90.0
|
|
10
|
+
|
|
3
11
|
## 0.89.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/scheduler.js
CHANGED
|
@@ -49,8 +49,12 @@ export function admit(budget, running, queue, req) {
|
|
|
49
49
|
const position = order.indexOf(self) + 1;
|
|
50
50
|
const isHead = position === 1;
|
|
51
51
|
// Backfill: what fits starts past a head that doesn't, unless the head is a gate (it frees its whole
|
|
52
|
-
// feature soonest) or has waited STARVE_MS (SW-675).
|
|
53
|
-
|
|
52
|
+
// feature soonest) or has waited STARVE_MS (SW-675). Never against a service start of a busy
|
|
53
|
+
// feature: it is how its gate ends and frees the lease the head may be waiting on (SW-699).
|
|
54
|
+
// shortcut: busy also covers a gate exec in the last idle_stop_minutes, so a recent gate's later
|
|
55
|
+
// --service start passes too; tighten to a live-gate signal if heads starve again.
|
|
56
|
+
const endsGate = !!req.services && running.some((l) => l.feature === req.feature && l.busy);
|
|
57
|
+
const headHolds = !isHead && !endsGate && (order[0].gate || order[0].waitedMs >= STARVE_MS);
|
|
54
58
|
if (fits({ memory: 0, cpus: 0 }) && (req.byPerson || !headHolds))
|
|
55
59
|
return { kind: "admit" };
|
|
56
60
|
// An idle or human-check lease (a session parked on a question) has nobody in it, so the queue head
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "werkmeister-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.90.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "werkmeister's shared library. Its public API is werkmeister-core/sdk; every other entry point is internal.",
|
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"typecheck": "tsc --noEmit",
|
|
126
126
|
"docs:links": "typedoc",
|
|
127
127
|
"docs:sdk": "typedoc --options typedoc.sdk.json",
|
|
128
|
-
"test": "sh ./run-tests.sh"
|
|
128
|
+
"test": "sh ./run-tests.sh",
|
|
129
|
+
"test:changed": "node test-changed.mjs"
|
|
129
130
|
}
|
|
130
131
|
}
|