Skip to content

[chore] Add validation to push-tags Makefile target#1461

Open
crobert-1 wants to merge 2 commits intoopen-telemetry:mainfrom
crobert-1:push_tags_validation
Open

[chore] Add validation to push-tags Makefile target#1461
crobert-1 wants to merge 2 commits intoopen-telemetry:mainfrom
crobert-1:push_tags_validation

Conversation

@crobert-1
Copy link
Copy Markdown
Member

@crobert-1 crobert-1 commented Apr 14, 2026

Description:
When releasing v0.150.0, I misread directions and didn't understand steps 1 and 2 were two different PRs. This resulted in needing to create a patch release v0.150.1 to address the incorrect contents of the v0.150.0 tag.

This PR moves the functionality of creating and pushing a tag to a standalone script and validates that the manifests have been properly updated by the [chore] Prepare release PR.

Testing:

$ make push-tags
TAG must be set (e.g. TAG=v0.100.0)
make: *** [push-tags] Error 1

$ make push-tags TAG=0.151.0
TAG must start with lowercase 'v' (e.g. v0.100.0)
make: *** [push-tags] Error 1

$ make push-tags TAG=v0.151.0
Version mismatch in distributions/otelcol-contrib/manifest.yaml: dist.version is set to '0.150.1', expected '0.151.0'
Please ensure the '[chore] Prepare release 0.151.0' PR has been merged.
If this version mismatch is expected, please re-run with the extra argument 'VALIDATE=false'
make: *** [push-tags] Error 1

$ make push-tags TAG=v0.150.1
Adding tag v0.150.1
Pushing tag v0.150.1

$ make push-tags TAG=v0.151.0 VALIDATE=false
Adding tag v0.151.0
Pushing tag v0.151.0

Disclosure: I used Codex and Claude to generate most of this script.

@crobert-1 crobert-1 requested a review from a team as a code owner April 14, 2026 16:54
@crobert-1 crobert-1 requested a review from dmathieu April 14, 2026 16:54
Comment thread scripts/push-tag.sh
fi

REMOTE="${REMOTE:-git@github.com:open-telemetry/opentelemetry-collector-releases.git}"
VALIDATE="${VALIDATE:-true}"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If it's preferred, we could rename VALIDATE to be more specific to its current purpose, something like VALIDATE_TAG_VERSION.

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.

1 participant