Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for integer in params of pipeline #7791

Open
gerrnot opened this issue Mar 21, 2024 · 1 comment
Open

Add support for integer in params of pipeline #7791

gerrnot opened this issue Mar 21, 2024 · 1 comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@gerrnot
Copy link

gerrnot commented Mar 21, 2024

Feature request

We stumbled upon the retries feature for tasks within a pipeline.

However, the retries field requires an integer value, which you can currently only hard code as a pipeline developer (according to my knowlege).

Trying to define an integer type parameter or coercing a string type parameter does not work.

Draft code of desired feature (this is not a full PipelineSpec!):

kind: Pipeline
  spec:
    params:
      - name: retries-docker-build
        description: >
          Retry amount of the docker-build step in case of an error.
          Specifying 0 means - no retries!
        type: integer
        default: 0
  tasks:
    - name: "docker-build"
      retries: $(params.retries-docker-build)

Use case

Unfortunately we live in a flaky world and have to deal with unstable downloads, e.g. random connection reset errors of repositories that you have no control over.

In our case, developers reported that python builds (dependency downloads) are flaky.

We (as pipeline developers) want to provide the developers the opportunity to override the retries of selected steps, but we do not want to force upon them a specific amount of retries.

For example:

  • Project A: builds are very stable when it comes to infrastructure, for this project we want zero retries.
  • Project B: builds are very unstable when it comes to infrastructure, for this project we want three retries.
    ...where project A and B use the same pipelineRef.
@gerrnot gerrnot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 21, 2024
@chitrangpatel
Copy link
Contributor

chitrangpatel commented Jul 17, 2024

There is a different type of param support request (Array of Objects): tektoncd/community#1154

I'm wondering if we should support JSON params which should probably cover all variations of params that we may need.

WDYT @tektoncd/core-maintainers ?
cc @renzodavid9

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants