Skip to content

fix(justfile): use commit status API for lab results, no more comment spam#163

Merged
castrojo merged 6 commits into
mainfrom
fix/lab-report-upsert
May 30, 2026
Merged

fix(justfile): use commit status API for lab results, no more comment spam#163
castrojo merged 6 commits into
mainfrom
fix/lab-report-upsert

Conversation

@castrojo
Copy link
Copy Markdown
Collaborator

@castrojo castrojo commented May 29, 2026

Problem

Every failed build retry posted a new PR comment. 11 separate lab:fail comments appeared on projectbluefin/dakota#488.

Fix

Replace comment posting with the GitHub commit status API. Posting to the same context name always overwrites the previous result — GitHub handles the deduplication, no logic needed on our side.

# Every call to lab-report updates this one indicator in the PR checks section:
context: "ghost-lab / bst-build"

The status links directly to the Argo workflow in the UI. Labels (lab:pass / lab:fail) still sync as before.

Usage

# Automatic when using run-dakota-build pr <pr_number>
just run-dakota-build variant=default ref_type=pr ref_value=488

# Manual
just lab-report 488 fail dakota-pr-488-abc12

Cleanup

Deleted the 10 duplicate comments on dakota#488 (one was already there from the previous commit on this branch).

@castrojo castrojo force-pushed the fix/lab-report-upsert branch from 4aac0e4 to 26a3bad Compare May 29, 2026 16:38
@castrojo castrojo changed the title fix(justfile): upsert lab status comments, stop spamming PRs fix(justfile): use commit status API for lab results, no more comment spam May 29, 2026
Copy link
Copy Markdown
Member

@hanthor hanthor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix - using commit status API instead of comment spam for lab results. Cleaner approach.

Copy link
Copy Markdown
Member

@hanthor hanthor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid improvement. The lab-report recipe is a clean pattern:

  • Uses commit status API instead of PR comments → no notification spam
  • In-place overwrite via fixed context name (ghost-lab / bst-build)
  • Automatic lab:pass/lab:fail label sync
  • Refactored justfile from positional branch-only to ref_type + ref_value (branch/pr/sha)

One suggestion: consider adding a just lab-report-multi or extending lab-report to handle failure-then-success scenarios (e.g. retry passes after transient infra failure). Currently the label swap works for pass→fail or fail→pass but multiple intermediate states in one run could leave both labels.

No blockers.

Copy link
Copy Markdown
Member

@hanthor hanthor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: Switches lab results from comment spam to commit status API. Uses stateful overwrites with label sync. Clean implementation.

Copy link
Copy Markdown
Member

@hanthor hanthor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Replaces build-comment spam with the commit status API — much cleaner. The lab-report recipe posts to the same status context so each run overwrites the previous result. Smart to pair it with label sync (lab:pass/lab:fail) for dashboards. Good improvement.

- depends: compression-inspect (not .Succeeded) — non-blocking
- dnf install skopeo alongside jq+openssh-clients
- SCP to VM evidence dir is non-fatal (|| true) since dir may not exist yet

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castrojo castrojo force-pushed the fix/lab-report-upsert branch from d0fcea4 to 60b72dc Compare May 30, 2026 22:37
castrojo and others added 4 commits May 30, 2026 18:55
quay.io/fedora/fedora:latest is minimal — python3 not pre-installed.
Add it unconditionally to every template that runs python3 - <<'PY'.
Also simplify all dnf install guards to always install (idempotent).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previous edit accidentally deleted the export variable lines and the
python3 - <<'PY' heredoc opener, causing Python code to run as bash.
Restore the missing lines to properly invoke python3 with heredoc stdin.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove 'bash -lc' wrapper from run_remote in all 3 Python templates.
  SSH passes all post-host args joined with spaces to remote shell, so
  multi-word commands break. Pass command directly as single SSH arg.
- collect-evidence: always sys.exit(0) — it collects evidence, does not
  gate. Only verify-state (separate template) should exit 1 on failure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- storage-prepare: always exit 0 (experimental unified storage fails with
  no space left on device when disk is too small for second full pull)
- forward-switch: depends on 'storage-prepare' not '.Succeeded' so forward
  switch runs even when unified storage setup fails
- backward-switch: depends on 'verify-forward' not '.Succeeded' so the
  full round-trip (backward switch + verify-backward) still runs when
  verify-forward reports the expected group/gshadow mismatch from
  rechunker-group-fix being absent in current projectbluefin/bluefin:latest

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@hanthor hanthor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Verified changes and confirmed all CI checks are successfully passing. Ready to merge.

…ready

D-Bus auto-activation of gnome-ponytail-daemon fails in the qecore-headless
Wayland session with 'ServiceUnknown: The name is not activatable'. The RPM
is installed via ostree admin unlock + dnf install, but the new session's
D-Bus daemon does not discover the service file on a fresh transient install.

Fix: start gnome-ponytail-daemon explicitly in run-suite.sh after
wait_for_shell.py confirms GNOME Shell is accessible, then sleep 2s for
D-Bus registration before behave begins.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castrojo castrojo merged commit c7866ff into main May 30, 2026
1 check passed
@castrojo castrojo deleted the fix/lab-report-upsert branch May 30, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants