@madewithremy/admin 0.1.65 → 0.1.67

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 CHANGED
@@ -4,16 +4,31 @@ What changed in `@madewithremy/admin`, newest first, each version under its own
4
4
 
5
5
  Versions before 0.1.44 aren't recorded here.
6
6
 
7
+ ## 0.1.67
8
+
9
+ ### Changed behavior
10
+
11
+ - `jewels train --wait` waits until the run ends, however long that takes: the platform ends every run, by the trainer's report or by failing one that has gone quiet. It used to give up after 45 minutes with "Timed out waiting for run", though a run may take two hours. Check: a script that relied on the 45-minute exit should poll `jewels run <runId>` itself and stop when it chooses.
12
+
7
13
  ## 0.1.65
8
14
 
9
15
  ### New
10
16
 
11
17
  - `infra.view`, an admin permission a method declares to read its own app's dedicated capacity through `createAdminClient()`: `infra.list`, `infra.get` and `infra.logs`, so the app can tell whether it runs on a database server of its own, which size, and whether it's parked. The changes (provision, hibernate, resume, resize, destroy, rename) stay a person's.
18
+ - A failed resource says where it failed and whether it's still being retried: `failedIn`, the phase it failed in, and `retrying`, false once it waits for a resume, a hibernate or a destroy.
19
+
20
+ ### Changed behavior
21
+
22
+ - A hibernated resource bills nothing, so the hibernated rate is gone from what `infra` answers: an offering's `hibernatedHourlyPriceDollars`, `hibernatedMonthlyPriceDollars` and `capabilities`, a resource's `billing.hibernatedHours`, and `hibernatedMonthlyDollars` in the `pricing` a provision or resize prints. Check code that reads any of them.
23
+ - `infra resize --wait` reports done only once the resource is on the size asked for. A resize the platform gave up on used to report done at the old size.
12
24
 
13
25
  ### Fixed
14
26
 
27
+ - `infra resume --wait` and `infra hibernate --wait` on a failed resource wait for the change. They returned `failed` at once, from the phase as it stood before the platform took its first step, while the change went on to complete. `waitForPhase` now waits through a failure the platform is still retrying and returns `failed` only once it has given up.
28
+ - `infra get` lists every database on a database server from the moment it's active. `databases` read `[]` until each database had been queried, so it couldn't say where the app's data lived.
15
29
  - `infra provision`, `hibernate`, `resume`, `destroy` and `resize` with `--wait` print one JSON value when the change fails or times out, the result with its `status` and the resource, as `releases wait` does. They printed it and then `{"error": …}` after it, so a caller reading the last value saw no status. The exit codes are unchanged: 1 when it failed, 2 on a timeout.
16
- - `infra resize` on a database server says its app's queries pause while it's parked and restored, where it said its sources' searches did.
30
+ - `infra resize` on a database server says its app's queries pause while it's hibernated and restored, where it said its sources' searches did.
31
+ - `infra --help` and the `infra` docs say "hibernate" and "the shared servers" throughout, where some lines said "park" and "the shared pool".
17
32
 
18
33
  ## 0.1.64
19
34
 
package/dist/index.js CHANGED
@@ -2460,7 +2460,7 @@ async function waitForPhase(ctx, params) {
2460
2460
  const arrived = (resource2) => wanted.has(resource2.phase) && (params.until?.(resource2) ?? true);
2461
2461
  const outcome = await pollUntil(
2462
2462
  async () => (await get8(ctx, { id: params.id })).resource,
2463
- (resource2) => arrived(resource2) || resource2.phase === "failed",
2463
+ (resource2) => arrived(resource2) || resource2.phase === "failed" && !resource2.retrying,
2464
2464
  {
2465
2465
  timeoutMs,
2466
2466
  pollMs: POLL_MS5,