-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for multiple WithRemote options #3982
Merged
haydentherapper
merged 1 commit into
sigstore:main
from
warrenhodg:issue-3981-remote-options
Dec 19, 2024
Merged
Fix for multiple WithRemote options #3982
haydentherapper
merged 1 commit into
sigstore:main
from
warrenhodg:issue-3981-remote-options
Dec 19, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When specifying multiple sets of remote options using WithRemoteOptions, only the last set of options are used. The earlier ones are discarded. This is a problem for example, when an initial set of WithRemoteOptions are generated by command-line flags, and then additional ones need to be specified during application execution. Doing so would discard the options set by the command-line flags. To preserve backwards compatibility, where the WithRemoteOptions function overrides the defaults, an additional function WithMoreRemoteOptions has been added, which appends the options to any existing ones. Resolves: sigstore/cosign/sigstore#3981 Signed-off-by: Warren Hodgkinson <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3982 +/- ##
==========================================
- Coverage 40.10% 36.48% -3.63%
==========================================
Files 155 209 +54
Lines 10044 13316 +3272
==========================================
+ Hits 4028 4858 +830
- Misses 5530 7839 +2309
- Partials 486 619 +133 ☔ View full report in Codecov by Sentry. |
haydentherapper
approved these changes
Dec 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Feb 6, 2025
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [cosign](https://github.com/sigstore/cosign) | patch | `2.4.1` -> `2.4.2` | 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.2`](https://github.com/sigstore/cosign/blob/HEAD/CHANGELOG.md#v242) [Compare Source](sigstore/cosign@v2.4.1...v2.4.2) #### Features - Updated open-policy-agent to 1.1.0 library ([#​4036](sigstore/cosign#4036)) - Note that only Rego v0 policies are supported at this time - Add UseSignedTimestamps to CheckOpts, refactor TSA options ([#​4006](sigstore/cosign#4006)) - Add support for verifying root checksum in cosign initialize ([#​3953](sigstore/cosign#3953)) - Detect if user supplied a valid protobuf bundle ([#​3931](sigstore/cosign#3931)) - Add a log message if user doesn't provide `--trusted-root` ([#​3933](sigstore/cosign#3933)) - Support mTLS towards container registry ([#​3922](sigstore/cosign#3922)) - Add bundle create helper command ([#​3901](sigstore/cosign#3901)) - Add trusted-root create helper command ([#​3876](sigstore/cosign#3876)) #### Bug Fixes - fix: set tls config while retaining other fields from default http transport ([#​4007](sigstore/cosign#4007)) - policy fuzzer: ignore known panics ([#​3993](sigstore/cosign#3993)) - Fix for multiple WithRemote options ([#​3982](sigstore/cosign#3982)) - Add nightly conformance test workflow ([#​3979](sigstore/cosign#3979)) - Fix copy --only for signatures + update/align docs ([#​3904](sigstore/cosign#3904)) #### Documentation - Remove usage.md from spec, point to client spec ([#​3918](sigstore/cosign#3918)) - move reference from gcr to ghcr ([#​3897](sigstore/cosign#3897)) #### Contributors - AdamKorcz - Aditya Sirish - Bob Callaway - Carlos Tadeu Panato Junior - Cody Soyland - Colleen Murphy - Hayden B - Jussi Kukkonen - Marco Franssen - Nianyu Shen - Slavek Kabrda - Søren Juul - Warren Hodgkinson - Zach Steindler </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNTguMSIsInVwZGF0ZWRJblZlciI6IjM5LjE1OC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
When specifying multiple sets of remote options using WithRemoteOptions, only the last set of options are used. The earlier ones are discarded. This is a problem for example, when an initial set of WithRemoteOptions are generated by command-line flags, and then additional ones need to be specified during application execution. Doing so would discard the options set by the command-line flags.
To preserve backwards compatibility, where the WithRemoteOptions function overrides the defaults, an additional function WithMoreRemoteOptions has been added, which appends the options to any existing ones.
Resolves: sigstore/cosign/#3981
Release Note
Function WithMoreRemoteOptions has been added that allows one to append additional remote options to those
already specified.
Documentation
None