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

WIP: split OIDC providers into separate Go modules #3059

Closed
wants to merge 9 commits into from

Conversation

imjasonh
Copy link
Member

@imjasonh imjasonh commented Jun 14, 2023

This PR demonstrates splitting the current single Go module into a number of smaller Go modules:

  • ./pkg/providers/{buildkite,google,spiffe} implements a provider for various OIDC creds, which rely on sometimes-heavy helper libraries
  • ./pkg/providers/all is a convenience to import the above modules; it's deprecated in this PR
  • ./cmd/cosign is the CLI, which depends on the OIDC providers
  • ./ is the root module, which is "cosign as a library", now without many heavy dependencies
  • ./test depends on ./cmd/cosign and provides e2e tests
  • ./cmd/help depends on ./cmd/cosign [WIP]

Because some functionality and tests in the root module need them:

  • CA testing helpers are moved from ./test/ to ./pkg/cosign/test
  • predicate types are moved from ./cmd/cosign/cli/options to ./pkg/cosign/policy

Previously, inspired by sigstore/sigstore#1115

TODO

  • adding tags for sub-Go-modules, like we do in s/s
  • make test to test each module, since go test ./... won't anymore
  • e2e test breakages

@imjasonh imjasonh marked this pull request as draft June 14, 2023 21:29
@codecov
Copy link

codecov bot commented Jun 14, 2023

Codecov Report

Merging #3059 (53b6a19) into main (51c9bc2) will increase coverage by 18.27%.
The diff coverage is 42.85%.

@@             Coverage Diff             @@
##             main    #3059       +/-   ##
===========================================
+ Coverage   30.64%   48.91%   +18.27%     
===========================================
  Files         155       68       -87     
  Lines        9791     4657     -5134     
===========================================
- Hits         3000     2278      -722     
+ Misses       6341     2077     -4264     
+ Partials      450      302      -148     
Impacted Files Coverage Δ
pkg/policy/attestation.go 31.57% <42.85%> (ø)

... and 87 files with indirect coverage changes

Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
@github-actions
Copy link

github-actions bot commented Aug 8, 2023

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions
Copy link

This PR was closed because it has been stalled for 10 days with no activity.

@github-actions github-actions bot closed this Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant