Skip to content

Expose errors generated while retrieving catalog content. #2290

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

Conversation

benluddy
Copy link
Contributor

Failing to fetch catalog content should not silently return an empty
cache. Instead, it should fail outright with an error that indicates
which catalog(s) could not be fetched.

@openshift-ci openshift-ci bot requested review from njhale and timflannagan July 26, 2021 16:10
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 26, 2021
Failing to fetch catalog content should not silently return an empty
cache. Instead, it should fail outright with an error that indicates
which catalog(s) could not be fetched.

Signed-off-by: Ben Luddy <[email protected]>
@benluddy benluddy force-pushed the resolver-cache-catalog-error branch from a49cd8b to 6ab5f16 Compare July 26, 2021 16:27
@@ -8,6 +8,8 @@ import (
"sync"
"time"

"k8s.io/apimachinery/pkg/util/errors"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supernit: space

defer func() {
// Don't cache an errorred snapshot.
if snapshot.err != nil {
snapshot.expiry = time.Time{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this trigger a cache-refresh hotloop?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At worst I'd expect syncResolvingNamespace to be requeued a handful of times, but that's a flat number of retries, not a feedback cycle. Do you have a particular cycle in mind that I missed?

Copy link
Contributor

@anik120 anik120 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Jul 26, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anik120, benluddy

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

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 26, 2021
@openshift-merge-robot openshift-merge-robot merged commit 7fe8851 into operator-framework:master Jul 26, 2021
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Namespace resolution should error out if catalog cache can't be populated
4 participants