pipeline
pipeline copied to clipboard
Compress Runs' data before adding to annotations
Changes
When embedded-status
is set to both
or full
, then TaskRun and PipelineRun payload JSON is added to annotations to facilitate conversion. This JSON payload is occasionally too large to fit into annotations and the maximum size limit of annotations (256 kB, combined limit for all annotations) is exceeded leading to errors while fetching Tekton workloads.
Example:
$ tkn pr ls
Failed to list objects from pipelines-ci namespace
Error: failed to list PipelineRuns from namespace pipelines-ci: conversion webhook for tekton.dev/v1beta1, Kind=PipelineRun returned invalid metadata: metadata.annotation: Too long: must have at most 262144 bytes
This commit mitigates this in 2 ways:
- The JSON payload is compressed before adding to the annotations. This helps in reducing the size footprint of the annotations quite a bit. The data is further encoded after compression so as to sanitize the compressed data which is in binary.
- Once the annotations are added, the size is validated and an error is returned if the annotions size limit is exceeded.
Fix #6561
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
- [x] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
- [x] Has Tests included if any functionality added or changed
- [x] Follows the commit message standard
- [x] Meets the Tekton contributor standards (including functionality, content, code)
- [x] 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 - [x] 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.
- [x] Release notes contains the string "action required" if the change requires additional action from users switching to the new release
Release Notes
NONE
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/version/conversion.go | 81.2% | 72.2% | -9.0 |
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/version/conversion.go | 81.2% | 72.2% | -9.0 |
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/version/conversion.go | 81.2% | 72.2% | -9.0 |
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/version/conversion.go | 81.2% | 72.2% | -9.0 |
This PR is also targeting the release-0.44.x release branch. Is that intentional?
ππΌ yes, i'm currently impacted on this release branch so i've sent a fix here, once this goes in i will cherry pick to main.
As-is I think the change will break existing installations that already have their data stored as json (since as of v0.49.0 v1 is the storage version). We'll need to be able to handle both cases for backwards compatibility.
@wlynch during testing i found that the existing JSON data in pipelineruns was getting converted to the new compressed + decoded format π€ not sure if that's the expected behavior though, and what might that break? π€
/cc jerop who probably has more context on this than I do.
As-is I think the change will break existing installations that already have their data stored as json (since as of v0.49.0 v1 is the storage version). We'll need to be able to handle both cases for backwards compatibility.
This PR is also targeting the release-0.44.x release branch. Is that intentional?
So that's indeed the case but :
- This is only on 0.44.x (and above, until next LTS, so 0.47.x)
- There is "almost" nothing else using this (except the
PipelineResource
serialization to v1) elsewher - We could, at deserialization, try to decode and if it doesn't work to unmarshall directly as a failover. That would make sure we can read both, but we always write wit the new format
- This targets 0.44.x as this is where we have our bug but this should be done on main as well. Either we cherry-pick from main to 0.44 or the opposite, I am fine with both πΌπΌ
@wlynch during testing i found that the existing JSON data in pipelineruns was getting converted to the new compressed + decoded format not sure if that's the expected behavior though, and what might that break?
This is probably due to the fact that the storage version is v1beta1
in 0.44.x so.. it's never "stored" with the annotation, making it never stored (and thus, not a problem, in 0.44.x and all version that use v1beta1
as storage π )
/kind bug
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/version/conversion.go | 81.2% | 72.2% | -9.0 |
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/version/conversion.go | 81.2% | 72.2% | -9.0 |
/retest
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen
with a justification.
/lifecycle stale
Send feedback to tektoncd/plumbing.
/remove-lifecycle stale need to fix
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/version/conversion.go | 81.2% | 72.2% | -9.0 |
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/version/conversion.go | 81.2% | 72.2% | -9.0 |
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/v1beta1/pipelinerun_conversion.go | 95.7% | 95.3% | -0.4 |
pkg/apis/version/conversion.go | 81.2% | 72.2% | -9.0 |
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/v1beta1/pipelinerun_conversion.go | 95.7% | 95.3% | -0.4 |
pkg/apis/version/conversion.go | 81.2% | 72.2% | -9.0 |
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/v1beta1/pipelinerun_conversion.go | 95.7% | 94.6% | -1.1 |
pkg/apis/version/conversion.go | 81.2% | 72.1% | -9.2 |
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/v1beta1/pipelinerun_conversion.go | 95.7% | 94.6% | -1.1 |
pkg/apis/version/conversion.go | 81.2% | 72.1% | -9.2 |
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign vdemeester after the PR has been reviewed.
You can assign the PR to them by writing /assign @vdemeester
in a comment when ready.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
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/v1beta1/pipelinerun_conversion.go | 95.7% | 94.6% | -1.1 |
pkg/apis/version/conversion.go | 81.2% | 72.1% | -9.2 |
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/v1beta1/pipelinerun_conversion.go | 95.7% | 94.6% | -1.1 |
pkg/apis/version/conversion.go | 81.2% | 72.1% | -9.2 |
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/v1beta1/pipelinerun_conversion.go | 95.7% | 94.6% | -1.1 |
pkg/apis/version/conversion.go | 81.2% | 72.1% | -9.2 |
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/v1beta1/pipelinerun_conversion.go | 95.7% | 94.6% | -1.1 |
pkg/apis/version/conversion.go | 81.2% | 72.1% | -9.2 |
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/v1beta1/pipelinerun_conversion.go | 95.7% | 94.6% | -1.1 |
pkg/apis/version/conversion.go | 81.2% | 72.1% | -9.2 |
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/v1beta1/pipelinerun_conversion.go | 95.7% | 94.6% | -1.1 |
pkg/apis/version/conversion.go | 81.2% | 72.1% | -9.2 |
@concaf: The following tests failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
pull-tekton-pipeline-build-tests | fd9d4e31ca5594b40c855e6e6102c0c31f8be77e | link | true | /test pull-tekton-pipeline-build-tests |
pull-tekton-pipeline-beta-integration-tests | fd9d4e31ca5594b40c855e6e6102c0c31f8be77e | link | true | /test pull-tekton-pipeline-beta-integration-tests |
pull-tekton-pipeline-integration-tests | fd9d4e31ca5594b40c855e6e6102c0c31f8be77e | link | true | /test pull-tekton-pipeline-integration-tests |
pull-tekton-pipeline-alpha-integration-tests | fd9d4e31ca5594b40c855e6e6102c0c31f8be77e | link | true | /test pull-tekton-pipeline-alpha-integration-tests |
Full PR test history. Your PR dashboard.
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. I understand the commands that are listed here.
@concaf are you still working on this PR?
pipeline WG @May 14th we can close this if support is no longer needed