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

[resolvers: bundle] Errors when pulling bundles from registries should be wrapped #6386

Closed
arewm opened this issue Mar 17, 2023 · 4 comments
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@arewm
Copy link

arewm commented Mar 17, 2023

Expected Behavior

When the bundle resolver is pulling bundles from a registry, it should be able to detect when there is an issue with the registry and wrap that error to present a more user-friendly error

Actual Behavior

Pipeline tekton-ci/tekton-bundle-builder can't be Run; it contains Tasks that don't exist: Couldn't retrieve Task "summary": yaml: control characters are not allowed

Steps to Reproduce the Problem

This is not an issue that I have encountered directly but one that I have seen others encounter. I have seen this arise when the registry service blips out so multiple images might not be able to be pulled. Potential reproduction steps

  1. Reference an invalid bundle image (i.e. one that will return a 404 or 5xx)
  2. Run the pipeline

Additional Info

  • Kubernetes version:
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4+a34b9e9", GitCommit:"b6d1f054747e9886f61dd85316deac3415e2726f", GitTreeState:"clean", BuildDate:"2023-01-10T15:55:28Z", GoVersion:"go1.19.4", Compiler:"gc", Platform:"linux/amd64"}
  • Tekton Pipeline version: 0.41
@arewm arewm added the kind/bug Categorizes issue or PR as related to a bug. label Mar 17, 2023
@arewm
Copy link
Author

arewm commented Mar 17, 2023

The bundle resolving was actually performed via .taskRef.bundle and not .taskRef.resolver. While I will need to move to the new bundle resolver, we should still make sure that the resolver properly handles the errors seen from the previous bundle resolution method.

@vdemeester
Copy link
Member

Looking a little bit into it, it does seem it happens when quay.io doesn't return a 500 but an actual 200 with an html content.

@vdemeester
Copy link
Member

/assign

@vdemeester
Copy link
Member

@arewm so this is actually a bit of a problem to fix, and I am going to close this.

  • The resolvers (and the legacy bundle code as well) act correctly given the registry is acting like a normal service.
  • Quay sometimes returns an HTTP 200 with some html content when it is unstable or errors out on a pull.. This is a Quay issue. Tt should return a HTTP 500 which would be properly handled by tekton
  • The error contains Couldn't retrieve Task "summary", which, even though the later is a bit criptic, convey the information that something went wrong and tekton couldn't find the task

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
Development

No branches or pull requests

2 participants