Skip to content

Fix broken pipe error in sync-project-status workflow#3085

Merged
tekton-robot merged 1 commit intotektoncd:mainfrom
vdemeester:fix-broken-pipe-sync-workflow
Feb 3, 2026
Merged

Fix broken pipe error in sync-project-status workflow#3085
tekton-robot merged 1 commit intotektoncd:mainfrom
vdemeester:fix-broken-pipe-sync-workflow

Conversation

@vdemeester
Copy link
Member

Changes

Fix broken pipe error in sync-project-status.yml workflow.

The script was failing with jq: error: writing output failed: Broken pipe because:

ISSUE_TITLE=$(echo "$issue" | jq -r '.title' | head -c 50)

When head -c 50 reads enough bytes, it closes its input, causing jq to fail when writing to the closed pipe. With bash's -e flag (default in GitHub Actions), this exits the script with error code 1.

Fix: Use jq's built-in string slicing (.title[0:50]) instead of piping to head.

Fixes: https://github.com/tektoncd/plumbing/actions/runs/21624192113

/kind bug

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide
for more details.

Use jq string slicing (.title[0:50]) instead of piping to head -c 50.
The pipe to head causes a broken pipe error when head closes early,
which fails the script under bash -e.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 3, 2026
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 3, 2026
Copy link
Contributor

@savitaashture savitaashture left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2026
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: savitaashture

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2026
@tekton-robot tekton-robot merged commit ecf928f into tektoncd:main Feb 3, 2026
26 checks passed
@vdemeester vdemeester deleted the fix-broken-pipe-sync-workflow branch February 3, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants