Skip to content

Conversation

@a-ateek
Copy link
Contributor

@a-ateek a-ateek commented Jul 8, 2025

Fixes #8868

Changes

Previously, when a TaskRun failed due to a result exceeding the maxResultSize, the error message did not include the actual size of the offending result. This makes it harder for users to figure out how much they exceeded the configured limit.

Example:

  Conditions:
    Last Transition Time:  2025-07-03T17:59:57Z
    Message:               [User error]  TaskRun ""max-size-run"" failed: results exceeded size limit 20 bytes
    Reason:                TaskRunResultLargerThanAllowedLimit

This change improves the error message to include the actual size to debug pipelines with large results.
Example:

  Conditions:
    Last Transition Time:  2025-07-05T12:08:56Z
    Message:               [User error]  TaskRun ""max-size-run"" failed: 47 bytes results size exceeds configured limit of 20 bytes
    Reason:                TaskRunResultLargerThanAllowedLimit

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

Improved error message when a TaskRun result exceeds `maxResultSize` to include the actual result size, making it easier to debug oversized results

@tekton-robot tekton-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesnt merit a release note. labels Jul 8, 2025
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 8, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: a-ateek / name: Ateek (f80e6f0)

@tekton-robot tekton-robot requested review from abayer and afrittoli July 8, 2025 07:47
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 8, 2025
@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
internal/sidecarlogresults/sidecarlogresults.go 87.7% 86.0% -1.7
pkg/reconciler/taskrun/taskrun.go 85.9% 85.9% -0.0

@a-ateek
Copy link
Contributor Author

a-ateek commented Jul 8, 2025

/kind feature

@tekton-robot tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesnt merit a release note. labels Jul 8, 2025
@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
internal/sidecarlogresults/sidecarlogresults.go 87.7% 86.0% -1.7
pkg/reconciler/taskrun/taskrun.go 85.9% 85.9% -0.0

@a-ateek a-ateek marked this pull request as ready for review July 9, 2025 02:39
@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 Jul 9, 2025
@pritidesai
Copy link
Member

Thank you @a-ateek for this PR. Please consider adding unit tests to cover the proposed changes.

@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 10, 2025
@a-ateek a-ateek force-pushed the improve-taskrun-error-message branch from 124cddb to 10feff0 Compare July 10, 2025 17:45
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 10, 2025
@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
internal/sidecarlogresults/sidecarlogresults.go 87.7% 86.0% -1.7
pkg/reconciler/taskrun/taskrun.go 85.9% 85.9% -0.0

@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
internal/sidecarlogresults/sidecarlogresults.go 87.7% 86.0% -1.7
pkg/reconciler/taskrun/taskrun.go 85.9% 85.9% -0.0

@a-ateek a-ateek force-pushed the improve-taskrun-error-message branch from c9551b4 to 42572d2 Compare July 10, 2025 18:07
@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
internal/sidecarlogresults/sidecarlogresults.go 87.7% 86.0% -1.7
pkg/reconciler/taskrun/taskrun.go 85.9% 85.9% -0.0

@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
internal/sidecarlogresults/sidecarlogresults.go 87.7% 86.0% -1.7
pkg/reconciler/taskrun/taskrun.go 85.9% 85.9% -0.0

@a-ateek
Copy link
Contributor Author

a-ateek commented Jul 11, 2025

@pritidesai Unit tests already existed for this function and now I have adjusted them according to new error message. Thank you for pointing that out. Also rebased the branch.

@waveywaves
Copy link
Member

/retest

1 similar comment
@waveywaves
Copy link
Member

/retest

@waveywaves
Copy link
Member

@a-ateek would you mind squashing your commits, rebasing and pushing your branch again ? we have recently removed some gittea tests which might be causing these test failures. Just to eliminate the possiblility a rebase would be great.

…Size

Fixes tektoncd#8868

Previously, when a TaskRun failed due to a result exceeding the maxResultSize,
the error message did not include the actual size of the offending result.
This makes it harder for users to figure out how much they exceeded the configured limit.

This change improves the error message to include the actual size to debug pipelines with large results.

lint: use errors.Is for io.EOF check

test: adjust unit tests for sidecar logs too large

Refactored the underlying function to improve error message, so updated the tests to match the new error message.
@a-ateek a-ateek force-pushed the improve-taskrun-error-message branch from 42572d2 to f80e6f0 Compare September 11, 2025 07:32
@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
internal/sidecarlogresults/sidecarlogresults.go 87.6% 86.1% -1.5
pkg/pod/status.go 92.2% 92.4% 0.2
pkg/reconciler/taskrun/taskrun.go 86.5% 86.5% -0.0

@a-ateek
Copy link
Contributor Author

a-ateek commented Sep 11, 2025

/retest

@tekton-robot
Copy link
Collaborator

@a-ateek: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

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.

@waveywaves
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Sep 11, 2025
@vdemeester
Copy link
Member

/retest

@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

Details 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 29, 2025
@vdemeester
Copy link
Member

/retest

2 similar comments
@vdemeester
Copy link
Member

/retest

@vdemeester
Copy link
Member

/retest

@vdemeester vdemeester added this to the v1.9.0 (LTS) milestone Jan 30, 2026
@vdemeester
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2026
@vdemeester vdemeester merged commit d2b0894 into tektoncd:main Jan 30, 2026
62 of 70 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Enhance error message to include actual result size when exceeding maxResultSize

5 participants