SaaS tidying (#6665)

# Description of Changes
* Remove complex port selection logic from `engine.yml`. It's
inconsistent with the frontend & backend task files, and caused issues
with Docker, which have been worked around but would be simpler to just
get rid of the problem altogether
* Fix Ruff formatting of Python script
* Remove payg tests which are failing and have drifted too far from the
implementation to save directly
This commit is contained in:
James Brunton
2026-06-15 13:21:33 +01:00
committed by GitHub
parent c1a637d764
commit 2a905c01c3
10 changed files with 220 additions and 1066 deletions
+2 -43
View File
@@ -1,12 +1,5 @@
version: '3'
vars:
# Engine-specific names to avoid overriding the root Taskfile's FIND_FREE_PORT_*
# vars (Task merges included-file vars into the global scope).
# Paths are relative to the engine/ include dir.
ENGINE_FIND_FREE_PORT_SH: "bash ../scripts/find-free-port.sh"
ENGINE_FIND_FREE_PORT_PS: "powershell -NoProfile -File ../scripts/find-free-port.ps1"
tasks:
install:
desc: "Install engine dependencies"
@@ -36,24 +29,7 @@ tasks:
ignore_error: true
dir: src
vars:
# When PORT is provided (e.g. from dev:all), use it directly.
# With ENGINE_PORT_PROBE=false (Docker), use the fixed STIRLING_ENGINE_PORT
# (default 5001) without probing. Otherwise probe for a free port from 5001.
PORT:
sh: |
if [ -n "{{.PORT}}" ]; then
echo "{{.PORT}}"
elif [ -f /.dockerenv ] || [ "${ENGINE_PORT_PROBE:-true}" = "false" ]; then
# Never probe in a container: the port is fixed and the probe script
# isn't shipped in the image. /.dockerenv auto-detects Docker; the
# ENGINE_PORT_PROBE=false flag forces fixed-port mode anywhere else.
# The probe is a dev-only convenience for avoiding local port clashes.
echo "${STIRLING_ENGINE_PORT:-5001}"
elif [ "{{OS}}" = "windows" ]; then
{{.ENGINE_FIND_FREE_PORT_PS}} 5001
else
{{.ENGINE_FIND_FREE_PORT_SH}} 5001
fi
PORT: '{{.PORT | default "5001"}}'
env:
PYTHONUNBUFFERED: "1"
cmds:
@@ -65,24 +41,7 @@ tasks:
ignore_error: true
dir: src
vars:
# When PORT is provided (e.g. from dev:all), use it directly.
# With ENGINE_PORT_PROBE=false (Docker), use the fixed STIRLING_ENGINE_PORT
# (default 5001) without probing. Otherwise probe for a free port from 5001.
PORT:
sh: |
if [ -n "{{.PORT}}" ]; then
echo "{{.PORT}}"
elif [ -f /.dockerenv ] || [ "${ENGINE_PORT_PROBE:-true}" = "false" ]; then
# Never probe in a container: the port is fixed and the probe script
# isn't shipped in the image. /.dockerenv auto-detects Docker; the
# ENGINE_PORT_PROBE=false flag forces fixed-port mode anywhere else.
# The probe is a dev-only convenience for avoiding local port clashes.
echo "${STIRLING_ENGINE_PORT:-5001}"
elif [ "{{OS}}" = "windows" ]; then
{{.ENGINE_FIND_FREE_PORT_PS}} 5001
else
{{.ENGINE_FIND_FREE_PORT_SH}} 5001
fi
PORT: '{{.PORT | default "5001"}}'
env:
PYTHONUNBUFFERED: "1"
cmds: