-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Problem
The check-wire-version CI job fails when git tags are empty or undefined. This commonly occurs:
- During initial repository setup when no tags exist yet
- When running CI on feature branches that haven't been tagged
- In development environments without proper tag configuration
This causes the CI workflow to error out unexpectedly with "No matching tags found" errors.
Root Cause
The .github/workflows/ci.yml script attempts to validate wire version format without first checking if any git tags actually exist. The TAG=$(git describe --tags ...) command fails silently or returns an empty value, causing downstream checks to fail.
Solution
Add a conditional safety check to skip wire version format verification if no tags exist. This prevents the job from erroring out while allowing normal operation when tags are present.
Proposed Fix
Modify .github/workflows/ci.yml in the check-wire-version job to add:
# skip check if no tags exist (e.g., on initial repo setup)
if [ -z "$TAG" ]; then
echo "No matching tags found, skipping wire format check"
exit 0
fiThis ensures:
- ✅ CI workflows don't fail on repos/branches without tags
- ✅ Wire version format is still validated when tags are present
- ✅ No breaking changes to existing functionality
Reference Implementation
See working implementation: yodablocks/zksync-os-server-fixes@264b27d
The fix involves adding 6 lines to .github/workflows/ci.yml with proper error handling and user-friendly messaging.