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 1678195: Prevent unmounting and mounting of create secret form #1300

Merged
merged 1 commit into from
Mar 19, 2019

Conversation

jhadvig
Copy link
Member

@jhadvig jhadvig commented Mar 18, 2019

Had to rewrite the SecretLoadingWrapper component from stateless to stateful ...

/assign @spadgett

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1678195

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 18, 2019
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 18, 2019
@jhadvig
Copy link
Member Author

jhadvig commented Mar 18, 2019

From: Task: Run it("displays metadata about the created `Prometheus` in its "Overview" section") in control flow
    at UserContext.<anonymous> (/go/src/github.com/openshift/console/frontend/node_modules/jasminewd2/index.js:94:19)
    at attempt (/go/src/github.com/openshift/console/frontend/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4297:26)
    at QueueRunner.run (/go/src/github.com/openshift/console/frontend/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4217:20)
    at QueueRunner.execute (/go/src/github.com/openshift/console/frontend/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4199:10)
    at Spec.queueRunnerFactory (/go/src/github.com/openshift/console/frontend/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:909:35)
    at Spec.execute (/go/src/github.com/openshift/console/frontend/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:526:10)
    at UserContext.fn (/go/src/github.com/openshift/console/frontend/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:5340:37)
    at attempt (/go/src/github.com/openshift/console/frontend/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4297:26)
    at QueueRunner.run (/go/src/github.com/openshift/console/frontend/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4217:20)
    at runNext (/go/src/github.com/openshift/console/frontend/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4257:20)

/retest

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

Thanks @jhadvig

@jhadvig jhadvig force-pushed the BZ1678195 branch 2 times, most recently from 89b1375 to d971193 Compare March 18, 2019 15:08
@jhadvig
Copy link
Member Author

jhadvig commented Mar 18, 2019

@spadgett comments addressed

@spadgett
Copy link
Member

/go/src/github.com/openshift/console/frontend/public/components/secrets/create-secret.tsx
  893:9  error  Expected property shorthand  object-shorthand

const secretTypeAbstraction = toTypeAbstraction(this.props.obj.data);
this.setState({
formComponent: secretFormFactory(secretTypeAbstraction),
secretTypeAbstraction: secretTypeAbstraction});
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
secretTypeAbstraction: secretTypeAbstraction});
secretTypeAbstraction,
});

const secretTypeAbstraction = toTypeAbstraction(props.obj.data);
const SecretFormComponent = secretFormFactory(secretTypeAbstraction);
const fixed = _.reduce(props.fixedKeys, (acc, k) => ({...acc, k: _.get(props.obj.data, k)}), {});
return <StatusBox {...props.obj}>
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 this will break error handling if the secret doesn't exist.

Copy link
Member Author

Choose a reason for hiding this comment

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

not really sure how, since the StatusBox component is mainly operating with loaded and loadError properties, that are supplied by Firehose

@jhadvig
Copy link
Member Author

jhadvig commented Mar 19, 2019

/retest

@jhadvig
Copy link
Member Author

jhadvig commented Mar 19, 2019

ub.com/openshift/console/frontend/integration-tests/tests/olm/descriptors.scenario.ts:190:69
       at Env.<anonymous> /go/src/github.com/openshift/console/frontend/node_modules/jasmine-fail-fast/dist/jasmine-fail-fast.js:57:26
       at Env.wrapper [as describe] /go/src/github.com/openshift/console/frontend/node_modules/jasmine-fail-fast/node_modules/lodash/index.js:3592:19
       at Object.<anonymous> /go/src/github.com/openshift/console/frontend/integration-tests/tests/olm/descriptors.scenario.ts:35:1

/retest

@jhadvig
Copy link
Member Author

jhadvig commented Mar 19, 2019

level=warning msg="Found override for ReleaseImage. Please be warned, this is not advised"
level=info msg="Consuming \"Install Config\" from target directory"
level=info msg="Creating infrastructure resources..."
level=info msg="Waiting up to 30m0s for the Kubernetes API at https://api.ci-op-str9iqs2-43410.origin-ci-int-aws.dev.rhcloud.com:6443..."
level=info msg="API v1.12.4+a3fb3df up"
level=info msg="Waiting up to 30m0s for the bootstrap-complete event..."
level=info msg="Destroying the bootstrap resources..."
level=info msg="Waiting up to 30m0s for the cluster at https://api.ci-op-str9iqs2-43410.origin-ci-int-aws.dev.rhcloud.com:6443 to initialize..."
level=fatal msg="failed to initialize the cluster: timed out waiting for the condition"

/retest

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

}
render() {
const { obj, fixedKeys} = this.props;
const { secretTypeAbstraction } = this.state;
Copy link
Member

Choose a reason for hiding this comment

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

nit: you could use destructuring here to avoid the assignment below on line 903

Suggested change
const { secretTypeAbstraction } = this.state;
const { secretTypeAbstraction, formComponent: SecretFormComponent } = this.state;

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, spadgett

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

@spadgett
Copy link
Member

level=fatal msg="failed to initialize the cluster: timed out waiting for the condition"

/retest

@openshift-merge-robot openshift-merge-robot merged commit 9985d04 into openshift:master Mar 19, 2019
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants