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

Reorganize Catalog based on Catalog Organization proposal #386

Closed
PuneetPunamiya opened this issue Jun 23, 2020 · 8 comments
Closed

Reorganize Catalog based on Catalog Organization proposal #386

PuneetPunamiya opened this issue Jun 23, 2020 · 8 comments
Assignees
Labels
area/roadmap Issues that are part of the project (or organization) roadmap (usually an epic) kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@PuneetPunamiya
Copy link
Member

PuneetPunamiya commented Jun 23, 2020

Reorganize Catalog based on Catalog Organization proposal

Expected Behavior

  1. Catalog Organization proposal

  2. Each resource should follow the following structure

    ./task/         👈 the kind of the resource 
      /argocd       👈 definition file must have same name
        /OWNERS     👈 owners of this resource
        /README.md  👈 fallback README if version is missing README
        /0.1
          /README.md     👈 [optional] since there can be a fallback
          /argocd.yaml   👈 the file name must be resource name
          /samples/deploy-to-k8s.yaml
        /0.2/...
      /golang-build
        /0.1
          /README.md
          /golang-build.yaml
          /samples/golang-build.yaml
  1. Resource YAML file includes following changes
  • Labels include the version of the resource.
  • Annotations include minimum pipeline version supported by the resource,
    tags associated with the resource and displayName of the resource
  
labels:
  app.kubernetes.io/version: "0.1"            👈 version of the resource
  
annotations:
  tekton.dev/pipelines.minVersion: "0.12.1"   👈 will work from x version  of pipeline
  tags: "ansible, cli"                        👈 Comma separated list of tags 
  displayName: "Ansible Tower Cli"    
  
spec:
description: |-
  ansible-tower-cli task simplifies 
  workflow, jobs, manage users...   👈 # Summary
  
  Ansible Tower (formerly ‘AWX’) is a ...
  1. API breakage is prevented because there will be a new version

Actual Behavior

  1. Versions are not supported by the resources
  2. Minimum pipeline version supported by the resource is not specified
@PuneetPunamiya
Copy link
Member Author

/assign

@vdemeester vdemeester added area/roadmap Issues that are part of the project (or organization) roadmap (usually an epic) kind/feature Categorizes issue or PR as related to a new feature. labels Jun 23, 2020
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
      - adds version label
      - adds a minimum pipeline versions supported by the task
      - adds tags for task
      - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
…osal

**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
…y according to the new reorg proposal

**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
…ing to the new reorg proposal

**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
…proposal

**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
…proposal

**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
…roposal

**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
…ew reorg proposal

**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
…ng to the new reorg proposal

**NOTE: This only modifies the content of the yaml, changing
        the location of the file will be done in a different
        commit to make review easier

Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - adds display name for task
  - modified description to add a summary

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
pratap0007 added a commit to pratap0007/catalog that referenced this issue Jun 30, 2020
…ames the yaml file and the directory

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves create-gitlab-release task to the task directory

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
…rectroy

Changes include:
  - moves send-to-channel-slack task to the task directory
  - copies and modifies readme from slackmessage to send-to-channel-slack
  - copies owners file from slackmessage

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
…rectroy

Changes include:
  - moves send-to-webhook-slack task to the task directory
  - moves and modifies readme from slackmessage to send-to-webhook-slack
  - moves owners file from slackmessage

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves github-add-comment task to the task directory
  - moves and modifies readme from github to github-add-comment
  - rename the yaml filename to match the resource name

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves github-close-issue task to the task directory
  - moves and modifies readme from github to github-close-issue
  - rename the yaml filename to match the resource name

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves github-set-status task to the task directory
  - moves and modifies readme from github to github-close-issue
  - rename the yaml filename to match the resource name

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves github-add-labels task to the task directory
  - rename the yaml filename to match the resource name

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves create-github-release task to the task directory

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves the gke-deploy task to the task directory
  - copies and modifies readme file for gke-deploy from gke-deploy directory
  - copies example directory from gcs directory

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves the build-push-gke-deploy task to the task directory
  - moves and modifies readme file from gke-deploy
    to build-push-gke-deploy
  - moves examples directory from gke-deploy

Issue : tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
…ectory

Changes include:
  - moves the openshift-client task to the task directory
  - copies and modifies readme file for openshift-client task from openshift-client directory
  - copies OWNERS file from openshift-client directory
  - changes the yaml filename to match the resource name

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
…ient directory

Changes include:
  - moves the openshift-client-kubecfg task to the task directory
  - moves and modifies readme file for openshift-client-kubecfg task from openshift-client directory
  - moves OWNERS file from openshift-client directory
  - chages the yaml filename to match the resource name

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves the golang-build task to the task directory
  - copies and modifies readme file to golang-build task from golang directory
  - copies OWNERS file from golang directory
  - copies test directory from golang directory to golang-build task
  - changes the yaml filename to match the resource name

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves the golang-test task to the task directory
  - copies and modifies readme file to golang-test task from golang directory
  - copies OWNERS file from golang directory
  - copies test directory from golang directory to golang-test task
  - changes the yaml filename to match the resource name

Issue : tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves the golangci-lint task to the task directory
  - moves the OWNERS to golangci-lint task
  - moves and modifies readme file from golang
    to golangci-lint task
  - moves test directory from golang to golangci-lint task
  - changes the yaml filename to match the resource name

Issue: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves git-batch-merge task to the task directory
  - copies and modifies readme file for git-batch-merge from git directory
  - copies examples and tests directory from git directory

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves git-clone task to the task directory
  - copies and modifies readme file for git-clone from git directory
  - copies examples and tests directory from git directory

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves git-rebase task to the task directory
  - copies and modifies readme file for git-rebase from git directory
  - copies examples and tests directory from git directory

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves git-cli task to the task directory
  - moves and modifies readme file for git-cli from git directory
  - moves examples and tests directory from git directory

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
  - moves helm-upgrade-from-source task to the task directory
  - copies and modifies readme file for helm-upgrade-from-source from helm directory
  - copies OWNERS,examples and tests directory from helm directory

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
popcor255 pushed a commit to popcor255/catalog that referenced this issue Jul 14, 2020
Changes include:
   - moves helm-upgrade-from-repo task to the task directory
   - copies and modifies readme file for helm-upgrade-from-repo from helm directory
   - moves OWNERS,examples and tests directory from helm directory

Issue: tektoncd#386

Signed-off-by: Puneet Punamiya <[email protected]>
@necccc
Copy link

necccc commented Jul 15, 2020

Is it possible to gain control on task versions from a pipeline?

Example scenario:

I have a Pipeline resource I wish to distribute.

With the current proposal there are some constraints I have to face:

  • if I would like to use a new version of a task in the Pipeline, after that change I need to communicate that every user who uses the Pipeline should update the definitions they pull the task from
  • this kinda feels like a breaking change, even if the new task itself does not introduce a breaking change

If I could set the task version on a pipeline level, this would not cause problems,
only those changes need maintenance from Pipeline users, which are truly breaking.

Ideal setup would be like:

---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: pipeline
spec:
  tasks:
    - name: task-from-catalog
      taskRef:
        name: task-alpha
        version: "1.0.1"
    - name: task-from-another-catalog
      taskRef:
        name: task-beta
        version: "2.1.1"

Since k8s resources of the same kind should have unique names, currently this could be implemented in putting the version to the task name.

---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: pipeline
spec:
  tasks:
    - name: task-from-catalog
      taskRef:
        name: task-alpha-1.0.1
    - name: task-from-another-catalog
      taskRef:
        name: task-beta-2.1.1

With a similar file structure like the proposal

./task/
      /task-alpha
        /1.0.0.yaml
        /1.0.1.yaml
        ...
      /task-beta
        /2.1.0.yaml
        /2.1.1.yaml

What do you think? Is this an issue?
How will the current solution fit in with pipelineTasks later?
Or does the Hub resolves this?

@vdemeester
Copy link
Member

vdemeester commented Jul 16, 2020

What do you think? Is this an issue?
How will the current solution fit in with pipelineTasks later?
Or does the Hub resolves this?

So far this is "on the user" to do that, aka including some versionning in their Tasks. So in a gist, this is still an issue — or more accurately this is something we need to work on and fix at some point. There is a bunch of possibilities to explore here:

  • Have the catalog include the version in the name field of the Tasks. That's the easiest way to fix that problem initially as it doesn't require any change on the API side.

  • Have the hub do that instead — aka mutate live the task the user wants to install so that the name contains the version. This complexify the hub but same as above, this doesn't require any API change.

  • There is some work that would help fix that : Tekton OCI Bundle should help there. By packaging tekton resources (task, pipelines, …) into oci artifact (images), we can version them. If we then update the TaskRef/PipelineRef fields to reference to those images (instead of an existing resource in the cluster), the versionning problem is fixed (and you can even use digest there to make sure the image didn't overwrite your tag). For more detail than the TEP, there is some prior design docs around this idea.

    An example of what it could look like:

    apiVersion: tekton.dev/v1alpha1
    kind: TaskRun
    metadata:
      name: my-task-run
    spec:
      taskRef:
        image:
          name: gcr.io/my/catalog:v1.2.3
          task: my-task
  • Going with the above point, we could also allow referencing task directly from an HTTP endpoint, and thus allow to use the versionned URL of a task (ram.github…).

And of course, we are definitely welcoming any feedback or ideas around this (or anything else really) 😉

/cc @sthaha @bobcatfish @afrittoli @chmouel

@sthaha
Copy link
Member

sthaha commented Jul 17, 2020

@necccc Thank for bringing up the concerns, I will try and answer as much as I can

Is it possible to gain control on task versions from a pipeline?

Example scenario:

I have a Pipeline resource I wish to distribute.

With the current proposal there are some constraints I have to face:

  • if I would like to use a new version of a task in the Pipeline, after that change
    I need to communicate that every user who uses the Pipeline should update
    the definitions they pull the task from

What you are alluding to is an issue we already have with the existing system.
I think the problem is "how do I specify what the dependencies of the current
resource is". We had a discussion on this in our Catalog & Hub WG meeting
and I plan to write a TEP where we can discuss how to resolve this issue. In
broad terms I am thinking of

  1. Allow annotations to resources itself but I find it less flexible
metadata:
  labels:
    version: 1.0 -> 1.1
  annotations:
     tekton.dev/dependency-01: official:task:foobar:1.0
     tekton.dev/dependency-02: official:task:bar:1.0
     tekton.dev/dependency-02: official:condition:bar:1.0
     tekton.dev/dependency-03: community:task:bar:1.0
  1. A way to package Tekton and required k8s resources like the helm chart
# path: /bundle/openwhisk/1.0

apiVersion: tekton.dev/v1alpha1
kind: Bundle
metadata:
  annotations:
  labels:
    io.kubernetes/version: "1.0"

spec:
   catalogs:
      - name: foobar, url: http/my/catalog

  tasks:
    - url: http://github.com/tektoncd/catalog/task/foobar/1.0/foobar.yaml

    - catalog: community name: foobar version: 1.0
    - catalog: foobar    name: foobar version: 1.0

    - name: bar
      version: 2.0

  conditions:
    - name: openwhisk, version: 1.8

  pipelines:
    - name: openwhisk
      version: 1.0
    - name: openwhisk-knative
      version: 2.4
  • this kinda feels like a breaking change, even if the new task itself does not introduce a breaking change

If the task doesn't really change its behaviour i.e. the tests of the existing
version can be run against the new submission, then I think we have a consensus
that a new version need not be created

cc: @vdemeester @afrittoli

If I could set the task version on a pipeline level, this would not cause problems,
only those changes need maintenance from Pipeline users, which are truly breaking.

Ideal setup would be like:

---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: pipeline
spec:
  tasks:
    - name: task-from-catalog
      taskRef:
        name: task-alpha
        version: "1.0.1"
    - name: task-from-another-catalog
      taskRef:
        name: task-beta
        version: "2.1.1"

We should dicuss this further but I think the OCI artifact (tekton bundle)
already solves this (e.g. see below). I am not sure if the Pipeline controller
which I think is a lower layer component should be aware of a higher level
concept - catalog.

---
# ...
spec:
  tasks:
    - name: task-from-catalog
      taskRef:
        name: task-alpha
        image: task-alpha:1.0.1

    - name: task-from-another-catalog
      taskRef:
        name: task-beta
        version: "2.1.1"

Perhaps we should see if a task can be directly resolved by its URL. Thus
allowing symlinks to latest version of a task. Perhaps something like

/task/foobar/1.0
/task/foobar/1.2
/task/foobar/1.3 << --- can be referred as http://catalog/task/foobar/1/foobar.yaml
/task/foobar/2.0
/task/foobar/2.1 << --- can be referred as http://catalog/task/foobar/latest/foobar.yaml
                    `-- can be referred as http://catalog/task/foobar/2/foobar.yaml

Since k8s resources of the same kind should have unique names, currently this could be implemented in putting the version to the task name.

---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: pipeline
spec:
  tasks:
    - name: task-from-catalog
      taskRef:
        name: task-alpha-1.0.1
    - name: task-from-another-catalog
      taskRef:
        name: task-beta-2.1.1

IMHO encoding version information in the name itself isn't a good idea unless
the delimiter can't part of a valid taskname

With a similar file structure like the proposal

./task/
      /task-alpha
        /1.0.0.yaml
        /1.0.1.yaml
        ...
      /task-beta
        /2.1.0.yaml
        /2.1.1.yaml

I had considered this while writing the proposal but when you also also
consider supporting files for each verions - e.g. tests, README.md, supporting-files etc, we will have to invariably endup in creating one
additional directory to indicate the version. The other advantage of using
directory and opposed to encoding version information in file name is again
the same that we won't be able to demarkate name from version.

What do you think? Is this an issue?

With every design there will be tradeoffs, if we can define the problems in the
design, we may be able to addres it better. I have tried to provide some ideas
around issues you raised. Perhaps we can discuss this in our WG meeting

@tekton-robot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 16, 2020
@tekton-robot
Copy link

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

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.

@necccc
Copy link

necccc commented Aug 16, 2020

Thx @sthaha for the great answer!
I'll dive into the OCI artifacts a bit more, and keep an eye on TEPs regarding these concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/roadmap Issues that are part of the project (or organization) roadmap (usually an epic) kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants