@or3/cloud 0.1.62 → 0.1.63

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.
@@ -643,36 +643,8 @@ async function completeOperatorHandoff(jobId, project) {
643
643
  ) {
644
644
  const environment = await deploymentEnv();
645
645
  if (envValue(environment, 'OR3_DASHBOARD_UPDATES_ENABLED') !== 'true') return;
646
- const serviceFilters = [
647
- '--filter', `label=com.docker.compose.project=${project}`,
648
- '--filter', 'label=com.docker.compose.service=or3-operator',
649
- ];
650
646
  let lastOutput = '';
651
647
  for (let attempt = 0; attempt < 6; attempt += 1) {
652
- // Old protocol-v1 operators may start their own Compose replacement
653
- // after writing the terminal job. Removing every container for this
654
- // one stateless service also kills that in-container Compose child and
655
- // clears any half-created successor without touching the application.
656
- for (let sweep = 0; sweep < 2; sweep += 1) {
657
- const listed = await runProcess('docker', ['ps', '-aq', ...serviceFilters], {
658
- cwd: deploymentDirectory,
659
- env: process.env,
660
- timeoutMs: 30_000,
661
- });
662
- lastOutput = listed.output;
663
- const containerIds = listed.code === 0
664
- ? listed.output.split(/\s+/).filter((value) => /^[0-9a-f]{12,64}$/i.test(value))
665
- : [];
666
- if (containerIds.length > 0) {
667
- const removed = await runProcess('docker', ['rm', '--force', ...containerIds], {
668
- cwd: deploymentDirectory,
669
- env: process.env,
670
- timeoutMs: 30_000,
671
- });
672
- lastOutput = `${lastOutput}\n${removed.output}`.trim();
673
- }
674
- await delay(750);
675
- }
676
648
  const compose = [
677
649
  'compose',
678
650
  '--project-name', project,
@@ -681,7 +653,10 @@ async function completeOperatorHandoff(jobId, project) {
681
653
  '-f', join(deploymentDirectory, 'compose.yaml'),
682
654
  '-f', join(deploymentDirectory, 'compose.operator.yaml'),
683
655
  ];
684
- const restarted = await runProcess('docker', [...compose, 'up', '-d', '--no-deps', 'or3-operator'], {
656
+ // Compose owns the replacement transaction. Removing the current
657
+ // operator first creates an avoidable gap and, on some daemons, races
658
+ // the service's restart policy so that no successor remains.
659
+ const restarted = await runProcess('docker', [...compose, 'up', '-d', '--no-deps', '--force-recreate', 'or3-operator'], {
685
660
  cwd: deploymentDirectory,
686
661
  env: process.env,
687
662
  timeoutMs: 60_000,
package/dist/cli.mjs CHANGED
@@ -30,7 +30,7 @@ import { fileURLToPath } from "node:url";
30
30
  import { createGunzip } from "node:zlib";
31
31
  var execFile = promisify(execFileCallback);
32
32
  var PACKAGE_ROOT = resolve(fileURLToPath(new URL("../", import.meta.url)));
33
- var PACKAGE_VERSION = "0.1.62";
33
+ var PACKAGE_VERSION = "0.1.63";
34
34
  var IMAGE_REPOSITORY = "ghcr.io/saluana/or3-chat";
35
35
  var ASSET_ROOT = resolve(fileURLToPath(new URL("../assets/", import.meta.url)));
36
36
  var STATE_SCHEMA_VERSION = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@or3/cloud",
3
- "version": "0.1.62",
3
+ "version": "0.1.63",
4
4
  "description": "Install and operate the OR3 Cloud container distribution",
5
5
  "type": "module",
6
6
  "license": "GPL-3.0",
@@ -18,9 +18,9 @@
18
18
  "or3Cloud": {
19
19
  "dashboardUpdateProtocol": 1,
20
20
  "dashboardUpdateMinimumSourceVersion": "0.1.40",
21
- "imageDigest": "sha256:68dc1c0019447d7a842ca8254fd94908e7f88c1983aff49b12753dffccf89c37",
22
- "operatorImageDigest": "sha256:86b0020a023d1aa88fb78ed7deaac7864350ffe04dcbe151c9dc28e8ec436c85",
23
- "sourceRevision": "567ef7f1bd650f0f1327ae7dae588c7167ee9fac"
21
+ "imageDigest": "sha256:5e2dd31369dfc365a5774d67effc4eb7a876a40a45aedeb20982a585652bd206",
22
+ "operatorImageDigest": "sha256:ab9d864b630b6e05db05e45041a25153b82b95e735f7a1579ff5edcfebbf84f8",
23
+ "sourceRevision": "a14ddda64808ec91056d9f003589bd5b04986edf"
24
24
  },
25
25
  "files": [
26
26
  "dist",