dbb8f6e006713f43b7dbd6100d3b5c024dc72766
braney
  Fri Sep 18 11:11:15 2026 -0700
weeklybld: let the docker instance scripts run a past release, refs #38377

We could not reproduce a bug against the release a user is actually on.
hgwdev runs tip and the current release, and nothing older. Docker Hub
already has a per-release image, so the missing piece was a way to run one.

The lifecycle scripts now take a release name as well as tip, beta and rel.
run-instance.sh v503 starts the published v503 image as container kent-v503
on port 8503; the port is 8000 plus the release number, so the mapping needs
no table and no allocator. A release instance gets no CGI overlay, for the
same reason rel gets none: it has to be the code that shipped.
refresh-instance.sh, remove-instance.sh and smoke-instance.sh take the same
name. smoke-instance.sh checks a release instance against the version in its
own name, so no --version flag is needed. start-all.sh and stop-all.sh now
read the release containers that exist rather than a fixed list, so the set
of releases we keep can change without editing them.

tunnel-release.sh is one script for every release rather than one per
release, since that set changes.

v499 through v503 are running on hgwdev on ports 8499 through 8503 and pass
smoke-instance.sh. Five instances cost about 1.5 GB of memory, 10 GB of
docker disk, and no measurable CPU. They read tables from
genome-mysql.soe.ucsc.edu and files from hgdownload.soe.ucsc.edu, so they
put no load on the hgwdev MySQL or /gbdb.

diff --git src/utils/qa/weeklybld/tunnel-release.sh src/utils/qa/weeklybld/tunnel-release.sh
new file mode 100755
index 00000000000..0ac98faadbd
--- /dev/null
+++ src/utils/qa/weeklybld/tunnel-release.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# tunnel-release.sh <vNNN>
+#
+# Open an ssh tunnel from this machine to a past-release docker container on
+# hgwdev, e.g. tunnel-release.sh v503. After running, point a browser at
+# http://localhost:8NNN to reach the Genome Browser exactly as that release
+# shipped it. Ctrl-C to close the tunnel.
+#
+# There is one script for every release rather than one per release, because
+# which releases we keep changes every few weeks. The port encodes the release
+# the same way run-instance.sh assigns it: v503 -> 8503.
+# refs #38377
+#
+set -eu
+
+usage() {
+    echo "usage: $(basename "$0") vNNN    (e.g. $(basename "$0") v503)" >&2
+    exit 1
+}
+
+[[ $# -eq 1 ]] || usage
+name="$1"
+[[ "$name" =~ ^v[0-9][0-9][0-9]$ ]] || usage
+
+HOST="${HGWDEV:-hgwdev.gi.ucsc.edu}"
+PORT=$(( 8000 + 10#${name#v} ))
+
+cat <<EOF2
+Opening ssh tunnel: localhost:$PORT -> $HOST kent-$name container.
+
+While this terminal stays open, point your browser at:
+
+    http://localhost:$PORT/cgi-bin/hgGateway
+
+Other useful entry points:
+    http://localhost:$PORT/cgi-bin/hgTracks
+    http://localhost:$PORT/cgi-bin/hgsid
+
+Leave this window running. Ctrl-C closes the tunnel.
+
+EOF2
+exec ssh -N -L "$PORT:localhost:$PORT" "$HOST"