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

feat: add v2alpha3 format #1031

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Conversation

aaron-prindle
Copy link
Contributor

@aaron-prindle aaron-prindle commented Jan 10, 2024

Fixes #1026

This PR adds a v2alpha3 format which uses Tekton v1 object(s) in it's Payload information. For backwards compatibility, v2alpha2 and below versions use Tekton v1beta1 object(s) in their Payload information so this is first/only format currently that uses Tekton v1 objects E2E (doesn't convert to v1beta1 in format/*)

This PR is the second part of the in the v1beta1 -> v1 tektoncd/chains work split that was identified here:
#1016 (review)

Once this is in, the workstream there should be complete

@tekton-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 10, 2024
@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jan 10, 2024
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 15, 2024
@aaron-prindle aaron-prindle marked this pull request as ready for review January 17, 2024 19:58
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 17, 2024
@aaron-prindle aaron-prindle changed the title [DRAFT] based off of WIP PR #1016, this PR adds v2alpha3 format that uses Tekton V1 Objects E2E (vs v1beta1 Payload representations) feat: add v2alpha3 format Jan 17, 2024
@aaron-prindle
Copy link
Contributor Author

aaron-prindle commented Jan 17, 2024

Thanks @wlynch for the reviews on #1016! 🎊 This PR is the second part of the in the v1beta1 -> v1 tektoncd/chains work split that was identified here:
#1016 (review)

Once this is in, the workstream there should be complete

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/formats/slsa/v2alpha3/internal/external_parameters/external_parameters.go Do not exist 87.5%
pkg/chains/formats/slsa/v2alpha3/internal/internal_parameters/internal_parameters.go Do not exist 100.0%
pkg/chains/formats/slsa/v2alpha3/internal/pipelinerun/pipelinerun.go Do not exist 83.8%
pkg/chains/formats/slsa/v2alpha3/internal/resolved_dependencies/resolved_dependencies.go Do not exist 87.5%
pkg/chains/formats/slsa/v2alpha3/internal/taskrun/taskrun.go Do not exist 86.5%
pkg/chains/formats/slsa/v2alpha3/slsav2.go Do not exist 87.5%

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

❤️

@chitrangpatel
Copy link
Member

/approve

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chitrangpatel, vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@wlynch wlynch left a comment

Choose a reason for hiding this comment

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

Overall looks good!

docs/config.md Show resolved Hide resolved
@aaron-prindle
Copy link
Contributor Author

aaron-prindle commented Jan 24, 2024

I believe all review feedback has been addressed now:

  • Updated docs/config.md to include slsa/v2alpha2 & slsa/v2alpha3 and NOTESs to explain their differences + recommended format version for new users.
  • Refactored v2alpha2 and v2alpha3 external_parameters/ code to de-dupe code (namely function buildConfigSource').
  • Additionally de-duped internal_parameters/, resolved_dependecies/, and build_type (all dupe locations)

lmk if there is any additional feedback or items to address. Thanks!

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/formats/slsa/internal/external_parameters/external_parameters.go Do not exist 100.0%
pkg/chains/formats/slsa/internal/internal_parameters/internal_parameters.go Do not exist 0.0%
pkg/chains/formats/slsa/v2alpha2/internal/external_parameters/external_parameters.go 87.5% 80.0% -7.5
pkg/chains/formats/slsa/v2alpha3/internal/external_parameters/external_parameters.go Do not exist 80.0%
pkg/chains/formats/slsa/v2alpha3/internal/resolved_dependencies/resolved_dependencies.go Do not exist 87.5%
pkg/chains/formats/slsa/v2alpha3/slsav2.go Do not exist 87.5%

Copy link
Member

@wlynch wlynch left a comment

Choose a reason for hiding this comment

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

I think there's probably more refactoring we can do to leverage TektonObject to reduce duplication across v2alpha2 and v2alpha3, but I won't let this block the PR. LGTM!

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2024
@tekton-robot tekton-robot merged commit 03d85fa into tektoncd:main Jan 25, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
5 participants