Skip to content

fix(ci): stop concatenating per-module versions into RELEASE_VERSION - #1910

Merged
akijakya merged 2 commits into
mainfrom
fix/concatenated-versions
Jul 29, 2026
Merged

akijakya merged 2 commits into
mainfrom
fix/concatenated-versions

Conversation

@akijakya

@akijakya akijakya commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

Problem

When the local dir daemon starts, it self-registers an org.agntcy/directory OASF record describing the node. That record's version field came out malformed with an embedded newline — e.g. "v1.6.1\n1.6.1" — which downstream tooling then rendered as two lines (this surfaced as a broken row in the lazydir Records panel).

Root cause

RELEASE_VERSION in Taskfile.vars.yml was computed as:

sh: grep 'version:' versions.yaml | awk '{print $2}'

versions.yaml is a multi-module config with a version: key per module-set (api and server). grep therefore matched both lines and awk emitted the two values separated by a newline. Task's sh: only strips the trailing newline, so the interior \n survived into the -X ...version.Version= ldflag, into api/version.Version, and into the self-registered record's version.

Fix

Select a single module-set's version and stop before the second match:

sh: awk '/version:/{print $2; exit}' versions.yaml

This takes the first (api) version — the one that stamps api/version.Version — and produces exactly one clean value. No new tool dependency (stays awk, portable across GNU/BSD).

Verification

  • Raw command output: before → v1.6.1\nv1.6.1\n (interior newline); after → v1.6.1\n (single value; Task trims the trailing newline).
  • Through Task: task build --dry now renders ...version.Version=v1.6.1.
  • task --list-all / task build --dry succeed → the Taskfile still parses.

@akijakya akijakya self-assigned this Jul 28, 2026
@akijakya
akijakya requested a review from a team as a code owner July 28, 2026 13:10
@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-49 lines label Jul 28, 2026
@akijakya
akijakya requested a review from Copilot July 28, 2026 13:29
@akijakya akijakya changed the title fix: stop concatenating per-module versions into RELEASE_VERSION fix(ci): stop concatenating per-module versions into RELEASE_VERSION Jul 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes malformed daemon self-registration versions by ensuring RELEASE_VERSION resolves to a single value from versions.yaml, preventing multi-line version strings from being embedded into ldflags and propagated into OASF records.

Changes:

  • Replace grep | awk with an awk early-exit pattern to avoid concatenating multiple version: values.
  • Add inline comments documenting why only one module-set version should be selected.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Taskfile.vars.yml Resolved
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@akijakya
akijakya force-pushed the fix/concatenated-versions branch from 6248c38 to a3db8fc Compare July 29, 2026 10:33
@akijakya
akijakya merged commit cde6a22 into main Jul 29, 2026
32 checks passed
@akijakya
akijakya deleted the fix/concatenated-versions branch July 29, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-49 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants