pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

feat: Surface artifacts through sidecar container logs.

Open ericzzzzzzz opened this issue 10 months ago • 53 comments

Changes

  • This Pr uses the similar approach as https://github.com/tektoncd/pipeline/pull/7414 to surface large artifacts to TaskRun.statue.steps.
  • The flag result-from:sidecar-logs is used to guard this feature, it is also the same as surfacing step results through sidecar logs.
  • As we don't have a API to allow users to declare if a step is going to produce artifacts, we check if a step env, command, args, script contains artifacts path to determine if we should create an artifact sidecar container should be created for a task.

Fixes: #7869

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
  • [x] Has Tests included if any functionality added or changed
  • [ ] pre-commit Passed
  • [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.
  • [ ] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Surface artifacts through sidecar container logs.

ericzzzzzzz avatar Apr 15 '24 17:04 ericzzzzzzz

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

tekton-robot avatar Apr 15 '24 17:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
pkg/apis/pipeline/images.go 100.0% 87.5% -12.5
pkg/apis/pipeline/v1/task_validation.go 98.6% 98.3% -0.3
pkg/entrypoint/entrypointer.go 86.8% 86.9% 0.0
pkg/pod/entrypoint.go 94.1% 93.2% -0.9
pkg/pod/pod.go 93.6% 92.6% -1.0
pkg/pod/status.go 94.7% 94.2% -0.5

tekton-robot avatar Apr 15 '24 17:04 tekton-robot

/kind feat

ericzzzzzzz avatar Apr 22 '24 14:04 ericzzzzzzz

@ericzzzzzzz: The label(s) kind/feat cannot be applied, because the repository doesn't have them.

In response to this:

/kind feat

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 avatar Apr 22 '24 14:04 tekton-robot

/kind feature

ericzzzzzzz avatar Apr 22 '24 14:04 ericzzzzzzz

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
pkg/apis/pipeline/images.go 100.0% 87.5% -12.5
pkg/apis/pipeline/v1/task_validation.go 98.6% 98.3% -0.3
pkg/entrypoint/entrypointer.go 86.8% 86.9% 0.0
pkg/pod/entrypoint.go 94.1% 93.2% -0.9
pkg/pod/pod.go 93.6% 92.6% -1.0
pkg/pod/status.go 94.7% 94.2% -0.5

tekton-robot avatar Apr 22 '24 14:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 65.1%
pkg/apis/pipeline/images.go 100.0% 87.5% -12.5
pkg/apis/pipeline/v1/task_validation.go 98.6% 98.3% -0.3
pkg/entrypoint/entrypointer.go 86.8% 86.9% 0.0
pkg/pod/entrypoint.go 94.1% 93.2% -0.9
pkg/pod/pod.go 93.6% 92.6% -1.0
pkg/pod/status.go 94.7% 94.2% -0.5

tekton-robot avatar Apr 22 '24 16:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 65.1%
pkg/apis/pipeline/images.go 100.0% 87.5% -12.5
pkg/apis/pipeline/v1/task_validation.go 98.6% 98.3% -0.3
pkg/entrypoint/entrypointer.go 86.8% 86.9% 0.0
pkg/pod/entrypoint.go 94.1% 93.2% -0.9
pkg/pod/pod.go 93.6% 92.6% -1.0
pkg/pod/status.go 94.7% 94.2% -0.5

tekton-robot avatar Apr 22 '24 17:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 65.1%
pkg/apis/pipeline/images.go 100.0% 87.5% -12.5
pkg/apis/pipeline/v1/task_validation.go 98.6% 98.3% -0.3
pkg/entrypoint/entrypointer.go 86.8% 86.9% 0.0
pkg/pod/entrypoint.go 94.1% 93.2% -0.9
pkg/pod/pod.go 93.6% 92.6% -1.0
pkg/pod/status.go 94.7% 94.2% -0.5

tekton-robot avatar Apr 22 '24 17:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 65.1%
pkg/apis/pipeline/images.go 100.0% 87.5% -12.5
pkg/apis/pipeline/v1/task_validation.go 98.6% 98.3% -0.3
pkg/entrypoint/entrypointer.go 86.8% 86.9% 0.0
pkg/pod/entrypoint.go 94.1% 93.2% -0.9
pkg/pod/pod.go 93.6% 92.6% -1.0
pkg/pod/status.go 94.7% 94.2% -0.5

tekton-robot avatar Apr 22 '24 17:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 65.1%
pkg/apis/pipeline/v1/task_validation.go 98.6% 98.3% -0.3
pkg/entrypoint/entrypointer.go 86.8% 86.9% 0.0
pkg/pod/entrypoint.go 94.1% 93.2% -0.9
pkg/pod/pod.go 93.6% 93.7% 0.1
pkg/pod/status.go 94.7% 94.2% -0.5

tekton-robot avatar Apr 22 '24 18:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 65.1%
pkg/apis/pipeline/v1/task_validation.go 98.6% 98.3% -0.3
pkg/entrypoint/entrypointer.go 86.8% 86.9% 0.0
pkg/pod/entrypoint.go 94.1% 93.2% -0.9
pkg/pod/pod.go 93.6% 93.7% 0.1
pkg/pod/status.go 94.7% 94.2% -0.5

tekton-robot avatar Apr 22 '24 18:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 67.2%
pkg/entrypoint/entrypointer.go 86.8% 86.9% 0.0
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 93.7% 0.1
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 19:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 67.2%
pkg/entrypoint/entrypointer.go 86.8% 86.9% 0.0
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 93.7% 0.1
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 19:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 93.7% 0.1
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 19:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 93.7% 0.1
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 19:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 93.7% 0.1
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 19:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 93.7% 0.1
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 20:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 93.7% 0.1
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 20:04 tekton-robot

/hold cancel

ericzzzzzzz avatar Apr 22 '24 20:04 ericzzzzzzz

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 83.7% -9.9
pkg/pod/status.go 94.7% 92.8% -1.9

tekton-robot avatar Apr 22 '24 21:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 83.7% -9.9
pkg/pod/status.go 94.7% 92.8% -1.9

tekton-robot avatar Apr 22 '24 21:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 83.7% -9.9
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 22:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 83.7% -9.9
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 22:04 tekton-robot

/hold

needs to discuss if we need api changes

ericzzzzzzz avatar Apr 22 '24 23:04 ericzzzzzzz

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 93.8% 0.2
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 23:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 93.8% 0.2
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 22 '24 23:04 tekton-robot

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 94.0% 0.4
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 23 '24 04:04 tekton-robot

/hold cancel

ericzzzzzzz avatar Apr 23 '24 05:04 ericzzzzzzz

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
cmd/sidecarlogartifacts/main.go Do not exist 0.0%
internal/sidecarlogartifacts/sidecarlogartifacts.go Do not exist 86.4%
pkg/pod/entrypoint.go 94.1% 94.2% 0.1
pkg/pod/pod.go 93.6% 94.0% 0.4
pkg/pod/status.go 94.7% 94.0% -0.7

tekton-robot avatar Apr 23 '24 05:04 tekton-robot