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

CLI: Respect pipelines version in CLI subcommands #229

Conversation

vinamra28
Copy link
Member

Changes

As of now when we do tkn hub <subcommand> task taskname without taking care
of the version of Tekton Pipelines installed on the cluster and due to
this it might break the TaskRun or PipelineRun created by the user if
the required Pipelines version is greater than that installed on the
cluster. Eg buildah 0.2 requires pipelines minVersion to be 0.17.0 and
we have 0.16.3 installed on our cluster so when running this task it
will break.

With this patch we will respect the min version required to run the task
which we get from the annotation present in the task as
pipelines.minVersion and the installed pipelines version.

  • If the installed pipelines version is greater than pipelines.minVersion value
    then the task will be upgraded/downgraded/reinstalled directly.
  • If the installed pipelines version is lesser than pipelines.minVersion
    value it will error out.
  • If the pipelines controller is installed on another namespace other
    than tekton-pipelines and openshift-pipelines then it will give the
    warning and upgrade/downgrade/reinstall the task.

Signed-off-by: vinamra28 vinjain@redhat.com

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.

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 31, 2021
@vinamra28
Copy link
Member Author

/retest

@vinamra28 vinamra28 force-pushed the vinamra28/check-pipeline-version-in-hub-cli branch from c8aaff9 to 1c86bc7 Compare March 31, 2021 10:07
@vinamra28
Copy link
Member Author

/retest

@vinamra28
Copy link
Member Author

/test pull-tekton-hub-integration-tests

@vinamra28
Copy link
Member Author

/test pull-tekton-hub-unit-tests

@vinamra28
Copy link
Member Author

/test pull-tekton-hub-integration-tests

@piyush-garg
Copy link
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2021
@sm43
Copy link
Member

sm43 commented Apr 14, 2021

/approve
/meow

@tekton-robot
Copy link

@sm43: cat image

In response to this:

/approve
/meow

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
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sm43

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 Apr 14, 2021
As of now when we do `tkn hub <subcommand> task taskname` without taking care
of the version of Tekton Pipelines installed on the cluster and due to
this it might break the TaskRun or PipelineRun created by the user if
the required Pipelines version is greater than that installed on the
cluster. Eg buildah 0.2 requires pipelines minVersion to be 0.17.0 and
we have 0.16.3 installed on our cluster so when running this task it
will break.

With this patch we will respect the min version required to run the task
which we get from the annotation present in the task as
pipelines.minVersion and the installed pipelines version.
- If the installed pipelines version is greater than pipelines.minVersion value
then the task will be upgraded/downgraded/reinstalled directly.
- If the installed pipelines version is lesser than pipelines.minVersion
value it will error out.
- If the pipelines controller is installed on another namespace other
than `tekton-pipelines` and `openshift-pipelines` then it will give the
warning and upgrade/downgrade/reinstall the task.

Signed-off-by: vinamra28 <vinjain@redhat.com>
@vinamra28 vinamra28 force-pushed the vinamra28/check-pipeline-version-in-hub-cli branch from 1c86bc7 to 4bb3d4c Compare April 14, 2021 06:08
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 14, 2021
@PuneetPunamiya
Copy link
Member

Thanks 🤙

/lgtm
/woof

@tekton-robot
Copy link

@PuneetPunamiya: dog image

In response to this:

Thanks 🤙

/lgtm
/woof

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 tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 14, 2021
@tekton-robot tekton-robot merged commit e5bf273 into tektoncd:main Apr 14, 2021
@vinamra28 vinamra28 deleted the vinamra28/check-pipeline-version-in-hub-cli branch August 28, 2021 07:43
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants