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

Legacy bundle syntax does not work with remote resoruces #6058

Closed
afrittoli opened this issue Jan 26, 2023 · 3 comments · Fixed by #6061
Closed

Legacy bundle syntax does not work with remote resoruces #6058

afrittoli opened this issue Jan 26, 2023 · 3 comments · Fixed by #6061
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@afrittoli
Copy link
Member

Expected Behavior

I can use the legacy bundle syntax in Tekton v0.44:

    taskRef:
      kind: Task
      params:
      - name: bundle
        value: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
      - name: name
        value: git-batch-merge
      - name: kind
        value: Task

Actual Behavior

Pipeline tekton-ci/tekton-image-build can't be Run; it contains Tasks that don't exist: Couldn't retrieve Task "": failed to get task: error requesting remote resource: error getting "bundleresolver" "tekton-ci/bundles-e48f9a9d47f93b59899b7d303fe7799a": could not find object in image with kind: Task and name: git-batch-merge

Steps to Reproduce the Problem

  1. Any of the Tekton CI jobs in plumbing

Additional Info

  • Kubernetes version:
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.14-gke.1800", GitCommit:"1eab5b8da4acab130c72aea21eb7ed3e96523ca2", GitTreeState:"clean", BuildDate:"2022-12-07T09:32:46Z", GoVersion:"go1.17.13b7", Compiler:"gc", Platform:"linux/amd64"}
  • Tekton Pipeline version:
Client version: 0.28.0
Chains version: v0.8.0
Pipeline version: v0.44.0
Triggers version: v0.22.1
Dashboard version: v0.32.0
@afrittoli afrittoli added the kind/bug Categorizes issue or PR as related to a bug. label Jan 26, 2023
@abayer
Copy link
Contributor

abayer commented Jan 26, 2023

So the remote bundles syntax is:

  taskRef:
    resolver: bundles
    params:
      - name: bundle
        value: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
      - name: name
        value: git-batch-merge
      - name: kind
        value: task

I'm guessing this is v1 conversion stuff, and it's somehow not setting resolver: bundles?

@abayer
Copy link
Contributor

abayer commented Jan 26, 2023

Ah, wait, just checked the actual Pipeline in dogfooding and found:

    taskRef:
      kind: Task
      params:
      - name: bundle
        value: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
      - name: name
        value: git-batch-merge
      - name: kind
        value: Task
      resolver: bundles

...so the resolver:bundles is being set.

@abayer
Copy link
Contributor

abayer commented Jan 26, 2023

Oh, that's stupid - dev.tekton.image.kind in the relevant bundle is task, but the kind it's checking for equality with is Task. 🤦 I'll open a PR tomorrow to make that check case-insensitive, but I'm not sure what the right immediate solution is for us on dogfooding - I guess we can manually update all the relevant jobs to have value: task instead.

afrittoli added a commit to afrittoli/plumbing that referenced this issue Jan 26, 2023
Legacy bundles are not supported in v0.44.0.
Conversion should migrate automatically to the remote resolution
syntax, but due to a bug it doesn't work:
- tektoncd/pipeline#6058

Migrate all bundle references to the new format to avoid the
issue in the convertion.

Signed-off-by: Andrea Frittoli <andrea.frittoli@uk.ibm.com>
tekton-robot pushed a commit to tektoncd/plumbing that referenced this issue Jan 26, 2023
Legacy bundles are not supported in v0.44.0.
Conversion should migrate automatically to the remote resolution
syntax, but due to a bug it doesn't work:
- tektoncd/pipeline#6058

Migrate all bundle references to the new format to avoid the
issue in the convertion.

Signed-off-by: Andrea Frittoli <andrea.frittoli@uk.ibm.com>
abayer added a commit to abayer/tektoncd-pipeline that referenced this issue Jan 27, 2023
…itive for kind

fixes tektoncd#6058

When we finished deprecating the legacy bundle resolution syntax, we recommended users change from:
```
      taskRef:
        name: git-batch-merge
        bundle: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
```
to
```
      taskRef:
        resolver: bundles
        params:
          - name: bundle
            value: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
          - name: name
            value: git-batch-merge
          - name: kind
            value: Task
```

But that created a problem - we have been comparing the `kind` parameter to the `dev.tekton.image.kind` annotation value in the bundle, which is generally all lower-case. Since we generally use `Task`, `Pipeline`, etc for `kind` values in our syntax, we've created a situation where the "normal" way to specify a `kind`, i.e., capitalized, is not going to work for most, if not all, bundles.

To fix this, we're changing the check in the remote bundles resolver to do a case-insensitive comparison.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
abayer added a commit to abayer/tektoncd-pipeline that referenced this issue Jan 27, 2023
…itive for kind

fixes tektoncd#6058

When we finished deprecating the legacy bundle resolution syntax, we recommended users change from:
```
      taskRef:
        name: git-batch-merge
        bundle: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
```
to
```
      taskRef:
        resolver: bundles
        params:
          - name: bundle
            value: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
          - name: name
            value: git-batch-merge
          - name: kind
            value: Task
```

But that created a problem - we have been comparing the `kind` parameter to the `dev.tekton.image.kind` annotation value in the bundle, which is generally all lower-case. Since we generally use `Task`, `Pipeline`, etc for `kind` values in our syntax, we've created a situation where the "normal" way to specify a `kind`, i.e., capitalized, is not going to work for most, if not all, bundles.

To fix this, we're changing the check in the remote bundles resolver to do a case-insensitive comparison.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
tekton-robot pushed a commit that referenced this issue Jan 31, 2023
…itive for kind

fixes #6058

When we finished deprecating the legacy bundle resolution syntax, we recommended users change from:
```
      taskRef:
        name: git-batch-merge
        bundle: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
```
to
```
      taskRef:
        resolver: bundles
        params:
          - name: bundle
            value: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
          - name: name
            value: git-batch-merge
          - name: kind
            value: Task
```

But that created a problem - we have been comparing the `kind` parameter to the `dev.tekton.image.kind` annotation value in the bundle, which is generally all lower-case. Since we generally use `Task`, `Pipeline`, etc for `kind` values in our syntax, we've created a situation where the "normal" way to specify a `kind`, i.e., capitalized, is not going to work for most, if not all, bundles.

To fix this, we're changing the check in the remote bundles resolver to do a case-insensitive comparison.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
EmmaMunley pushed a commit to EmmaMunley/pipeline that referenced this issue Feb 2, 2023
…itive for kind

fixes tektoncd#6058

When we finished deprecating the legacy bundle resolution syntax, we recommended users change from:
```
      taskRef:
        name: git-batch-merge
        bundle: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
```
to
```
      taskRef:
        resolver: bundles
        params:
          - name: bundle
            value: gcr.io/tekton-releases/catalog/upstream/git-batch-merge:0.2
          - name: name
            value: git-batch-merge
          - name: kind
            value: Task
```

But that created a problem - we have been comparing the `kind` parameter to the `dev.tekton.image.kind` annotation value in the bundle, which is generally all lower-case. Since we generally use `Task`, `Pipeline`, etc for `kind` values in our syntax, we've created a situation where the "normal" way to specify a `kind`, i.e., capitalized, is not going to work for most, if not all, bundles.

To fix this, we're changing the check in the remote bundles resolver to do a case-insensitive comparison.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
2 participants