From b2b7383266eec7ad06c6d6160563a11cc6245c57 Mon Sep 17 00:00:00 2001 From: emil Date: Sun, 21 Jun 2026 23:39:16 +0000 Subject: [PATCH] GRM-47: docs: tell users to checkout latest release tag before make setup --- README.md | 3 +++ docs/user/getting-started.md | 3 +++ docs/user/installation.md | 2 ++ scripts/ci/auto_merge.py | 3 ++- tests/unit/test_auto_merge.py | 11 +++++++++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c75a9b..b568222 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,14 @@ Each runner runs in an isolated **rootless Docker** environment under a dedicate ```bash git clone https://git.oblachno.oblachno.fyi/oblachno-oss/grm.git cd grm +git checkout $(git describe --tags --abbrev=0) # Checkout latest stable release make setup cp .env.example .env # Edit with your Gitea URL and tokens grm install 192.168.1.10 --user ubuntu --key ~/.ssh/id_ed25519 --name prod-runner ``` +> **Important:** Always checkout the latest release tag before running `make setup`. The `master` branch may contain unreleased changes that are not yet stable. The command above automatically selects the most recent tagged release. + > **Tokens:** You need two tokens from your Gitea instance — a **registration token** to register runners, and an **admin API token** for optional post-install verification. See [Getting Started](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/wiki/Getting-Started.-) for detailed setup instructions. ## Documentation diff --git a/docs/user/getting-started.md b/docs/user/getting-started.md index 56c5995..919bcf2 100644 --- a/docs/user/getting-started.md +++ b/docs/user/getting-started.md @@ -5,11 +5,14 @@ ```bash git clone https://git.oblachno.oblachno.fyi/oblachno-oss/grm.git cd grm +git checkout $(git describe --tags --abbrev=0) # Checkout latest stable release pyenv install 3.12 pyenv local 3.12 make setup ``` +> **Important:** Always checkout the latest release tag before running `make setup`. The `master` branch may contain unreleased changes that are not yet stable. The `git describe --tags --abbrev=0` command automatically selects the most recent tagged release. To see all available releases, run `git tag --sort=-version:refname` or check the [releases page](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/releases). + ## Configure Gitea Credentials GRM needs two tokens from your Gitea instance: a **registration token** (required) and an **admin API token** (optional, for post-install verification). diff --git a/docs/user/installation.md b/docs/user/installation.md index 9e5ebca..b809033 100644 --- a/docs/user/installation.md +++ b/docs/user/installation.md @@ -1,5 +1,7 @@ # Installation +> **Before you start:** Make sure you have cloned the repo and checked out the latest stable release tag. See [Getting Started](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/wiki/Getting-Started.-) for setup instructions. Do not run from `master` — it may contain unreleased changes. + ## Prerequisites - **SSH key authentication** — The remote host must be reachable via SSH using the user specified with `--user` and the private key specified with `--key`. GRM uses Ansible under the hood, which connects to the target host over SSH to execute all installation and configuration tasks. Without valid SSH credentials, Ansible cannot establish a connection and the deployment will fail. diff --git a/scripts/ci/auto_merge.py b/scripts/ci/auto_merge.py index 1feb1a5..3794563 100644 --- a/scripts/ci/auto_merge.py +++ b/scripts/ci/auto_merge.py @@ -212,7 +212,8 @@ def wait_for_ci( pending = [ctx for ctx, s in ci_statuses.items() if s.get("status") in ("pending", "waiting")] if not pending: # All CI checks are complete — check if they all succeeded. - failed = [ctx for ctx, s in ci_statuses.items() if s.get("status") not in ("success", "ok")] + # "skipped" jobs are considered passing (conditional jobs that didn't run). + failed = [ctx for ctx, s in ci_statuses.items() if s.get("status") not in ("success", "ok", "skipped")] if failed: click.echo(_("CI checks failed: {failed}", failed=", ".join(sorted(failed)))) return False diff --git a/tests/unit/test_auto_merge.py b/tests/unit/test_auto_merge.py index 27ca514..c080c5f 100644 --- a/tests/unit/test_auto_merge.py +++ b/tests/unit/test_auto_merge.py @@ -328,6 +328,17 @@ class TestWaitForCi: ] assert wait_for_ci(client, "abc123", max_wait=10) is True + def test_skipped_jobs_count_as_passing(self) -> None: + """Conditional jobs that are skipped should not block merge.""" + client = MagicMock() + client.get_commit_status.return_value = [ + _status("CI / quality (pull_request)", CI_SUCCESS), + _status("CI / badges (pull_request)", "skipped"), + _status("CI / molecule-tests (pull_request)", "skipped"), + _status("CI / discover-runners (pull_request)", "skipped"), + ] + assert wait_for_ci(client, "abc123", max_wait=10) is True + def test_only_non_ci_contexts_waits_then_ci_appears(self) -> None: client = MagicMock() client.get_commit_status.side_effect = [