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 Failed Validation group in message for the status message in PipelineRun #8356

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

divyansh42
Copy link
Member

@divyansh42 divyansh42 commented Oct 30, 2024

Changes

Following up on the #8314, this PR adds more specific error on the ValidationFailure and also remove the ValidationFailure task from the completed task as there will be no TaskRun created for the same. Validation Failed is added to the another group in the message.

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

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 30, 2024
@divyansh42 divyansh42 force-pushed the fix-finally-not-running branch from 1fa8d5d to d408bcc Compare October 30, 2024 10:20
@divyansh42
Copy link
Member Author

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 30, 2024
@divyansh42
Copy link
Member Author

/cc @afrittoli @vdemeester
Could you please take a look at the changes? This is a minor change and a follow up on #8314

@divyansh42
Copy link
Member Author

/cc @vdemeester

@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/reconciler/pipelinerun/resources/pipelinerunstate.go 99.2% 98.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/reconciler/pipelinerun/resources/pipelinerunstate.go 99.2% 98.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/reconciler/pipelinerun/resources/pipelinerunstate.go 99.2% 98.5% -0.7

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.

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 4, 2024
Comment on lines 1293 to 1294
- message: "Tasks Completed: 2 (Failed: 1, Cancelled 0), Skipped: 0"
reason: Failed
- message: "Tasks Completed: 1 (Failed: 1, Cancelled 0), Skipped: 0"
reason: PipelineValidationFailed
Copy link
Member

Choose a reason for hiding this comment

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

NIT: I find this slightly confusing. The PipelineRun, made of two tasks, is finished, with 1 Task completed (failed) and nothing else. The reason "PipelineValidationFailed" helps a bit to explain what happens, but not fully.
Perhaps we could consider the second TaskRun as failed or add a new group "Validation Failed" e.g.

  • Tasks Completed: 1 (Failed: 1, Cancelled 0), Skipped: 0, Failed Validation: 1

If we wanted to avoid adding another group, we could count the failed validation as failed:

  • Tasks Completed: 2 (Failed: 2, Cancelled 0), Skipped: 0

@divyansh42 @vdemeester wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

Ah makes sense ! I do like the idea of having the Failed Validation group.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for bringing this up @afrittoli. I also had this thought earlier.
So from the example that @afrittoli is referencing the complete count is 1 and the Failed task is the one that failed in the validation.
I included validationFailed in the failed task as I see in the code IgnoredFailed is also included in the Failed count so followed the same approach.
I do like the idea of adding the FailedValidation count.

Copy link
Member Author

Choose a reason for hiding this comment

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

@afrittoli I have made the required changes. Could you please take a look?

@divyansh42 divyansh42 force-pushed the fix-finally-not-running branch from d408bcc to 61205af Compare November 5, 2024 08:11
@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/reconciler/pipelinerun/resources/pipelinerunstate.go 99.2% 98.1% -1.1

@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/reconciler/pipelinerun/resources/pipelinerunstate.go 99.2% 98.1% -1.1

@divyansh42 divyansh42 force-pushed the fix-finally-not-running branch from 61205af to b7f19e1 Compare November 5, 2024 08:37
@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/reconciler/pipelinerun/resources/pipelinerunstate.go 99.2% 98.1% -1.1

@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/reconciler/pipelinerun/resources/pipelinerunstate.go 99.2% 98.1% -1.1

@divyansh42 divyansh42 changed the title Fix number of completed and failed task in case of ValidationFailed Add Failed Validation group in message for the status message in PipelineRun Nov 5, 2024
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

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

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thank you!
/lgtm

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

/cherry-pick release-v0.65.x

@vdemeester
Copy link
Member

/cherry-pick release-v0.62.x

@tekton-robot
Copy link
Collaborator

@vdemeester: once the present PR merges, I will cherry-pick it on top of release-v0.65.x in a new PR and assign it to you.

In response to this:

/cherry-pick release-v0.65.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
Collaborator

@vdemeester: once the present PR merges, I will cherry-pick it on top of release-v0.62.x in a new PR and assign it to you.

In response to this:

/cherry-pick release-v0.62.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.

@vdemeester
Copy link
Member

/cherry-pick release-v0.59.x

@tekton-robot
Copy link
Collaborator

@vdemeester: once the present PR merges, I will cherry-pick it on top of release-v0.59.x in a new PR and assign it to you.

In response to this:

/cherry-pick release-v0.59.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.

@vdemeester
Copy link
Member

/cherry-pick release-v0.56.x

@tekton-robot
Copy link
Collaborator

@vdemeester: once the present PR merges, I will cherry-pick it on top of release-v0.56.x in a new PR and assign it to you.

In response to this:

/cherry-pick release-v0.56.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 tekton-robot merged commit e7d577b into tektoncd:main Nov 5, 2024
14 checks passed
@tekton-robot
Copy link
Collaborator

@vdemeester: new pull request created: #8371

In response to this:

/cherry-pick release-v0.56.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
Collaborator

@vdemeester: new pull request created: #8372

In response to this:

/cherry-pick release-v0.65.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
Collaborator

@vdemeester: new pull request created: #8373

In response to this:

/cherry-pick release-v0.62.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
Collaborator

@vdemeester: new pull request created: #8374

In response to this:

/cherry-pick release-v0.59.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. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants