fix: fetch full git history for GoReleaser to correctly push latest tag#4334
Open
Bhagwat-45 wants to merge 1 commit intoredpanda-data:mainfrom
Open
fix: fetch full git history for GoReleaser to correctly push latest tag#4334Bhagwat-45 wants to merge 1 commit intoredpanda-data:mainfrom
Bhagwat-45 wants to merge 1 commit intoredpanda-data:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #4087
The
latestDocker tag forredpandadata/connecthas been stuck on4.67.5since October 2025. Subsequent releases (4.68.0through4.87.0+) built successfully but never updated thelatesttag on Docker Hub or ECR.Root Cause
The release workflow was checking out the repository with the default shallow clone (
fetch-depth: 1). GoReleaser requires full git history to correctly parse tag metadata and evaluate its template variables.This was visible in the GoReleaser release logs as an explicit warning:
With an incomplete git history, GoReleaser cannot correctly resolve
.Prereleasefrom the tag context, causing thelatesttag template in.goreleaser/connect.yamlto silently evaluate to an empty string and be skipped entirely:- "{{ if and (not .IsSnapshot) (eq .Prerelease ``) }}latest{{ end }}"As a result, only versioned tags (
4.87.0,4.87,4) were pushed — neverlatest.Fix
Add
fetch-depth: 0andfetch-tags: trueto the checkout step in the release workflow so GoReleaser has the full git history it needs to correctly evaluate tag templates.Testing
The next stable release after this fix should show
latestappearing in the GoReleaser publishing logs alongside the versioned tags, anddocker pull redpandadata/connect:latestshould return the most recent version.