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

[TEP-0142] Remote Resolution for StepAction #7321

Merged

Conversation

Yongxuanzhang
Copy link
Member

@Yongxuanzhang Yongxuanzhang commented Nov 1, 2023

Changes

This commit is part of #7259. It adds the remote resolution for StepAction.

/kind feature

Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com

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
  • 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

Support Remote Resolution for StepAction

@tekton-robot
Copy link
Collaborator

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 tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesnt merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Nov 1, 2023
@Yongxuanzhang Yongxuanzhang requested review from chitrangpatel and removed request for dibyom and jerop November 1, 2023 17:24
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 1, 2023
@Yongxuanzhang
Copy link
Member Author

/test all

@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/taskrun/resources/taskref.go 92.6% 84.0% -8.6
pkg/reconciler/taskrun/taskrun.go 85.4% 85.3% -0.0

@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/taskrun/resources/taskref.go 92.6% 84.0% -8.6
pkg/reconciler/taskrun/taskrun.go 85.4% 85.3% -0.0

@Yongxuanzhang
Copy link
Member Author

/test pull-tekton-pipeline-unit-tests

@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/taskrun/resources/taskref.go 92.6% 93.6% 1.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.3% -0.0

@@ -51,7 +54,7 @@ type GetTaskRun func(string) (*v1.TaskRun, error)
// GetTaskData will retrieve the Task metadata and Spec associated with the
// provided TaskRun. This can come from a reference Task or from the TaskRun's
// metadata and embedded TaskSpec.
func GetTaskData(ctx context.Context, taskRun *v1.TaskRun, getTask GetTask, getStepAction GetStepAction) (*resolutionutil.ResolvedObjectMeta, *v1.TaskSpec, error) {
func GetTaskData(ctx context.Context, taskRun *v1.TaskRun, getTask GetTask, tekton clientset.Interface, k8s kubernetes.Interface, requester remoteresource.Requester) (*resolutionutil.ResolvedObjectMeta, *v1.TaskSpec, error) {
Copy link
Member Author

Choose a reason for hiding this comment

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

another way not to pass those clients, requester here, is to move steps, err := extractStepActions(ctx, taskSpec, taskRun, tekton, k8s, requester) out of this GetTaskData.

@Yongxuanzhang
Copy link
Member Author

/test pull-tekton-pipeline-unit-tests

@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/taskrun/resources/taskref.go 92.6% 93.6% 1.0
pkg/reconciler/taskrun/resources/taskspec.go 100.0% 97.9% -2.1
pkg/reconciler/taskrun/taskrun.go 85.4% 84.2% -1.2

@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/taskrun/resources/taskref.go 92.6% 93.6% 1.0
pkg/reconciler/taskrun/resources/taskspec.go 100.0% 97.9% -2.1
pkg/reconciler/taskrun/taskrun.go 85.4% 84.2% -1.2

@Yongxuanzhang
Copy link
Member Author

/test pull-tekton-pipeline-unit-tests

@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/apiserver/apiserver.go 96.8% 94.4% -2.3
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.7% 0.1
pkg/reconciler/taskrun/resources/taskspec.go 100.0% 97.9% -2.1
pkg/reconciler/taskrun/taskrun.go 85.4% 84.9% -0.5

@jerop
Copy link
Member

jerop commented Nov 2, 2023

@tektoncd/core-maintainers @tektoncd/core-collaborators please take a look 🙏🏾

@Yongxuanzhang
Copy link
Member Author

@tektoncd/core-maintainers @tektoncd/core-collaborators please take a look 🙏🏾

Thanks, but this PR is not ready yet, I'm adding tests to improve the coverage. 😂

@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 2, 2023
@Yongxuanzhang
Copy link
Member Author

/test pull-tekton-pipeline-unit-tests

@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/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.7% 0.1
pkg/reconciler/taskrun/taskrun.go 85.4% 85.6% 0.2

@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/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.6% 0.2

@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/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.4% 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
pkg/reconciler/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.4% 0.0

@chitrangpatel
Copy link
Member

Thanks for all your help here @Yongxuanzhang 🎉

/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chitrangpatel

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 Nov 6, 2023
docs/stepactions.md Outdated Show resolved Hide resolved
pkg/reconciler/taskrun/resources/taskref.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1/taskrun_types.go Outdated Show resolved Hide resolved
pkg/reconciler/taskrun/resources/taskref.go Outdated Show resolved Hide resolved
pkg/reconciler/taskrun/resources/taskref.go Outdated Show resolved Hide resolved
pkg/reconciler/taskrun/resources/taskref.go Outdated Show resolved Hide resolved
@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/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 0.0

@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/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 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
pkg/reconciler/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 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
pkg/reconciler/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 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
pkg/reconciler/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 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
pkg/reconciler/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 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
pkg/reconciler/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 0.0

@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/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 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
pkg/reconciler/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 0.0

@Yongxuanzhang
Copy link
Member Author

/retest
https://prow.tekton.dev/view/gs/tekton-prow/pr-logs/pull/tektoncd_pipeline/7321/pull-tekton-pipeline-integration-tests/1721928886402420736
'The step "write" in TaskRun "pr-parameterized-subpath-qzkv6-writer-2"
failed to pull the image "". The pod errored with the message: "Back-off pulling
image "ubuntu"."'

This commit is part of tektoncd#7259. It adds the remote resolution for
StepAction.

Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
@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/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 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
pkg/reconciler/apiserver/apiserver.go 96.8% 97.2% 0.4
pkg/reconciler/taskrun/resources/taskref.go 92.6% 92.6% 0.0
pkg/reconciler/taskrun/taskrun.go 85.6% 85.6% 0.0

@Yongxuanzhang
Copy link
Member Author

/retest

Copy link
Member

@jerop jerop 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 @Yongxuanzhang 🎉
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 8, 2023
@tekton-robot tekton-robot merged commit 15c8168 into tektoncd:main Nov 8, 2023
12 checks passed
@jerop jerop added this to the Pipelines v0.54 milestone Nov 9, 2023
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants