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 deprecated $(params) to avoid confusion between resourcetemplates and triggertemplate params #690

Merged
merged 1 commit into from Jul 29, 2020

Conversation

savitaashture
Copy link
Contributor

@savitaashture savitaashture commented Jul 28, 2020

Changes

Closes: #606

Removed deprecated params which was deprecated as part of this PR

Signed-off-by: Savita Ashture sashture@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.

Release Notes

This is a breaking change as this PR remove complete support of $(params) and moved to $(tt.params) in order to avoid confusion between resourcetemplates and triggertemplate params

And the example

apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
  name: github-template
spec:
  params:
    - name: gitrevision
    - name: gitrepositoryurl
  resourcetemplates:
    - apiVersion: tekton.dev/v1alpha1
      kind: TaskRun
      metadata:
        generateName: github-run-
      spec:
        taskSpec:
          inputs:
            resources:
              - name: source
                type: git
          steps:
            - image: ubuntu
              script: |
                #! /bin/bash
                ls -al $(inputs.resources.source.path)
        inputs:
          resources:
            - name: source
              resourceSpec:
                type: git
                params:
                  - name: revision
                    value: $(tt.params.gitrevision)
                  - name: url
                    value: $(tt.params.gitrepositoryurl)

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 28, 2020
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/trigger_template_validation.go 97.5% 97.2% -0.3

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/trigger_template_validation.go 97.5% 97.2% -0.3

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/trigger_template_validation.go 97.5% 97.2% -0.3

@savitaashture
Copy link
Contributor Author

Coverage has reduced by 0.3 and that has valid reason so handled that in a separate PR #691 because that actually solves another validation issue and which is not part of this cleanup PR

Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

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

Looks good to me.
One minor comment: Since this is a breaking change, can we update the Release Notes to indicate so?

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom

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 Jul 29, 2020
@savitaashture
Copy link
Contributor Author

savitaashture commented Jul 29, 2020

Looks good to me.
One minor comment: Since this is a breaking change, can we update the Release Notes to indicate so?

Thank you I have added but i think need more description so i will update the content with examples 👍

@savitaashture savitaashture changed the title Remove deprecated params from TriggerTemplate Remove deprecated $(params) from TriggerTemplate Jul 29, 2020
@savitaashture savitaashture changed the title Remove deprecated $(params) from TriggerTemplate Remove deprecated $(params) to avoid confusion between resourcetemplates and triggertemplate params Jul 29, 2020
@dibyom
Copy link
Member

dibyom commented Jul 29, 2020

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 29, 2020
@tekton-robot tekton-robot merged commit 288a03f into tektoncd:master Jul 29, 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.

Remove deprecated params from TriggerTemplate spec
3 participants