tektoncd / tektoncd/cli

the "annotate" flag does not parse the annotation value correctly if it contains comma

Open
#2,402 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug
Dominant language
Go
Stars
461
Forks
277
Avg merge
16h 48m
Merged PRs (30d)
95

Description

Versions and Operating System

  • Kubernetes version:
    not needed to reproduce this bug

  • Tekton Pipeline version:

    Client version: 0.38.1
    
  • Operating System:

    Mac OS Sonoma 14.6.1 (23G93)
    

Expected Behavior

when using --annotate parameter with tkn bundle push command, the annotation's value is parsed correctly if it contains comma: ,

Actual Behavior

it fails with an error: Error: invalid input format for param parameter: <the rest of the annotation value string after comma>

Steps to Reproduce the Problem

Run

➜  ~ tkn bundle push --annotate 'test=a,b' quay.io/my-quay-username/my-repo:test-tag -f some-task.yaml
*Warning*: This is an experimental command, it's usage and behavior can change in the next release(s)
Error: invalid input format for param parameter: b

Additional Info

the --annotate parameter was introduced in this commit

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported command: tkn bundle push --annotate 'test=a,b' ... and inspect the --annotate handling introduced in commit 7e7daafa2a1ab97d9f2d6e23905146a596b782e0. Trace how annotation arguments are split and add or update coverage for comma-containing values; done means the full value is accepted without the invalid-input error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.