Skip to content

Conversation

bobcallaway
Copy link
Member

@bobcallaway bobcallaway commented Feb 6, 2025

If the --only option was omitted, the default tagSet became []string{""} which is strictly not []string{}... and parsing fails.

This switches the command line arg over to StringSliceVar and adds unit tests.

Fixes: #4048

Signed-off-by: Bob Callaway <[email protected]>
@bobcallaway bobcallaway requested a review from a team as a code owner February 6, 2025 14:07
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 36.89%. Comparing base (2ef6022) to head (25e9c4f).
Report is 297 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/options/copy.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4049      +/-   ##
==========================================
- Coverage   40.10%   36.89%   -3.22%     
==========================================
  Files         155      209      +54     
  Lines       10044    13352    +3308     
==========================================
+ Hits         4028     4926     +898     
- Misses       5530     7799    +2269     
- Partials      486      627     +141     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Bob Callaway <[email protected]>
@bobcallaway bobcallaway merged commit c4299b1 into sigstore:main Feb 6, 2025
29 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Feb 26, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [cosign](https://github.com/sigstore/cosign) | patch | `2.4.2` -> `2.4.3` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>sigstore/cosign (cosign)</summary>

### [`v2.4.3`](https://github.com/sigstore/cosign/blob/HEAD/CHANGELOG.md#v243)

[Compare Source](sigstore/cosign@v2.4.2...v2.4.3)

#### Features

-   Bump sigstore/sigstore to support KMS plugins ([#&#8203;4073](sigstore/cosign#4073))
-   Enable fetching signatures without remote get. ([#&#8203;4047](sigstore/cosign#4047))
-   Feat/file flag completion improvements ([#&#8203;4028](sigstore/cosign#4028))
-   Update builder to use go1.23.6 ([#&#8203;4052](sigstore/cosign#4052))

#### Bug Fixes

-   fix parsing error in --only for cosign copy ([#&#8203;4049](sigstore/cosign#4049))

#### Cleanup

-   Refactor verifyNewBundle into library function ([#&#8203;4013](sigstore/cosign#4013))
-   fix comment typo and imports order ([#&#8203;4061](sigstore/cosign#4061))
-   sync comment with parameter name in function signature ([#&#8203;4063](sigstore/cosign#4063))
-   sort properly Go imports ([#&#8203;4071](sigstore/cosign#4071))

#### Contributors

-   Bob Callaway
-   Carlos Tadeu Panato Junior
-   Cody Soyland
-   Dmitry Savintsev
-   Hayden B
-   Tomasz Janiszewski
-   Ville Skyttä

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODAuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE4MC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Copy link

@whou-v whou-v left a comment

Choose a reason for hiding this comment

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

Help

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.

Cosign copy command requires "--only" since 2.4.2
3 participants