Skip to content

Fix container build version resolution when repository tags are unavailable#4

Draft
bramhanandlingala with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-build-containers-job-again
Draft

Fix container build version resolution when repository tags are unavailable#4
bramhanandlingala with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-build-containers-job-again

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown

Build containers failed in CI because version derivation depended on git describe --tags, which exits non-zero when no matching tags are present in the checkout. This caused the build metadata step to terminate before image build/push logic could run.

  • Root cause addressed

    • Made version derivation resilient to missing tag history by adding a safe fallback value instead of hard-failing.
  • Change

    • Updated Makefile VERSION computation to default to v0.0.0-dev0 when git describe --tags --match 'v*' cannot resolve a tag.
    • Preserved existing normalization behavior (v prefix removal and -devN formatting).
  • Effect on CI behavior

    • Container build metadata now resolves a deterministic version in tag-less contexts (e.g., fork/default-branch checkouts), avoiding exit code 128 from git describe.
VERSION := $(shell (git describe --tags --match 'v*' 2>/dev/null || echo "v0.0.0-dev0") | sed -e 's/^v//; s/-g[0-9a-f]\+$$//; s/-\([0-9]\+\)$$/-dev\1/')

Copilot AI changed the title [WIP] Fix failing GitHub Actions job Build containers Fix container build version resolution when repository tags are unavailable Jul 14, 2026
Copilot AI requested a review from bramhanandlingala July 14, 2026 07:52

@bramhanandlingala bramhanandlingala left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

VERSION := $(shell (git describe --tags --match 'v*' 2>/dev/null || echo "v0.0.0-dev0") | sed -e 's/^v//; s/-g[0-9a-f]+$$//; s/-([0-9]+)$$/-dev\1/')

@github-actions

Copy link
Copy Markdown

Warning

Linked issue missing.

Reference one in the PR body using a keyword (Closes / Fixes / Resolves / Refs / See) followed by #<issue_id> or owner/repo#<issue_id>.

Alternatively, apply the no-issue label to skip this check.

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