From e59ccd9f7656121db3852d0828201b2d507f83e2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Mar 2026 06:35:48 +0000 Subject: [PATCH 1/5] Initial plan From 53b59f6cd052acccaec6b80a63a12bfe2aa2c569 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Mar 2026 06:39:27 +0000 Subject: [PATCH 2/5] Update docker and act if newer versions are available in run_workflows_locally.sh Agent-Logs-Url: https://github.com/gensyn/ssh_docker/sessions/987434b9-a622-447f-b6ca-13e867181dc0 Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com> --- run_workflows_locally.sh | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/run_workflows_locally.sh b/run_workflows_locally.sh index 26ebaab..11a83d2 100755 --- a/run_workflows_locally.sh +++ b/run_workflows_locally.sh @@ -30,10 +30,24 @@ header() { echo -e "\n${BOLD}$*${NC}"; } command_exists() { command -v "$1" &>/dev/null; } -# ── Docker installation ─────────────────────────────────────────────────────── +# ── Docker installation / update ───────────────────────────────────────────── install_docker() { if command_exists docker; then info "Docker is already installed: $(sudo docker --version)" + info "Checking for Docker updates…" + if command_exists apt-get; then + sudo apt-get update -qq \ + && sudo apt-get install --only-upgrade -y \ + docker-ce docker-ce-cli containerd.io docker-compose-plugin \ + || true + elif command_exists yum; then + sudo yum update -y \ + docker-ce docker-ce-cli containerd.io docker-compose-plugin \ + || true + else + warn "Cannot automatically update Docker on this platform; please update it manually." + fi + info "Docker version after update check: $(sudo docker --version)" return 0 fi @@ -43,10 +57,28 @@ install_docker() { warn "Docker installed. You may need to run 'newgrp docker' or re-login for group membership to take effect." } -# ── act installation ────────────────────────────────────────────────────────── +# ── act installation / update ───────────────────────────────────────────────── install_act() { if command_exists act; then - info "act is already installed: $(act --version)" + local current_version latest_version + current_version="$(act --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" + latest_version="$(curl -fsSL https://api.github.com/repos/nektos/act/releases/latest 2>/dev/null \ + | grep '"tag_name"' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" + + if [[ -z "$current_version" ]] || [[ -z "$latest_version" ]]; then + warn "Could not determine act versions; skipping update check." + info "act is already installed: $(act --version)" + return 0 + fi + + if [[ "$current_version" == "$latest_version" ]]; then + info "act is already up to date: $(act --version)" + return 0 + fi + + header "Updating act from ${current_version} to ${latest_version}…" + curl -fsSL https://raw.githubusercontent.com/nektos/act/master/install.sh \ + | sudo bash -s -- -b /usr/local/bin return 0 fi From e671e4bb8d0ed2c4d39a68d37914688349b1e756 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Mar 2026 06:55:35 +0000 Subject: [PATCH 3/5] Move install/update logic for docker and act into run_playwright_tests.sh Agent-Logs-Url: https://github.com/gensyn/ssh_docker/sessions/f73153da-1dc4-4342-8cec-7f6f255cfcff Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com> --- run_playwright_tests.sh | 84 ++++++++++++++++++++++++++++++++++++++++ run_workflows_locally.sh | 38 ++---------------- 2 files changed, 87 insertions(+), 35 deletions(-) diff --git a/run_playwright_tests.sh b/run_playwright_tests.sh index 5f2c58a..8ce636d 100755 --- a/run_playwright_tests.sh +++ b/run_playwright_tests.sh @@ -29,6 +29,86 @@ header() { echo -e "\n${BOLD}$*${NC}"; } SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" COMPOSE_FILE="$SCRIPT_DIR/docker-compose.yaml" +command_exists() { command -v "$1" &>/dev/null; } + +# ── Docker installation / update ───────────────────────────────────────────── +install_docker() { + if command_exists docker; then + info "Docker is already installed: $(sudo docker --version)" + info "Checking for Docker updates…" + if command_exists apt-get; then + sudo apt-get update -qq \ + && sudo apt-get install --only-upgrade -y \ + docker-ce docker-ce-cli containerd.io docker-compose-plugin \ + || true + elif command_exists yum; then + sudo yum update -y \ + docker-ce docker-ce-cli containerd.io docker-compose-plugin \ + || true + else + warn "Cannot automatically update Docker on this platform; please update it manually." + fi + info "Docker version after update check: $(sudo docker --version)" + return 0 + fi + + header "Installing Docker…" + curl -fsSL https://get.docker.com | sudo sh + sudo usermod -aG docker "$USER" || true + warn "Docker installed. You may need to run 'newgrp docker' or re-login for group membership to take effect." +} + +# ── act installation / update ───────────────────────────────────────────────── +install_act() { + if command_exists act; then + local current_version latest_version + current_version="$(act --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" + latest_version="$(curl -fsSL https://api.github.com/repos/nektos/act/releases/latest 2>/dev/null \ + | grep '"tag_name"' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" + + if [[ -z "$current_version" ]] || [[ -z "$latest_version" ]]; then + [[ -z "$current_version" ]] && warn "Could not determine the installed act version; skipping update check." + [[ -z "$latest_version" ]] && warn "Could not determine the latest act version (network issue?); skipping update check." + info "act is already installed: $(act --version)" + return 0 + fi + + if [[ "$current_version" == "$latest_version" ]]; then + info "act is already up to date: $(act --version)" + return 0 + fi + + header "Updating act from ${current_version} to ${latest_version}…" + curl -fsSL https://raw.githubusercontent.com/nektos/act/master/install.sh \ + | sudo bash -s -- -b /usr/local/bin + return 0 + fi + + header "Installing act…" + curl -fsSL https://raw.githubusercontent.com/nektos/act/master/install.sh \ + | sudo bash -s -- -b /usr/local/bin +} + +# ── Docker daemon check ─────────────────────────────────────────────────────── +ensure_docker_running() { + if sudo docker info &>/dev/null; then + return 0 + fi + + warn "Docker daemon is not running – attempting to start it…" + if command_exists systemctl; then + sudo systemctl start docker + else + sudo service docker start + fi + sleep 3 # give the daemon a moment to become ready before re-checking + + if ! sudo docker info &>/dev/null; then + error "Docker daemon is still not running. Please start Docker manually and re-run this script." + exit 1 + fi +} + # ── Resolve docker compose command ─────────────────────────────────────────── get_compose_cmd() { if command -v docker &>/dev/null && sudo docker compose version &>/dev/null 2>&1; then @@ -56,6 +136,10 @@ main() { header " Playwright E2E tests (docker compose)" header "════════════════════════════════════════════════════" + install_docker + install_act + ensure_docker_running + local compose_cmd compose_cmd="$(get_compose_cmd)" diff --git a/run_workflows_locally.sh b/run_workflows_locally.sh index 11a83d2..26ebaab 100755 --- a/run_workflows_locally.sh +++ b/run_workflows_locally.sh @@ -30,24 +30,10 @@ header() { echo -e "\n${BOLD}$*${NC}"; } command_exists() { command -v "$1" &>/dev/null; } -# ── Docker installation / update ───────────────────────────────────────────── +# ── Docker installation ─────────────────────────────────────────────────────── install_docker() { if command_exists docker; then info "Docker is already installed: $(sudo docker --version)" - info "Checking for Docker updates…" - if command_exists apt-get; then - sudo apt-get update -qq \ - && sudo apt-get install --only-upgrade -y \ - docker-ce docker-ce-cli containerd.io docker-compose-plugin \ - || true - elif command_exists yum; then - sudo yum update -y \ - docker-ce docker-ce-cli containerd.io docker-compose-plugin \ - || true - else - warn "Cannot automatically update Docker on this platform; please update it manually." - fi - info "Docker version after update check: $(sudo docker --version)" return 0 fi @@ -57,28 +43,10 @@ install_docker() { warn "Docker installed. You may need to run 'newgrp docker' or re-login for group membership to take effect." } -# ── act installation / update ───────────────────────────────────────────────── +# ── act installation ────────────────────────────────────────────────────────── install_act() { if command_exists act; then - local current_version latest_version - current_version="$(act --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" - latest_version="$(curl -fsSL https://api.github.com/repos/nektos/act/releases/latest 2>/dev/null \ - | grep '"tag_name"' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" - - if [[ -z "$current_version" ]] || [[ -z "$latest_version" ]]; then - warn "Could not determine act versions; skipping update check." - info "act is already installed: $(act --version)" - return 0 - fi - - if [[ "$current_version" == "$latest_version" ]]; then - info "act is already up to date: $(act --version)" - return 0 - fi - - header "Updating act from ${current_version} to ${latest_version}…" - curl -fsSL https://raw.githubusercontent.com/nektos/act/master/install.sh \ - | sudo bash -s -- -b /usr/local/bin + info "act is already installed: $(act --version)" return 0 fi From 5891708d4a598297c5cc4b85c0df0e5849476b7a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:00:37 +0000 Subject: [PATCH 4/5] Revert: restore update logic in run_workflows_locally.sh, remove from run_playwright_tests.sh Agent-Logs-Url: https://github.com/gensyn/ssh_docker/sessions/a24f4bcc-7aa7-4448-a8e4-43ebb5b74701 Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com> --- run_playwright_tests.sh | 84 ---------------------------------------- run_workflows_locally.sh | 38 ++++++++++++++++-- 2 files changed, 35 insertions(+), 87 deletions(-) diff --git a/run_playwright_tests.sh b/run_playwright_tests.sh index 8ce636d..5f2c58a 100755 --- a/run_playwright_tests.sh +++ b/run_playwright_tests.sh @@ -29,86 +29,6 @@ header() { echo -e "\n${BOLD}$*${NC}"; } SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" COMPOSE_FILE="$SCRIPT_DIR/docker-compose.yaml" -command_exists() { command -v "$1" &>/dev/null; } - -# ── Docker installation / update ───────────────────────────────────────────── -install_docker() { - if command_exists docker; then - info "Docker is already installed: $(sudo docker --version)" - info "Checking for Docker updates…" - if command_exists apt-get; then - sudo apt-get update -qq \ - && sudo apt-get install --only-upgrade -y \ - docker-ce docker-ce-cli containerd.io docker-compose-plugin \ - || true - elif command_exists yum; then - sudo yum update -y \ - docker-ce docker-ce-cli containerd.io docker-compose-plugin \ - || true - else - warn "Cannot automatically update Docker on this platform; please update it manually." - fi - info "Docker version after update check: $(sudo docker --version)" - return 0 - fi - - header "Installing Docker…" - curl -fsSL https://get.docker.com | sudo sh - sudo usermod -aG docker "$USER" || true - warn "Docker installed. You may need to run 'newgrp docker' or re-login for group membership to take effect." -} - -# ── act installation / update ───────────────────────────────────────────────── -install_act() { - if command_exists act; then - local current_version latest_version - current_version="$(act --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" - latest_version="$(curl -fsSL https://api.github.com/repos/nektos/act/releases/latest 2>/dev/null \ - | grep '"tag_name"' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" - - if [[ -z "$current_version" ]] || [[ -z "$latest_version" ]]; then - [[ -z "$current_version" ]] && warn "Could not determine the installed act version; skipping update check." - [[ -z "$latest_version" ]] && warn "Could not determine the latest act version (network issue?); skipping update check." - info "act is already installed: $(act --version)" - return 0 - fi - - if [[ "$current_version" == "$latest_version" ]]; then - info "act is already up to date: $(act --version)" - return 0 - fi - - header "Updating act from ${current_version} to ${latest_version}…" - curl -fsSL https://raw.githubusercontent.com/nektos/act/master/install.sh \ - | sudo bash -s -- -b /usr/local/bin - return 0 - fi - - header "Installing act…" - curl -fsSL https://raw.githubusercontent.com/nektos/act/master/install.sh \ - | sudo bash -s -- -b /usr/local/bin -} - -# ── Docker daemon check ─────────────────────────────────────────────────────── -ensure_docker_running() { - if sudo docker info &>/dev/null; then - return 0 - fi - - warn "Docker daemon is not running – attempting to start it…" - if command_exists systemctl; then - sudo systemctl start docker - else - sudo service docker start - fi - sleep 3 # give the daemon a moment to become ready before re-checking - - if ! sudo docker info &>/dev/null; then - error "Docker daemon is still not running. Please start Docker manually and re-run this script." - exit 1 - fi -} - # ── Resolve docker compose command ─────────────────────────────────────────── get_compose_cmd() { if command -v docker &>/dev/null && sudo docker compose version &>/dev/null 2>&1; then @@ -136,10 +56,6 @@ main() { header " Playwright E2E tests (docker compose)" header "════════════════════════════════════════════════════" - install_docker - install_act - ensure_docker_running - local compose_cmd compose_cmd="$(get_compose_cmd)" diff --git a/run_workflows_locally.sh b/run_workflows_locally.sh index 26ebaab..11a83d2 100755 --- a/run_workflows_locally.sh +++ b/run_workflows_locally.sh @@ -30,10 +30,24 @@ header() { echo -e "\n${BOLD}$*${NC}"; } command_exists() { command -v "$1" &>/dev/null; } -# ── Docker installation ─────────────────────────────────────────────────────── +# ── Docker installation / update ───────────────────────────────────────────── install_docker() { if command_exists docker; then info "Docker is already installed: $(sudo docker --version)" + info "Checking for Docker updates…" + if command_exists apt-get; then + sudo apt-get update -qq \ + && sudo apt-get install --only-upgrade -y \ + docker-ce docker-ce-cli containerd.io docker-compose-plugin \ + || true + elif command_exists yum; then + sudo yum update -y \ + docker-ce docker-ce-cli containerd.io docker-compose-plugin \ + || true + else + warn "Cannot automatically update Docker on this platform; please update it manually." + fi + info "Docker version after update check: $(sudo docker --version)" return 0 fi @@ -43,10 +57,28 @@ install_docker() { warn "Docker installed. You may need to run 'newgrp docker' or re-login for group membership to take effect." } -# ── act installation ────────────────────────────────────────────────────────── +# ── act installation / update ───────────────────────────────────────────────── install_act() { if command_exists act; then - info "act is already installed: $(act --version)" + local current_version latest_version + current_version="$(act --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" + latest_version="$(curl -fsSL https://api.github.com/repos/nektos/act/releases/latest 2>/dev/null \ + | grep '"tag_name"' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" + + if [[ -z "$current_version" ]] || [[ -z "$latest_version" ]]; then + warn "Could not determine act versions; skipping update check." + info "act is already installed: $(act --version)" + return 0 + fi + + if [[ "$current_version" == "$latest_version" ]]; then + info "act is already up to date: $(act --version)" + return 0 + fi + + header "Updating act from ${current_version} to ${latest_version}…" + curl -fsSL https://raw.githubusercontent.com/nektos/act/master/install.sh \ + | sudo bash -s -- -b /usr/local/bin return 0 fi From 7bdc8bf362b9bb2296bbc5b934c5db0697031894 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:10:36 +0000 Subject: [PATCH 5/5] Fix RuntimeWarning: close _discover_services coroutine in hass mock Agent-Logs-Url: https://github.com/gensyn/ssh_docker/sessions/4fee198e-3bf3-4dd5-94ef-d28d73f83fde Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com> --- tests/unit_tests/test_init.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit_tests/test_init.py b/tests/unit_tests/test_init.py index 1b32423..1ccc348 100644 --- a/tests/unit_tests/test_init.py +++ b/tests/unit_tests/test_init.py @@ -150,7 +150,8 @@ def _make_hass_for_setup(): hass = MagicMock() hass.data = {} hass.config_entries.async_forward_entry_setups = AsyncMock(return_value=None) - hass.async_create_task = MagicMock() + # Close any coroutine passed in to prevent "never awaited" RuntimeWarnings. + hass.async_create_task = lambda coro, *a, **kw: coro.close() return hass