Skip to content

Conversation

@vincent-pli
Copy link
Member

@vincent-pli vincent-pli commented May 15, 2020

Fix issue: #2617

Tekton use container termination message of kubenetes to pass additional information to the controller(by Tekton Result).

Kubenates use MaxContainerTerminationMessageLength which is 4096 to limit the read size from disk, the redundant content will be discard. See the below implements in Kubenetes:

https://github.com/kubernetes/kubernetes/blob/96e13de777a9eb57f87889072b68ac40467209ac/pkg/kubelet/kuberuntime/kuberuntime_container.go#L420

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

Tasks will now fail if they emit termination messages larger than Kubernetes' termination message size. At time of writing this is 4096 bytes. Since Task Results are returned JSON-encoded through a container's termination message please take care that they do not bloat the message over 4096 bytes.

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 15, 2020
@tekton-robot
Copy link
Collaborator

This PR cannot be merged: expecting exactly one kind/ label

Available kind/ labels are:

kind/bug: Categorizes issue or PR as related to a bug.
kind/flake: Categorizes issue or PR as related to a flakey test
kind/cleanup: Categorizes issue or PR as related to cleaning up code, process, or technical debt.
kind/design: Categorizes issue or PR as related to design.
kind/documentation: Categorizes issue or PR as related to documentation.
kind/feature: Categorizes issue or PR as related to a new feature.
kind/misc: Categorizes issue or PR as a miscellaneuous one.

1 similar comment
@tekton-robot
Copy link
Collaborator

This PR cannot be merged: expecting exactly one kind/ label

Available kind/ labels are:

kind/bug: Categorizes issue or PR as related to a bug.
kind/flake: Categorizes issue or PR as related to a flakey test
kind/cleanup: Categorizes issue or PR as related to cleaning up code, process, or technical debt.
kind/design: Categorizes issue or PR as related to design.
kind/documentation: Categorizes issue or PR as related to documentation.
kind/feature: Categorizes issue or PR as related to a new feature.
kind/misc: Categorizes issue or PR as a miscellaneuous one.

@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/termination/write.go 68.4% 68.2% -0.2

@vincent-pli
Copy link
Member Author

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 15, 2020
@vincent-pli
Copy link
Member Author

/assign @sbwsg

@tekton-robot tekton-robot assigned ghost May 15, 2020
Copy link
Member

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

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

Thanks for this, just a couple tiny comments. 🎉

@ghost
Copy link

ghost commented May 15, 2020

We should probably also document this change and mention it in release notes.

Could you update the Release Notes in the PR to something like this:

Tasks will now fail if they emit termination messages larger than Kubernetes' termination message size. At time of writing this is 4096 bytes. Since Task Results are returned JSON-encoded through a container's termination message please take care that they do not bloat the message over 4096 bytes.

And update the Results section in tasks.md to describe the limit that's imposed and the error that will be returned?

@afrittoli
Copy link
Member

@vincent-pli thanks for this. Could you either remove or feel-in the release notes section in the PR (as appropriate)? Thanks!

@vincent-pli vincent-pli force-pushed the validate-task-result-length branch from ca0a042 to 2f09938 Compare May 16, 2020 13:24
Tekton use container termination message of kubenetes to pass additional information to the controller(by Tekton Result).
Kubenates use `MaxContainerTerminationMessageLength` which is 4096 to limit the read size from disk, the redundant content will be discard.
@vincent-pli vincent-pli force-pushed the validate-task-result-length branch from 2f09938 to ae3a467 Compare May 16, 2020 13:32
@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/termination/write.go 68.4% 68.2% -0.2

@vincent-pli
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

@vincent-pli
Copy link
Member Author

@sbwsg @afrittoli
Added the release notes and enhanced the documents.

@vdemeester vdemeester added kind/bug Categorizes issue or PR as related to a bug. and removed kind/bug Categorizes issue or PR as related to a bug. labels May 18, 2020
@tekton-robot
Copy link
Collaborator

This PR cannot be merged: expecting exactly one kind/ label

Available kind/ labels are:

kind/bug: Categorizes issue or PR as related to a bug.
kind/flake: Categorizes issue or PR as related to a flakey test
kind/cleanup: Categorizes issue or PR as related to cleaning up code, process, or technical debt.
kind/design: Categorizes issue or PR as related to design.
kind/documentation: Categorizes issue or PR as related to documentation.
kind/feature: Categorizes issue or PR as related to a new feature.
kind/misc: Categorizes issue or PR as a miscellaneuous one.

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.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 18, 2020
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbwsg

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 May 28, 2020
@tekton-robot tekton-robot merged commit f60cff9 into tektoncd:master May 28, 2020
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants