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

Fix no repeated subjects for v2alpha4 pipelineruns #1130

Merged

Conversation

renzodavid9
Copy link
Contributor

@renzodavid9 renzodavid9 commented Jun 4, 2024

Fixes: #1131

Change the pipelinerun v2alpha4 method that calculates the subjects to use artifact.AppendSubjects instead of append to avoid duplicated subjects.

Changes

Use of artifact.AppendSubjects instead of append when calculating subjects with artifacts.pipelinerun.enable-deep-inspection: "true" for a pipelinerun using v2alpha4 formatter.

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

@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 Jun 4, 2024
@tekton-robot
Copy link

Hi @renzodavid9. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 4, 2024
@chitrangpatel
Copy link
Contributor

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 4, 2024
@renzodavid9 renzodavid9 force-pushed the issue-repeated-subjects-v2alpha4 branch from e10a5cd to 22d7ea4 Compare June 4, 2024 18:15
@renzodavid9 renzodavid9 marked this pull request as ready for review June 4, 2024 18:48
@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 Jun 4, 2024
@chitrangpatel
Copy link
Contributor

Thanks for the quick fix @renzodavid9 !!
/approve
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2024
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chitrangpatel

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 5, 2024
Change the pipelinerun v2alpha4 method that calculates the subjects to use `artifact.AppendSubjects` instead of `append` to avoid duplicated subjects.
@renzodavid9 renzodavid9 force-pushed the issue-repeated-subjects-v2alpha4 branch from 22d7ea4 to dea2e34 Compare June 5, 2024 14:59
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2024
@renzodavid9
Copy link
Contributor Author

renzodavid9 commented Jun 5, 2024

Rebased with latest changes fixing t _type and predicateTpe fields, those should fix failing integration tests here

@chitrangpatel
Copy link
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2024
@tekton-robot tekton-robot merged commit badc734 into tektoncd:main Jun 5, 2024
17 checks passed
@chitrangpatel
Copy link
Contributor

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 8, 2024
chitrangpatel pushed a commit to chitrangpatel/chains that referenced this pull request Jun 8, 2024
Change the pipelinerun v2alpha4 method that calculates the subjects to use `artifact.AppendSubjects` instead of `append` to avoid duplicated subjects.

(cherry picked from commit badc734)
renzodavid9 added a commit to renzodavid9/chains that referenced this pull request Jun 9, 2024
Change the pipelinerun v2alpha4 method that calculates the subjects to use `artifact.AppendSubjects` instead of `append` to avoid duplicated subjects.

(cherry picked from commit badc734)
@renzodavid9 renzodavid9 mentioned this pull request Jun 9, 2024
6 tasks
tekton-robot pushed a commit that referenced this pull request Jun 10, 2024
* Fix field names in generated json statement (#1129)

To keep backwards compatibility with previous struct versions (e.g, github.com/in-toto/in-toto-golang/in_toto) we have to use protojson.Marshal function to transform the struct to its json representation so the tags defined in the intoto.Statement are follow and applied to the resulting string.

(cherry picked from commit 3bf8cac)

* Fix no repeated subjects for v2alpha4 pipelineruns (#1130)

Change the pipelinerun v2alpha4 method that calculates the subjects to use `artifact.AppendSubjects` instead of `append` to avoid duplicated subjects.

(cherry picked from commit badc734)

* Calculate subjects per formatter (#1132)

* Calculate subjects per formatter

* Tests for new retrieve full uris in grafeas

(cherry picked from commit 750a98e)
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/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repeated subjects when using v2alpha4 and pipelineruns with deep-inspection enabled
3 participants