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

Buildpacks pipeline v0.2 #992

Merged
merged 2 commits into from
Jul 7, 2022
Merged

Buildpacks pipeline v0.2 #992

merged 2 commits into from
Jul 7, 2022

Conversation

bradbeck
Copy link
Contributor

@bradbeck bradbeck commented Jun 13, 2022

Changes

The recent update to Tekton Pipeline v0.36.0 (https://github.com/tektoncd/pipeline/releases/tag/v0.36.0) appears to cause an error when executing the build tasks in the buildpacks pipeline.

invalid input params for task buildpacks: param types don't match the user-specified type: [ENV_VARS]

Changing the default value of ENV_VARS in the pipeline to the following appears to resolve the problem:

    - name: ENV_VARS
      type: array
      description: Environment variables to set during _build-time_.
      default: [""]

This appears to be related to changes made to allow parameter propagation:

✨ TEP-0107: Implement Parameter Propagation (tektoncd/pipeline#4845)
Parameters are propagated in embedded specifications without mutations.

Discovered as part of buildsec/frsca#237

Submitter Checklist

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

  • Follows the authoring recommendations
  • Includes docs (if user facing)
  • Includes tests (if functionality of task changed or new task added)
  • Commit messages follow commit message best practices
  • Complies with [Catalog Organization TEP][TEP], see [example]. Note [An issue has been filed to automate this validation][validation]
    • File path follows <kind>/<name>/<version>/name.yaml

    • Has README.md at <kind>/<name>/<version>/README.md

    • Has mandatory metadata.labels - app.kubernetes.io/version the same as the <version> of the resource

    • Has mandatory metadata.annotations tekton.dev/pipelines.minVersion

    • mandatory spec.description follows the convention

        ```
      
        spec:
          description: >-
            one line summary of the resource
      
            Paragraph(s) to describe the resource.
        ```
      

See the contribution guide
for more details.

@tekton-robot tekton-robot requested review from chmouel and a user June 13, 2022 14:25
@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 13, 2022
@tekton-robot
Copy link

Hi @bradbeck. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 13, 2022
@jromero
Copy link
Member

jromero commented Jun 13, 2022

I may need to look into the changes further the TAP explicitly mentions "When using an inlined spec, parameters from the parent PipelineRun will be propagated to any inlined specs without needing to be explicitly defined.".

I'm concerned that this proposed change actually doesn't pass the ENV_VARS to the actual tasks.

Looking at the latest docs, I wonder if the actual fix is to change the syntax from:

        - name: ENV_VARS
          value: ["$(params.ENV_VARS)"]

to:

        - name: ENV_VARS
          value: ["$(params.ENV_VARS[*])"]

@bradbeck
Copy link
Contributor Author

bradbeck commented Jun 13, 2022

        - name: ENV_VARS
          value: ["$(params.ENV_VARS[*])"]

I still get the following error when using that syntax:

invalid input params for task buildpacks: param types don't match the user-specified type: [ENV_VARS]

@dibyom
Copy link
Member

dibyom commented Jun 27, 2022

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 27, 2022
@chmouel
Copy link
Member

chmouel commented Jul 5, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 5, 2022
@tekton-robot
Copy link

Catlin Output
FILE: task/github-set-status/0.4/github-set-status.yaml
WARN : Step "set-status" uses image "$(params.IMAGE)" that contains variables; skipping validation
Catlin script lint Output
WARN : step: github-set-status is not using #!/usr/bin/env 

@jromero
Copy link
Member

jromero commented Jul 5, 2022

Hmmm... I just ran a test locally (Pipeline version: v0.37.1) and the environment variables are not being passed to the tasks.

I'll investigate further but my suspicion stands.

@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 5, 2022
bradbeck added a commit to buildsec/frsca that referenced this pull request Jul 5, 2022
Update the buildpacks pipeline by setting a value for `ENV_VARS` to defend against new behavior in Tekton Pipeline v0.36.0.

Reference: tektoncd/catalog#992

Signed-off-by: Brad Beck <[email protected]>
The recent update to Tekton Pipeline v0.36.0 (https://github.com/tektoncd/pipeline/releases/tag/v0.36.0) appears to cause an error when executing the build tasks in the buildpacks pipeline.

This change removes task parameters that should be automatically propagated when using Pipeline v0.36.0+

Signed-off-by: Brad Beck <[email protected]>
@tekton-robot
Copy link

Catlin Output
FILE: task/github-set-status/0.4/github-set-status.yaml
WARN : Step "set-status" uses image "$(params.IMAGE)" that contains variables; skipping validation
Catlin script lint Output
WARN : step: github-set-status is not using #!/usr/bin/env 

kodiakhq bot pushed a commit to buildsec/frsca that referenced this pull request Jul 6, 2022
Update the buildpacks pipeline by setting a value for `ENV_VARS` to defend against new behavior in Tekton Pipeline v0.36.0.

Reference: tektoncd/catalog#992

Signed-off-by: Brad Beck <[email protected]>
@dibyom
Copy link
Member

dibyom commented Jul 6, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 6, 2022
@tekton-robot
Copy link

Catlin Output
FILE: task/github-set-status/0.4/github-set-status.yaml
WARN : Step "set-status" uses image "$(params.IMAGE)" that contains variables; skipping validation
Catlin script lint Output
WARN : step: github-set-status is not using #!/usr/bin/env 

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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 7, 2022
@tekton-robot tekton-robot merged commit bcb227b into tektoncd:main Jul 7, 2022
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

6 participants