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

Increase direct usage of Tekton Object Interface #896

Conversation

chitrangpatel
Copy link
Contributor

@chitrangpatel chitrangpatel commented Aug 8, 2023

This PR further increases the usage of the Tekton object interface in our codebase. It adds functions to get images from steps and sidecars and also extracts the RefSource from Status.Provenance.

Changes

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Internally increase direct usage of Tekton Object Interface 

/kind cleanup

@tekton-robot tekton-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Aug 8, 2023
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 8, 2023
@chitrangpatel
Copy link
Contributor Author

/assign @lcarva

@chitrangpatel chitrangpatel marked this pull request as draft August 8, 2023 19:17
@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 Aug 8, 2023
@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/material/material.go 93.7% 91.8% -1.9
pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go 79.5% 78.5% -1.0
pkg/chains/formats/slsa/v1/taskrun/taskrun.go 62.5% 57.1% -5.4
pkg/chains/objects/objects.go 66.0% 44.6% -21.4

Copy link
Contributor

@lcarva lcarva left a comment

Choose a reason for hiding this comment

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

Nice!

pkg/chains/formats/slsa/internal/material/material_test.go Outdated Show resolved Hide resolved
@chitrangpatel chitrangpatel force-pushed the increase-dependence-on-tekton-objects branch 2 times, most recently from 7714c5f to 3a0b03f Compare August 11, 2023 19:51
@chitrangpatel chitrangpatel marked this pull request as ready for review August 14, 2023 18:43
@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 Aug 14, 2023
@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/material/material.go 93.7% 91.8% -1.9
pkg/chains/objects/objects.go 66.0% 38.4% -27.6

@chitrangpatel
Copy link
Contributor Author

/retest

@chitrangpatel chitrangpatel force-pushed the increase-dependence-on-tekton-objects branch from 3a0b03f to 5741c0e Compare August 25, 2023 14:45
@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 25, 2023
@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/objects/objects.go 66.0% 80.2% 14.2

@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/objects/objects.go 66.0% 80.2% 14.2

@chitrangpatel chitrangpatel force-pushed the increase-dependence-on-tekton-objects branch from 5741c0e to 5693ab4 Compare August 25, 2023 15:25
@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/material/material.go 92.9% 91.2% -1.8
pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go 79.5% 76.3% -3.2
pkg/chains/formats/slsa/v1/taskrun/taskrun.go 62.5% 55.6% -6.9
pkg/chains/objects/objects.go 66.0% 80.2% 14.2

@chitrangpatel chitrangpatel force-pushed the increase-dependence-on-tekton-objects branch from 5693ab4 to 14b715e Compare August 25, 2023 17:16
@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/material/material.go 92.9% 91.2% -1.8
pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go 79.5% 76.3% -3.2
pkg/chains/formats/slsa/v1/taskrun/taskrun.go 62.5% 55.6% -6.9
pkg/chains/objects/objects.go 66.0% 80.2% 14.2

@chitrangpatel chitrangpatel force-pushed the increase-dependence-on-tekton-objects branch from 14b715e to 88aaba5 Compare August 25, 2023 18:16
@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/material/material.go 92.9% 91.2% -1.8
pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go 79.5% 76.3% -3.2
pkg/chains/formats/slsa/v1/taskrun/taskrun.go 62.5% 55.6% -6.9
pkg/chains/objects/objects.go 66.0% 80.2% 14.2

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 5, 2023
@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/material/material.go 92.9% 91.2% -1.8
pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go 79.5% 77.6% -1.8
pkg/chains/formats/slsa/v1/taskrun/taskrun.go 62.5% 61.9% -0.6
pkg/chains/objects/objects.go 66.0% 75.7% 9.7

@chitrangpatel chitrangpatel force-pushed the increase-dependence-on-tekton-objects branch from 8b3fb31 to b2eafed Compare September 5, 2023 17:42
@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/material/material.go 92.9% 91.2% -1.8
pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go 79.5% 77.6% -1.8
pkg/chains/formats/slsa/v1/taskrun/taskrun.go 62.5% 61.9% -0.6
pkg/chains/objects/objects.go 66.0% 75.7% 9.7

@chitrangpatel chitrangpatel force-pushed the increase-dependence-on-tekton-objects branch from b2eafed to 63223ad Compare September 5, 2023 17:48
@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/material/material.go 92.9% 91.2% -1.8
pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go 79.5% 77.6% -1.8
pkg/chains/formats/slsa/v1/taskrun/taskrun.go 62.5% 61.9% -0.6
pkg/chains/objects/objects.go 66.0% 75.7% 9.7

@chitrangpatel chitrangpatel force-pushed the increase-dependence-on-tekton-objects branch from 63223ad to cc9a743 Compare September 5, 2023 18:21
@chuangw6
Copy link
Member

chuangw6 commented Sep 5, 2023

/approve

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 5, 2023
@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/material/material.go 92.9% 91.2% -1.8
pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go 79.5% 77.6% -1.8
pkg/chains/formats/slsa/v1/taskrun/taskrun.go 62.5% 61.9% -0.6
pkg/chains/objects/objects.go 66.0% 75.7% 9.7

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.

Almost there! PR comment probably needs an update. 🙏

pkg/chains/objects/objects.go Outdated Show resolved Hide resolved
@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/material/material.go 92.9% 91.2% -1.8
pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go 79.5% 77.6% -1.8
pkg/chains/formats/slsa/v1/taskrun/taskrun.go 62.5% 61.9% -0.6
pkg/chains/objects/objects.go 66.0% 71.2% 5.2

pkg/chains/objects/objects.go Outdated Show resolved Hide resolved
pkg/chains/objects/objects.go Outdated Show resolved Hide resolved
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.

Almost there!

This PR further increases the usage of the Tekton object interface in our codebase.
@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/material/material.go 92.9% 91.2% -1.8
pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go 79.5% 77.6% -1.8
pkg/chains/formats/slsa/v1/taskrun/taskrun.go 62.5% 61.9% -0.6
pkg/chains/formats/slsa/v2alpha2/internal/pipelinerun/pipelinerun.go 92.9% 93.0% 0.2
pkg/chains/formats/slsa/v2alpha2/internal/taskrun/taskrun.go 92.9% 93.0% 0.2
pkg/chains/objects/objects.go 66.0% 71.7% 5.7

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.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 12, 2023
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chuangw6, wlynch

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

@tekton-robot tekton-robot merged commit 94d0d16 into tektoncd:main Sep 12, 2023
19 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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants