Skip to content

fix(countme): re-track os-countme.bst to projectbluefin/common main - #274

Closed
jeefy wants to merge 1 commit into
projectbluefin:mainfrom
jeefy:fix/countme-track-common-main
Closed

jeefy wants to merge 1 commit into
projectbluefin:mainfrom
jeefy:fix/countme-track-common-main

Conversation

@jeefy

@jeefy jeefy commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

What

elements/bluefin-server/os-countme.bst pinned v2026.08-108-gd46c4df..., the tip of the unmerged, now-closed projectbluefin/common#1112 branch (feat/first-party-countme-client). That commit is 101 commits behind common main and survives only on the PR branch, so a branch deletion would break fresh builds. This re-tracks the element to common main (bst source track), moving the ref to v2026.08-207-g725dbf68....

The catch: main's reporter is Dakota-scoped

I diffed the four installed files between the pinned ref and common main. The shared client was deliberately narrowed to Dakota (projectbluefin/common#1112 was closed unmerged in favor of the Dakota-scoped #1154):

File Change on main Works on this image?
bluefin-countme Rewritten; exits unless image-name starts with dakota, and hard-fails without a stable/testing tag resolved from a bootc ref No — this image declares image-name: server and is a DDI with no bootc
bluefin-countme.service Added ConditionOSRelease=ID=bluefin-dakota, ConditionPathExists=/run/ostree-booted, After=ublue-booted-image.service (does not exist here) No — conditions skip it forever
bluefin-countme.timer Same Dakota/ostree conditions No
03-bluefin-countme.preset Unchanged (enable bluefin-countme.timer) Yes

jq and curl (the reporter's only deps) are already depended on; the element needs no new runtime deps.

How this image adapts the shared client

The element keeps sourcing the four files from common main (so we still track the same reporter as the family) and adds:

  • Unit drop-ins (bluefin-countme.{service,timer}.d/10-bluefin-server.conf) that clear ConditionOSRelease= and ConditionPathExists= and re-assert only the three opt-out conditions, so the units actually run on ID=bluefin-server, non-ostree. The service drop-in also clears the dangling After=ublue-booted-image.service. The preset still enables the timer.
  • Four POSIX-sh substitutions (the build sandbox has sh but no sed/grep/awk) that accept the server image name, set REPO="server", and report tag=none — a sysupdate-delivered DDI has no container stream, so there is no tag to wait on. Anchor counters fail the build if common rewords any substituted line, so drift breaks loudly instead of silently stopping the count.
  • A SuccessExitStatus= list so a transient ping failure (no route/DNS, curl exit 28 etc.) is retried by the daily timer rather than showing up in systemctl --failed — the pinned reporter exited 0 in that case for the same reason.

Net effect: this image keeps counting as repo=server with the same install-age buckets, through the same shared client.

Verification

  • flock /tmp/opencode/bst.lock just validate — exit 0.
  • flock /tmp/opencode/bst.lock just export-image — exit 0. Mounted the built /usr erofs: all four adaptation anchors landed in libexec/bluefin-countme (bash -n clean), both drop-ins installed, preset intact, image-info.json = {"image-name": "server"}.
  • flock /tmp/opencode/qemu.lock just dogfood-check with a DOGFOOD_EXTRA_PROBE running systemctl start bluefin-countme.service; systemctl status … — PASS, PROBE failed=0. Probe showed enabled timer, the 10-bluefin-server.conf drop-in applied, and the unit ran the helper to completion (Deactivated successfully); curl's status=28 is the expected no-internet ping timeout under QEMU slirp and is absorbed by SuccessExitStatus.
  • Adapted script exercised locally against a mock image-name: server with no bootc: reports repo=server&tag=none&flavor=main&countme=1, exit 0.
  • pytest tests/unit — 371 passed (also in a throwaway detached worktree without files/boot-keys); bats tests/unit — 74 ok; python3 .github/scripts/docs-checks.py — passed.
  • No test pins the old ref (tests/unit/test_build_depends.py only asserts the curl/jq deps, still present); no doc references countme.

Closes #95

Assisted-by: Claude Opus 5.5 via GitHub Copilot
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

os-countme.bst pinned v2026.08-108-gd46c4df, the tip of the unmerged
projectbluefin/common#1112 branch (101 commits behind main, at risk of
garbage collection). Re-track to common main (v2026.08-207-g725dbf68)
with bst source track.

Common main ships the shared client gated to Dakota: the units carry
ConditionOSRelease=ID=bluefin-dakota and ConditionPathExists=/run/ostree-booted,
and the script exits unless image-name starts with dakota and it can prove a
stable/testing stream from bootc. This image is ID=bluefin-server, declares
only image-name "server", and is a DDI with no bootc, so install unit
drop-ins that clear the Dakota/ostree conditions (keeping the opt-out
conditions) and POSIX-sh substitutions that accept the server name, report
repo=server, and tag the ping "none" (a sysupdate DDI has no container
stream). A failed ping is retried daily by the timer, so the service treats
curl's transient exit statuses as success rather than landing in
systemctl --failed.

Closes projectbluefin#95

Assisted-by: Claude Opus 5.5 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jeefy
jeefy marked this pull request as draft September 29, 2026 05:00
@jeefy

jeefy commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator Author

Marking this draft. Re-tracking is needed (the old pin only exists on the closed projectbluefin/common#1112 branch), but common main's client is now gated to Dakota (ConditionOSRelease=ID=bluefin-dakota, /run/ostree-booted, image-name dakota*, a bootc stream tag). This PR adapts it by rewriting four lines of the shared script at build time and widening SuccessExitStatus. That works, and it fails the build if common changes those lines, but it forks shared behaviour inside this repo. Preferred: teach projectbluefin/common's bluefin-countme about DDI images (image-name server, no bootc tag, ID=bluefin-server), then this element becomes a plain re-track. Maintainers: also confirm the countme service accepts repo=server with no tag before any of this ships.

@jeefy

jeefy commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator Author

Related finding (from #278): common's 03-bluefin-countme.preset sorts before Ignition's 20-ignition.preset, so a node config's enabled: false for bluefin-countme.timer is silently ignored (masking still works). This image's own presets use 80-bluefin-* for exactly this reason (see test_presets_sort_between_ignition_and_fsdk_defaults). Whatever lands here should either install the preset under an 80- name or leave it out and ship an 80-bluefin-countme.preset, and the preset-order test should cover presets installed from outside files/.

@jeefy

jeefy commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Closing after re-evaluation. This was a hedge against the pinned ref (d46c4df, common's feat/first-party-countme-client) disappearing. That branch and commit still exist, and the pinned first-party client works on this image as-is. Meanwhile, re-tracking to common main means patching a Dakota-scoped client: drop-ins clearing its conditions, and sed over its gates. That can silently stop working whenever common edits those lines. The right fix is upstream: a countme client in projectbluefin/common that accepts non-bootc/DDI images (ID=bluefin-server, repo=server, no stream tag). Tracked in #325.

@jeefy jeefy closed this Sep 30, 2026
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.

os-countme.bst pins a branch ref in projectbluefin/common and must be re-tracked

2 participants