@norskvideo/ctl-dev-kit 0.1.60 → 0.1.62

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.
@@ -69,9 +69,9 @@ jobs:
69
69
  run: |
70
70
  set -euo pipefail
71
71
  S3="https://s3.eu-west-1.amazonaws.com/norsk.video/norsk-ctl"
72
- ver="$(curl -fsSL "$S3/latest")"
72
+ ver="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$S3/latest")"
73
73
  echo "norsk-ctl latest channel -> $ver"
74
- curl -fsSL "$S3/$ver/norsk-ctl-$ver-linux-x64" -o "$RUNNER_TEMP/norsk-ctl"
74
+ curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$S3/$ver/norsk-ctl-$ver-linux-x64" -o "$RUNNER_TEMP/norsk-ctl"
75
75
  chmod +x "$RUNNER_TEMP/norsk-ctl"
76
76
  "$RUNNER_TEMP/norsk-ctl" --version || true
77
77
 
@@ -68,9 +68,9 @@ jobs:
68
68
  run: |
69
69
  set -euo pipefail
70
70
  S3="https://s3.eu-west-1.amazonaws.com/norsk.video/norsk-ctl"
71
- ver="$(curl -fsSL "$S3/latest")"
71
+ ver="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$S3/latest")"
72
72
  echo "norsk-ctl latest channel -> $ver"
73
- curl -fsSL "$S3/$ver/norsk-ctl-$ver-linux-x64" -o "$RUNNER_TEMP/norsk-ctl"
73
+ curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$S3/$ver/norsk-ctl-$ver-linux-x64" -o "$RUNNER_TEMP/norsk-ctl"
74
74
  chmod +x "$RUNNER_TEMP/norsk-ctl"
75
75
  "$RUNNER_TEMP/norsk-ctl" --version || true
76
76
 
@@ -72,6 +72,13 @@ jobs:
72
72
  # ports via the host-gateway alias and can join norsk-net for direct reach;
73
73
  # a bare-metal host runner (the GPU box) must stay on localhost + publish.
74
74
  # Detect rather than hardcode, so one byte-identical file serves both.
75
+ # NORSK_CTL_PRODUCT_REACH rides along because this step has already
76
+ # established the fact the daemon would otherwise sniff from its own
77
+ # cgroup: `product add --image` loopback-publishes the control plane and
78
+ # polls it for readiness, and on a DooD runner that loopback is the docker
79
+ # HOST's, so registration times out at 60s with nothing in the log saying
80
+ # why. The daemon's own detection stays the default; here the probe that
81
+ # already knows simply says so.
75
82
  - name: Probe runner docker topology and set NORSK_TEST_HOST + NORSK_NET_REACH
76
83
  run: |
77
84
  set -uo pipefail
@@ -80,10 +87,12 @@ jobs:
80
87
  echo "TOPO: hostname resolves to a container -> runner is containerized (DooD)"
81
88
  echo "NORSK_TEST_HOST=host.docker.internal" >> "$GITHUB_ENV"
82
89
  echo "NORSK_NET_REACH=direct" >> "$GITHUB_ENV"
90
+ echo "NORSK_CTL_PRODUCT_REACH=container-address" >> "$GITHUB_ENV"
83
91
  else
84
92
  echo "TOPO: hostname is not a container -> runner is host-based"
85
93
  echo "NORSK_TEST_HOST=localhost" >> "$GITHUB_ENV"
86
94
  echo "NORSK_NET_REACH=publish" >> "$GITHUB_ENV"
95
+ echo "NORSK_CTL_PRODUCT_REACH=host" >> "$GITHUB_ENV"
87
96
  fi
88
97
 
89
98
  - name: Write the Norsk license (from the org secret)
@@ -104,9 +113,9 @@ jobs:
104
113
  *) echo "unsupported runner arch: $(uname -m)" >&2; exit 1 ;;
105
114
  esac
106
115
  S3="https://s3.eu-west-1.amazonaws.com/norsk.video/norsk-ctl"
107
- ver="$(curl -fsSL "$S3/$channel")"
116
+ ver="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$S3/$channel")"
108
117
  echo "norsk-ctl $channel channel -> $ver ($arch)"
109
- curl -fsSL "$S3/$ver/norsk-ctl-$ver-$arch" -o "$RUNNER_TEMP/norsk-ctl"
118
+ curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$S3/$ver/norsk-ctl-$ver-$arch" -o "$RUNNER_TEMP/norsk-ctl"
110
119
  chmod +x "$RUNNER_TEMP/norsk-ctl"
111
120
  "$RUNNER_TEMP/norsk-ctl" --version
112
121
 
@@ -69,7 +69,7 @@ jobs:
69
69
 
70
70
  # The runner has no npm; read the dist-tag off the registry with curl+jq
71
71
  # (same as upgrade-latest.yml resolves the Norsk nightly).
72
- new="$(curl -fsSL "$reg/$enc" | jq -r '."dist-tags".latest')"
72
+ new="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$reg/$enc" | jq -r '."dist-tags".latest')"
73
73
  [ -n "$new" ] && [ "$new" != "null" ] || { echo "could not resolve $pkg latest"; exit 1; }
74
74
 
75
75
  # The current pin, whatever its range operator. A repo with no dev-kit
@@ -72,7 +72,7 @@ jobs:
72
72
  # every occurrence (overrides, sub-package deps, manifest image ref,
73
73
  # version-pin test) EXCEPT the lockfile, which bun install regenerates.
74
74
  old_media="$(jq -r '.latest.media | split(":")[1]' manifest.seed.json)"
75
- new_media="$(curl -fsSL "$reg/@norskvideo%2Fnorsk-sdk" | jq -r '."dist-tags".nightly')"
75
+ new_media="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$reg/@norskvideo%2Fnorsk-sdk" | jq -r '."dist-tags".nightly')"
76
76
  [ -n "$new_media" ] && [ "$new_media" != "null" ] || { echo "could not resolve norsk-sdk nightly"; exit 1; }
77
77
  echo "media: $old_media -> $new_media"
78
78
  if [ "$old_media" != "$new_media" ]; then
@@ -105,7 +105,7 @@ jobs:
105
105
  if [ "$(printf '%s' "$old_studio_lib" | grep -c .)" -gt 1 ]; then
106
106
  echo "studio npm pins disagree across package.json files:"; echo "$old_studio_lib"; exit 1
107
107
  fi
108
- new_studio_lib="$(curl -fsSL "$reg/@norskvideo%2Fnorsk-studio" | jq -r '."dist-tags".nightly')"
108
+ new_studio_lib="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$reg/@norskvideo%2Fnorsk-studio" | jq -r '."dist-tags".nightly')"
109
109
  [ -n "$new_studio_lib" ] && [ "$new_studio_lib" != "null" ] || { echo "could not resolve norsk-studio npm nightly"; exit 1; }
110
110
  studio_line="${new_studio_lib%%-*}" # e.g. 1.28.0 — keep the image on this line
111
111
  old_studio_img="$(jq -r '.latest.studio | split(":")[1]' manifest.seed.json)"
@@ -123,9 +123,9 @@ jobs:
123
123
  # the same digest. The moving tag is not pinnable itself: it moves under
124
124
  # you, and a launch has to record the exact image it ran.
125
125
  hub="https://hub.docker.com/v2/repositories/norskvideo/norsk-studio"
126
- nightly_digest="$(curl -fsSL "$hub/tags/nightly" | jq -r '.digest // empty')"
126
+ nightly_digest="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$hub/tags/nightly" | jq -r '.digest // empty')"
127
127
  [ -n "$nightly_digest" ] || { echo "could not resolve the norsk-studio nightly tag's digest"; exit 1; }
128
- new_studio_img="$(curl -fsSL "$hub/tags?page_size=100&ordering=last_updated" \
128
+ new_studio_img="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$hub/tags?page_size=100&ordering=last_updated" \
129
129
  | jq -r --arg d "$nightly_digest" '.results[] | select(.digest == $d) | .name' \
130
130
  | grep -E "^${studio_line}-[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9a-f]+$" | head -1 || true)"
131
131
  [ -n "$new_studio_img" ] || {
@@ -161,12 +161,12 @@ jobs:
161
161
  # packages/dev-kit/build/refresh-ctl-pin.sh in the ctl monorepo.
162
162
  ctl_base="https://s3.eu-west-1.amazonaws.com/norsk.video/norsk-ctl"
163
163
  old_ctl="$(grep -oE 'ctlVersion = "[^"]+"' flake.nix | sed -E 's/.*"(.*)"/\1/')"
164
- new_ctl="$(curl -fsSL "$ctl_base/latest")"
164
+ new_ctl="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$ctl_base/latest")"
165
165
  if [ -n "$new_ctl" ] && [ "$old_ctl" != "$new_ctl" ]; then
166
166
  declare -A ctlplat=([x86_64-linux]=linux-x64 [aarch64-linux]=linux-arm64 [aarch64-darwin]=darwin-arm64 [x86_64-darwin]=darwin-x64)
167
167
  for sys in "${!ctlplat[@]}"; do
168
168
  p="${ctlplat[$sys]}"
169
- hex="$(curl -fsSL "$ctl_base/$new_ctl/norsk-ctl-$new_ctl-$p.sha256" | awk '{print $1}')"
169
+ hex="$(curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 "$ctl_base/$new_ctl/norsk-ctl-$new_ctl-$p.sha256" | awk '{print $1}')"
170
170
  [ -n "$hex" ] || { echo "no sha256 sidecar for $p"; exit 1; }
171
171
  sri="$(nix hash convert --hash-algo sha256 --to sri "$hex")"
172
172
  perl -0pi -e "s{(plat = \"$p\";\\s*hash = \")[^\"]*(\")}{\${1}$sri\${2}}" flake.nix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-dev-kit",
3
- "version": "0.1.60",
3
+ "version": "0.1.62",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",