-
Notifications
You must be signed in to change notification settings - Fork 605
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
Bug 1842992: Fix Noobaa delay issues in creating secret #5872
Bug 1842992: Fix Noobaa delay issues in creating secret #5872
Conversation
@bipuladh: This pull request references Bugzilla bug 1842992, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
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. |
35db7d2
to
ac7ad48
Compare
promise.then((x) => onSuccess(x)).catch((e) => onFailure(e)); | ||
}; | ||
|
||
export const retryPromise = <T extends unknown>( |
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.
Is there a reason we can't use a watch with a metadata.name
field selector instead? Then you don't need retries, and the data appears immediately when it's created.
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.
We could but for a simple object like secret and ConfigMap is it worth polling over and over? It would get created after a second or two.
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.
I think it's a lot cleaner and more robust. It won't fail if the resource isn't created in whatever arbitrary number of retries we pick.
We use watches all over console. If we're worried about overhead, we should be looking at places like the Home -> Status page or Topology, which hold a lot of expensive watches. Watching a single secret or config map is negligible.
I'm concerned with adding a generic retry helper to shared because it's not a pattern we should encourage.
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.
ack removing this helper and using watch.
ac7ad48
to
9ef50f9
Compare
cmResource, | ||
); | ||
const isLoaded = secretLoaded && configLoaded; | ||
const error = secretLoadError && configLoadError; |
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.
shouldn't it be or
?
const error = secretLoadError && configLoadError; | |
const error = secretLoadError || configLoadError; |
[name, namespace], | ||
); | ||
|
||
const cmResource = React.useMemo( |
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.
I would prefer to combine this with useMemo
above, not a big deal though
9ef50f9
to
f875f24
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bipuladh, rawagner 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 |
@bipuladh: All pull requests linked via external trackers have merged: openshift/console#5872. Bugzilla bug 1842992 has been moved to the MODIFIED state. In response to this:
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. |
Noobaa sometimes takes a few seconds to create Secret and Configmap related to an OBC.
UI needs to try it a few times before giving up.
/kind bug
/assign @rawagner
cc @cloudbehl