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 mapping between Status.Steps and Status.TaskSpec.Steps #1188

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

jkhelil
Copy link
Member

@jkhelil jkhelil commented Aug 26, 2024

Changes

this PR fixes the mapping between tr.Status.Steps and tr.Status.taskSpec.steps in this way:

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

NONE

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 26, 2024
@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/v1/pipelinerun/pipelinerun.go 72.0% 75.9% 3.9

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.

One question.

if len(tr.Status.TaskSpec.Steps) != len(tr.Status.Steps) {
logger.Errorf("Mismatch in number of steps for task run %s. TaskSpec steps: %d, Status steps: %d",
tr.Name, len(tr.Status.TaskSpec.Steps), len(tr.Status.Steps))
continue // Skip this task run entirely
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we mark the TaskRun as "failed to sign" or something ? (so that the controller doesn't pick it up later on).

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we dont have a way to do this today, i reference a discussion here about that #979

@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/v1/pipelinerun/pipelinerun.go 72.0% 75.9% 3.9

@jkhelil
Copy link
Member Author

jkhelil commented Aug 27, 2024

/test pull-tekton-chains-unit-tests

1 similar comment
@jkhelil
Copy link
Member Author

jkhelil commented Aug 27, 2024

/test pull-tekton-chains-unit-tests

@jkhelil
Copy link
Member Author

jkhelil commented Aug 28, 2024

@lcarva @vdemeester can you have a look please ?

@jkhelil
Copy link
Member Author

jkhelil commented Sep 10, 2024

Hi @lcarva, can you have a look to this please ?

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.

/lgtm

Thank you!

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lcarva, 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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 10, 2024
@tekton-robot tekton-robot merged commit a8cd5f6 into tektoncd:main Sep 10, 2024
18 checks passed
jkhelil added a commit to jkhelil/chains that referenced this pull request Sep 16, 2024
tekton-robot pushed a commit that referenced this pull request Sep 16, 2024
…1203)

* fix mapping between Status.Steps and Status.TaskSpec.Steps (#1188)

* .github: add github-actions to dependabot… (#1194)

* .github: add github-actions to dependabot…

… so that we also get dependabot actions updates. Today, we seems to
be using deprecated actions.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>

* .github/workflows: update some action versions

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>

---------

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>

---------

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
Co-authored-by: Vincent Demeester <vdemeest@redhat.com>
@lcarva lcarva mentioned this pull request Nov 7, 2024
@vdemeester
Copy link
Member

/cherry-pick release-v0.22.x

@vdemeester
Copy link
Member

/cherry-pick release-v0.21.x

@vdemeester
Copy link
Member

/cherry-pick release-v0.22.x

@vdemeester
Copy link
Member

/cherry-pick release-v0.21.x

@tekton-robot
Copy link

@vdemeester: new pull request could not be created: failed to create pull request against tektoncd/chains#release-v0.22.x from head tekton-robot:cherry-pick-1188-to-release-v0.22.x: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"No commits between tektoncd:release-v0.22.x and tekton-robot:cherry-pick-1188-to-release-v0.22.x"}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request","status":"422"}

In response to this:

/cherry-pick release-v0.22.x

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
Copy link

@vdemeester: #1188 failed to apply on top of branch "release-v0.21.x":

Applying: fix mapping between Status.Steps and Status.TaskSpec.Steps
Using index info to reconstruct a base tree...
M	pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go
M	pkg/chains/formats/slsa/v1/pipelinerun/provenance_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/chains/formats/slsa/v1/pipelinerun/provenance_test.go
Auto-merging pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go
CONFLICT (content): Merge conflict in pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix mapping between Status.Steps and Status.TaskSpec.Steps
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-v0.21.x

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.

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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tekton Chains Controller is in "CrashLoopBackOff" due to "index out of range" error
4 participants