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

Add isBuildArtifact field to Artifacts #8103

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

chitrangpatel
Copy link
Member

@chitrangpatel chitrangpatel commented Jul 8, 2024

Changes

As justified in TEP tektoncd/community#1155, this PR adds isBuildArtifact field to Artifacts.
This field will allow Tekton Chains to understand user's desire and appropriate add the artifact as a subject or a byProduct in the SLSA provenance.

Submitter Checklist

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

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Add `isBuildArtifact` field to Artifacts.

/kind feature

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 8, 2024
@chitrangpatel
Copy link
Member Author

/assign @ericzzzzzzz

@tekton-robot
Copy link
Collaborator

@chitrangpatel: GitHub didn't allow me to assign the following users: ericzzzzzzz.

Note that only tektoncd members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @ericzzzzzzz

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.

@ericzzzzzzz
Copy link
Contributor

We may need to refactor

func (a *Artifacts) Merge(another Artifacts) {
to merge IsBuildArtifact from stepArtifact into taskArtifact, without this, IsBuildArtifact will not be propagated to status.Artifacts.outputs if we write artifacts to $(step.artifacts.path)

@chitrangpatel chitrangpatel force-pushed the isbuildartifact branch 2 times, most recently from 91b33cc to 1d79f89 Compare July 8, 2024 17:16
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 8, 2024
@chitrangpatel
Copy link
Member Author

We may need to refactor

func (a *Artifacts) Merge(another Artifacts) {

to merge IsBuildArtifact from stepArtifact into taskArtifact, without this, IsBuildArtifact will not be propagated to status.Artifacts.outputs if we write artifacts to $(step.artifacts.path)

Thanks! I think I fixed it. When merging, even if one of the artifacts has isBuildArtifact: true then we merge them with the true state since it is more conservative.

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@chitrangpatel
Copy link
Member Author

/hold wait for tektoncd/community#1155

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 8, 2024
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@ericzzzzzzz
Copy link
Contributor

/approve

@chitrangpatel chitrangpatel added this to the Pipeline v0.62 milestone Jul 10, 2024
@chitrangpatel
Copy link
Member Author

/hold cancel

@tekton-robot tekton-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jul 15, 2024
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 17, 2024
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@chitrangpatel chitrangpatel force-pushed the isbuildartifact branch 3 times, most recently from 3256222 to faa32cb Compare July 20, 2024 02:26
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@chitrangpatel
Copy link
Member Author

/retest

1 similar comment
@chitrangpatel
Copy link
Member Author

/retest

docs/artifacts.md Outdated Show resolved Hide resolved
examples/v1/taskruns/alpha/produce-consume-artifacts.yaml Outdated Show resolved Hide resolved
This PR adds isBuildArtifact field to Artifacts.
This field will allow Tekton Chains to understand user's desire
and appropriate add the artifact as a subject or a byProduct in
the SLSA provenance.
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 Jul 24, 2024
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/artifact_types.go 94.7% 95.5% 0.7

@JeromeJu JeromeJu self-assigned this Jul 24, 2024
Copy link
Member

@JeromeJu JeromeJu left a comment

Choose a reason for hiding this comment

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

Checking my understanding - this field should have the same stability level as Artifacts as an alpha feature correct?

btw I don't seem to find artifacts in the alpha feature table https://github.com/tektoncd/pipeline/blob/main/docs/additional-configs.md#alpha-features?

@chitrangpatel
Copy link
Member Author

chitrangpatel commented Jul 24, 2024

Checking my understanding - this field should have the same stability level as Artifacts as an alpha feature correct?

Yes, that's right. It should be the same stability level.

btw I don't seem to find artifacts in the alpha feature table https://github.com/tektoncd/pipeline/blob/main/docs/additional-configs.md#alpha-features?

I can add that in a separate PR.

Copy link
Member

@JeromeJu JeromeJu left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, just some minor feature versioning issue mentioned which could be in separate PRs.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ericzzzzzzz, JeromeJu

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 Jul 24, 2024
@chitrangpatel
Copy link
Member Author

/retest

@tekton-robot tekton-robot merged commit db4ac21 into tektoncd:main Jul 24, 2024
14 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/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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