Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(release): enqueue the release candidate; fix macOS non-terminal installs (#513)

Ruben Lütkec19c76acb7c9
diff --git a/.github/workflows/release-cut.yml b/.github/workflows/release-cut.yml
index 8adb4572c7..16c213b5e6 100644
--- a/.github/workflows/release-cut.yml
+++ b/.github/workflows/release-cut.yml
@@ -196,7 +196,14 @@ jobs:
# main requires a merge queue: this adds the candidate to it (the
# queue squash-merges after its own CI run), or merges directly
# when the queue is off. Either way, wait for the landed commit.
- gh pr merge "$CANDIDATE" --merge --match-head-commit "$CANDIDATE_SHA"
+ # `gh pr merge` cannot queue here: with a queue it falls back to
+ # auto-merge, which this repository disables. Enqueue explicitly.
+ pr_id="$(gh pr view "$CANDIDATE" --json id --jq .id)"
+ enqueue='mutation($id: ID!, $sha: GitObjectID!) { enqueuePullRequest(input: {pullRequestId: $id, expectedHeadOid: $sha}) { mergeQueueEntry { state } } }'
+ if ! gh api graphql -f query="$enqueue" -f id="$pr_id" -f sha="$CANDIDATE_SHA"; then
+ echo "Merge queue unavailable; merging the candidate directly."
+ gh pr merge "$CANDIDATE" --merge --match-head-commit "$CANDIDATE_SHA"
+ fi
merged=""
for attempt in {1..150}; do
merged="$(gh pr view "$CANDIDATE" --json mergeCommit --jq '.mergeCommit.oid // empty')"
diff --git a/install/install.sh b/install/install.sh
index 245b101bc8..397c942168 100755
--- a/install/install.sh
+++ b/install/install.sh
@@ -96,7 +96,7 @@ err() { printf '%s %s✗ %s%s\n' "$GUT" "$RED" "$1" "$RST"; }
run_spin() {
_spin_label="$1"; shift
if [ ! -t 1 ]; then
- note "$_spin_label…"
+ note "${_spin_label}…"
"$@" </dev/null
return $?
fi
diff --git a/tests/unit/ci/test_release_cut_workflow.py b/tests/unit/ci/test_release_cut_workflow.py
index 629b83e8c3..74e9d127c5 100644
--- a/tests/unit/ci/test_release_cut_workflow.py
+++ b/tests/unit/ci/test_release_cut_workflow.py
@@ -33,6 +33,7 @@ gh() {
'pr merge') return "$LAND_EXIT" ;;
'pr view') printf '%s\n' "$FAKE_SHA" ;;
'workflow run') return 0 ;;
+ 'api graphql') return "$LAND_EXIT" ;;
'run list') printf '123\n' ;;
'run view') printf '\n' ;;
'run watch') return "$WATCH_EXIT" ;;
@@ -213,7 +214,12 @@ def test_only_a_green_candidate_can_land_and_publish(tmp_path, overrides, succes
assert (result.returncode == 0) is success, result.stdout + result.stderr
candidate = "git push origin HEAD:refs/heads/release-cut/v1.2.3-77-2"
watch = "gh run watch 123 --exit-status --interval 30"
- merge = f"gh pr merge release-cut/v1.2.3-77-2 --merge --match-head-commit {_SHA}"
+ # The candidate enters main's merge queue pinned to the tested head.
+ merge = next(
+ (c for c in commands if c.startswith("gh api graphql") and "enqueuePullRequest" in c
+ and c.endswith(f"sha={_SHA}")),
+ "enqueue missing",
+ )
assert commands.index(candidate) < commands.index(watch)
assert any("--event pull_request" in command for command in commands)
assert "git push origin HEAD:main" not in commands