-
Notifications
You must be signed in to change notification settings - Fork 555
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
Expose errors generated while retrieving catalog content. #2290
Conversation
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]>
a49cd8b
to
6ab5f16
Compare
@@ -8,6 +8,8 @@ import ( | |||
"sync" | |||
"time" | |||
|
|||
"k8s.io/apimachinery/pkg/util/errors" | |||
|
There was a problem hiding this comment.
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{} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[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 |
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.