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

Remove cluster task installersets #2376

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pratap0007
Copy link
Contributor

@pratap0007 pratap0007 commented Oct 16, 2024

Changes

This patch will remove cluster task installersets and also
remove the existing cluster task installersets during operator upgrade

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.

Release Notes

Cluster Task has been deprecated, hence this PR disable the create of cluster task installersets and will remove all existing cluster task installersets from the cluster.

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 16, 2024
@tekton-robot
Copy link
Contributor

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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 16, 2024
@tekton-robot
Copy link
Contributor

[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.

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

@pratap0007 pratap0007 changed the title [WIP]Remove cluster task installersets Remove creation of cluster task installersets Oct 18, 2024
@pratap0007 pratap0007 marked this pull request as ready for review October 18, 2024 13:11
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 18, 2024
@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/cluster_task.go 39.1% 100.0% 60.9
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 47.9% 5.3

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/cluster_task.go 39.1% 100.0% 60.9
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 47.9% 5.3

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/cluster_task.go 39.1% 100.0% 60.9
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 47.9% 5.3

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/cluster_task.go 39.1% 100.0% 60.9
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 47.9% 5.3

@vdemeester
Copy link
Member

cc @jkandasa

@pratap0007 pratap0007 changed the title Remove creation of cluster task installersets [WIP] Remove creation of cluster task installersets Nov 5, 2024
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 5, 2024
@pratap0007 pratap0007 changed the title [WIP] Remove creation of cluster task installersets Remove cluster task installersets Nov 7, 2024
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 7, 2024
@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/cluster_task.go 39.1% 100.0% 60.9
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 47.9% 5.3

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/cluster_task.go 39.1% 100.0% 60.9
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 47.9% 5.3

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/cluster_task.go 39.1% 100.0% 60.9
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 47.9% 5.3

@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 11, 2024
@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 56.1% 13.5

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 56.1% 13.5

@pratap0007
Copy link
Contributor Author

/retest

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 56.1% 13.5

@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 56.1% 13.5

@savitaashture
Copy link
Contributor

savitaashture commented Nov 14, 2024

@pratap0007 You need to change these templates https://github.com/tektoncd/operator/blob/main/cmd/openshift/operator/kodata/tekton-addon/tekton-pipeline-template/pipeline_using_workspace.yaml#L25-L26 to use the resolverTasks now instead of ClusterTask

Use below sample format instead of clusterTask

    tasks:
    - name: kn-run
      taskRef:
        resolver: cluster
        params:
        - name: kind
          value: task
        - name: name
          value: kn
        - name: namespace
          value: openshift-pipelines

@pratap0007 pratap0007 force-pushed the remove-ct-installersets branch 2 times, most recently from cfbb4ab to 6721d25 Compare November 18, 2024 06:03
@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 89.5% 2.0
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 56.1% 13.5

Makefile Outdated
@@ -67,7 +67,7 @@ ifeq ($(TARGET), openshift)
rm -rf ./cmd/$(TARGET)/operator/kodata/manual-approval-gate
rm -rf ./cmd/$(TARGET)/operator/kodata/tekton-pruner
rm -rf ./cmd/$(TARGET)/operator/kodata/tekton-addon/pipelines-as-code
rm -rf ./cmd/$(TARGET)/operator/kodata/tekton-addon/addons/02-clustertasks/source_external/
rm -rf ./cmd/$(TARGET)/operator/kodata/tekton-addon/addons/02-tasks/source_external/
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably related to the question that Savita asked in hack/fetch-releases.sh. I don't understand what this is supposed to contain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this contains fetched tasks from the catalogs and we should remove this, right @savitaashture ?

@@ -38,7 +38,8 @@ var (

// post upgrade functions
postUpgradeFunctions = []upgradeFunc{
upgradeStorageVersion, // upgrade #1: performs storage version migration
upgradeStorageVersion, // upgrade #1: performs storage version migration
removeAllClusterTasksInstallerSets, // Remove all cluster tasks installersets
Copy link
Contributor

Choose a reason for hiding this comment

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

Do I understand it correctly that after upgrading from 1.16 to 1.17, all clustertasks (even old versioned ones for 1.14 or 1.15) will be removed automatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, all cluster tasks will be removed automatically

This patch will remove cluster task installersets and also
remove the existing cluster task installersets during operator upgrade

Signed-off-by: Shiv Verma <[email protected]>
@tekton-robot tekton-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 18, 2024
@tekton-robot
Copy link
Contributor

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

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonaddon_validation.go 87.5% 90.9% 3.4
pkg/reconciler/openshift/tektonaddon/transformer.go 42.6% 56.1% 13.5

@pratap0007
Copy link
Contributor Author

Thanks @savitaashture @PuneetPunamiya @ppitonak @jkhelil for review and I have updated, please take a final review

@pratap0007
Copy link
Contributor Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants