BorisovAI
All posts
Bug Fixai-agents-genkitGit Commit

Silent Failure in Release Pipelines: How Missing Parameters Broke v0.6.0

Silent Failure in Release Pipelines: How Missing Parameters Broke v0.6.0

When you’re managing a multi-language release pipeline, the last thing you expect is for 68 tags to vanish into the void. But that’s exactly what happened during the Python v0.6.0 release in the GenKit project—and the culprit was deceptively simple: a label parameter that was accepted but never used.

Here’s the story of how we tracked it down.

The Ghost Tags

The release process in GenKit’s releasekit tool uses a template-based tag format: {label}/{name}-v{version}. For Python releases, {label} should resolve to py, creating tags like py/genkit-v0.6.0. But something went wrong. All 68 tags were created locally and “pushed” without errors, yet they never appeared on the remote.

The mystery deepened when we examined the git logs. The tags had been created with malformed names: /genkit-v0.6.0 instead of py/genkit-v0.6.0. Git silently rejected these invalid ref names during the push operation, so the remote repository had no record they ever existed.

The Root Cause

The bug lived in the create_tags() function. It accepted a label parameter as an argument, but when calling format_tag() three times (once for the primary tag, once for the secondary, and once for the umbrella tag), the label was never forwarded. It was like passing a key to a function that was supposed to unlock a door—except the function never actually used the key.

Interestingly, the delete_tags() function in the same file did correctly pass the label. This inconsistency became a valuable breadcrumb.

The Fail-Fast Defense

But fixing the parameter passing wasn’t enough. We needed to catch these kinds of errors earlier. If malformed tag names had been validated before any git operations, the pipeline would have failed loudly and immediately, rather than silently continuing through create, push, and even GitHub Release creation steps.

We added a validate_tag_name() function that checks tag names against git’s ref format rules—no leading or trailing slashes, no .. sequences, no spaces. More importantly, we added a fail-fast pre-validation loop at the start of create_tags() that validates all planned tags before creating any single one. Now, if something is malformed, you know it before git even gets involved.

The Worktree Cleanup Gap

We also discovered a parallel issue in the GitHub Actions setup: git checkout -- . only reverts modifications to tracked files. When uv sync creates untracked artifacts like .venv/ directories, the worktree remains dirty, failing the preflight check. The fix was simple—use git reset --hard && git clean -fd to handle both tracked and untracked debris.

The Lesson

This release failure taught us that silent failures are the most dangerous. A loud error message that crashes the pipeline is annoying but recoverable. A pipeline that completes successfully but produces no actual output is a nightmare to debug.

With these fixes—parameter passing, fail-fast validation, and robust cleanup—GenKit’s release process is now both more reliable and more debuggable. And hey, at least we didn’t have to maintain 68 ghost tags in perpetuity. 😄

Metadata

Branch:
main
Dev Joke
Если Figma работает — не трогай. Если не работает — тоже не трогай, станет хуже.

Rate this content

0/1000