Skip to content
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

Refactor based on discussions in #1650 #1674

Merged
merged 4 commits into from
Mar 28, 2022
Merged

Conversation

vaikas
Copy link
Contributor

@vaikas vaikas commented Mar 28, 2022

Signed-off-by: Ville Aikas vaikas@chainguard.dev

Summary

Refactor code based on discussions in #1650 as followups.

Ticket Link

Fixes

Release Note


Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@vaikas
Copy link
Contributor Author

vaikas commented Mar 28, 2022

@mattmoor @hectorj2f
Addressing your PR feedback, ptal :)

// at authority.Sources to determine additional information for the
// WithRemoteOptions below, at least the 'TargetRepository'
// https://github.com/sigstore/cosign/issues/1651
opts := ociremote.WithRemoteOptions(remote.WithAuthFromKeychain(kc))
Copy link
Member

Choose a reason for hiding this comment

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

Should we also include the ociremote.Option argument from above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, it's never currently used, so just left it in the TODO, but done :)

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

My one comment isn't new, but we should probably still sort it out.

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Copy link
Contributor

@hectorj2f hectorj2f left a comment

Choose a reason for hiding this comment

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

Lgtm

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2022

Codecov Report

Merging #1674 (a89f962) into main (34d0838) will increase coverage by 0.05%.
The diff coverage is 78.57%.

@@            Coverage Diff             @@
##             main    #1674      +/-   ##
==========================================
+ Coverage   29.20%   29.25%   +0.05%     
==========================================
  Files         140      140              
  Lines        8340     8346       +6     
==========================================
+ Hits         2436     2442       +6     
  Misses       5639     5639              
  Partials      265      265              
Impacted Files Coverage Δ
pkg/cosign/kubernetes/webhook/validator.go 81.75% <78.00%> (+1.25%) ⬆️
pkg/cosign/kubernetes/webhook/validation.go 80.21% <83.33%> (ø)
cmd/cosign/cli/commands.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/registry.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34d0838...a89f962. Read the comment docs.

@dlorenc dlorenc merged commit a1781eb into sigstore:main Mar 28, 2022
@github-actions github-actions bot added this to the v1.7.0 milestone Mar 28, 2022
@vaikas vaikas deleted the refactor-1650 branch March 28, 2022 21:35
mlieberman85 pushed a commit to mlieberman85/cosign that referenced this pull request May 6, 2022
* Refactor based on discussions in sigstore#1650

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>

* Simplify return signature.

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>

* pr feedback.

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>

* remove now unnecessary var.

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
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.

None yet

5 participants