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

Bug 1842992: Fix Noobaa delay issues in creating secret #5872

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

bipuladh
Copy link
Contributor

@bipuladh bipuladh commented Jul 1, 2020

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

@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jul 1, 2020
@openshift-ci-robot
Copy link
Contributor

@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
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1842992: Fix Noobaa delay issues in creating secret

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.

@openshift-ci-robot openshift-ci-robot added the component/noobaa Related to noobaa-storage-plugin label Jul 1, 2020
@openshift-ci-robot openshift-ci-robot added the component/shared Related to console-shared label Jul 1, 2020
@bipuladh bipuladh force-pushed the noobaa_secret_fix branch 3 times, most recently from 35db7d2 to ac7ad48 Compare July 1, 2020 14:09
promise.then((x) => onSuccess(x)).catch((e) => onFailure(e));
};

export const retryPromise = <T extends unknown>(
Copy link
Member

@spadgett spadgett Jul 1, 2020

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

@bipuladh bipuladh requested a review from spadgett July 1, 2020 16:15
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 2, 2020
cmResource,
);
const isLoaded = secretLoaded && configLoaded;
const error = secretLoadError && configLoadError;
Copy link
Contributor

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 ?

Suggested change
const error = secretLoadError && configLoadError;
const error = secretLoadError || configLoadError;

[name, namespace],
);

const cmResource = React.useMemo(
Copy link
Contributor

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

@rawagner
Copy link
Contributor

rawagner commented Jul 2, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2020
@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 5f0a8db into openshift:master Jul 2, 2020
@openshift-ci-robot
Copy link
Contributor

@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:

Bug 1842992: Fix Noobaa delay issues in creating secret

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.

@spadgett spadgett added this to the v4.6 milestone Jul 8, 2020
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. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/noobaa Related to noobaa-storage-plugin component/shared Related to console-shared kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants