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

fix task start with file #964

Merged
merged 1 commit into from
May 6, 2020
Merged

fix task start with file #964

merged 1 commit into from
May 6, 2020

Conversation

pradeepitm12
Copy link
Contributor

@pradeepitm12 pradeepitm12 commented May 5, 2020

Close #959

This fixes task start with file command.

Note: to start a task from file params needs to have its type
speficed, in case of existing task in cluster type is appended by
the controller.

Signed-off-by: Pradeep Kumar [email protected]

Changes

Submitter Checklist

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

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

See the contribution guide
for more details.

Release Notes

release-note

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 5, 2020
@@ -129,7 +129,6 @@ func SpecConvertDown(spec *v1beta1.TaskSpec) *v1alpha1.TaskSpec {
downTaskSpec.Workspaces = spec.Workspaces
downTaskSpec.Results = spec.Results
downTaskSpec.Resources = spec.Resources
downTaskSpec.Params = spec.Params
Copy link
Contributor Author

Choose a reason for hiding this comment

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

v1alpha1 taskspec will have params in Sepc.Inputs.Params

@@ -36,8 +36,6 @@ func Create(c *cli.Clients, tr *v1beta1.TaskRun, opts metav1.CreateOptions, ns s
if err != nil {
return nil, err
}
v1alpha1TaskRun.Kind = "TaskRun"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kind and APIVersion is already added in the ConvertDown func.

@tekton-robot
Copy link
Contributor

The following is the coverage report on the affected files.
Say /test pull-tekton-cli-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/cmd/task/start.go 89.8% 89.9% 0.1
pkg/task/task.go 42.5% 43.0% 0.5

@pradeepitm12
Copy link
Contributor Author

/retest

Copy link
Member

@danielhelfand danielhelfand left a comment

Choose a reason for hiding this comment

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

/lgtm

We should follow up with an e2e test on this for starting a Task with -f.

Is this pr going to include tkn pipeline start fixes, or was that not affected by #959?

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 5, 2020
pkg/task/task.go Outdated Show resolved Hide resolved
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label May 5, 2020
@tekton-robot
Copy link
Contributor

The following is the coverage report on the affected files.
Say /test pull-tekton-cli-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/cmd/task/start.go 89.8% 89.9% 0.1
pkg/task/task.go 42.5% 43.6% 1.1

Close #959

This fixes task start with file command.

Note: to start a task from file params needs to have its type
speficed, in case of existing task in cluster type is appended by
the controller.

Signed-off-by: Pradeep Kumar <[email protected]>
@pradeepitm12
Copy link
Contributor Author

/lgtm

We should follow up with an e2e test on this for starting a Task with -f.

Is this pr going to include tkn pipeline start fixes, or was that not affected by #959?

Thanks for taking the time to review this.
This PR include fix only for #959
Till now I have not seen any issue with tkn pipeline start if I see any issue I will raise a different PR for it.

@tekton-robot
Copy link
Contributor

The following is the coverage report on the affected files.
Say /test pull-tekton-cli-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/cmd/task/start.go 89.8% 89.9% 0.1
pkg/task/task.go 42.5% 43.6% 1.1

@pradeepitm12
Copy link
Contributor Author

/test pull-tekton-cli-integration-tests

Copy link
Member

@danielhelfand danielhelfand 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 6, 2020
@chmouel
Copy link
Member

chmouel commented May 6, 2020

/approve

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chmouel

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 6, 2020
@tekton-robot tekton-robot merged commit a4a8917 into tektoncd:master May 6, 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. lgtm Indicates that a PR is ready to be merged. 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.

Unable to start task with -f flag if the task definition file contains params with no default value
5 participants