Skip to content

Conversation

@cajieh
Copy link
Contributor

@cajieh cajieh commented Sep 27, 2019

/assign @spadgett

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. component/core Related to console core functionality labels Sep 27, 2019
@cajieh
Copy link
Contributor Author

cajieh commented Sep 27, 2019

@spadgett
Concerns:

  1. The ConfigureUpdateStrategyModal is tightly coupled to deployment workload. For example 'strategy.type field in deployment workload response doesn't match 'updateStrategy.type' in OLM storage cluster. The obj props is named deployment. To start, I created a new model using the based code, trying to figure out how I could use same model for both.
  2. In deployment workload Update Strategy is in the Action dropdown. The bug description wants it in a clickable text. FYI, just thinking if consistency is a concern here
  3. I got an error "No model registered for core.libopenstorage.org~v1alpha1" while working on update strategy save action. Looking into this issue.
  4. Code refactoring in progress

@cajieh
Copy link
Contributor Author

cajieh commented Sep 30, 2019

@spadgett
Having issue with the new StorageClusterModel I created for edit update strategy model. I got "No model registered for core.libopenstorage.orgv1alpha1StorageCluster" in console.log and "404: Page Not Found" on the UI. When I changed the kind property in the StorageClusterModel from "StorageCluster" to something else like "StorageCluste" or "StorageCluster2", it works and I am able to edit and save the updateStrategy.

@spadgett spadgett changed the title [WIP] modify view update strategy descriptor [WIP] Bug 1753812: modify view update strategy descriptor Sep 30, 2019
@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Sep 30, 2019
@openshift-ci-robot
Copy link
Contributor

@cyril-ui-developer: This pull request references Bugzilla bug 1753812, 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.

Details

In response to this:

[WIP] Bug 1753812: modify view update strategy descriptor

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.

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.

@cajieh cajieh force-pushed the modify-view-updatestrategy-descriptor branch from dfcec25 to a2bec4f Compare September 30, 2019 22:01
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 30, 2019
@cajieh cajieh force-pushed the modify-view-updatestrategy-descriptor branch from a2bec4f to 8af04a4 Compare October 1, 2019 19:04
@openshift-ci-robot openshift-ci-robot added component/olm Related to OLM size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 1, 2019
@cajieh cajieh force-pushed the modify-view-updatestrategy-descriptor branch 3 times, most recently from d6d8811 to 4478cc4 Compare October 2, 2019 18:15
const UpdateStrategy: React.FC<SpecCapabilityProps> = (props) => (
<div>{_.get(props.value, 'type', 'None')}</div>
const UpdateStrategy: React.FC<SpecCapabilityProps> = ({ model, obj, descriptor, value }) => (
<button
Copy link
Member

Choose a reason for hiding this comment

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

We're moving to the PF4 <Button variant="link"> as in #2666

cc @sg00dwin

<div>{_.get(props.value, 'type', 'None')}</div>
const UpdateStrategy: React.FC<SpecCapabilityProps> = ({ model, obj, descriptor, value }) => (
<button
data-test-id="edit-annotations"
Copy link
Member

Choose a reason for hiding this comment

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

data-test-id looks wrong. We should remove it if it's not used in a test

_.get(resource, getPath) || props.defaultValue,
);
const [maxUnavailable, setMaxUnavailable] = React.useState(
_.get(resource.spec, 'updateStrategy.rollingUpdate.maxUnavailable', '25%'),
Copy link
Member

Choose a reason for hiding this comment

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

)
.then(close, () => {})
.catch((error) => {
throw error;
Copy link
Member

Choose a reason for hiding this comment

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

The catch shouldn't be needed if we're only rethrowing the error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The catch shouldn't be needed if we're only rethrowing the error

Got eslint error when I removed catch - "error Expected catch() or return promise/catch-or-return"
I'm thinking of adding the "promise/catch-or-return": "off" to eslint config file in operator-lifecycle-manager to omit the error or add a return statement to return the promise. Please let me know your thoughts. Thanks.

Copy link
Contributor Author

@cajieh cajieh Oct 7, 2019

Choose a reason for hiding this comment

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

The catch shouldn't be needed if we're only rethrowing the error

Added the "promise/catch-or-return": "off" to eslint config file in operator-lifecycle-manager to omit the error.

const submit = (event) => {
event.preventDefault();

const patch: Patch = { path: '/spec/updateStrategy/rollingUpdate', op: 'remove' };
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't be hard-coding paths here. It should be based on props.path

@cajieh cajieh force-pushed the modify-view-updatestrategy-descriptor branch 4 times, most recently from a4512dc to fc26a9d Compare October 7, 2019 14:56
@@ -11,5 +11,6 @@ module.exports = {
message: 'Use lodash instead. webpack is configured to use lodash-es automatically.',
},
],
"promise/catch-or-return": "off",
Copy link
Member

Choose a reason for hiding this comment

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

Hm, are we sure we want this change?

Copy link
Contributor Author

@cajieh cajieh Oct 8, 2019

Choose a reason for hiding this comment

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

Hm, are we sure we want this change?

Will remove it and use return.

}

handlePromise(
k8sPatch(resourceKind, resource, [
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 we do want a return here

@@ -0,0 +1,6 @@
// This module utilizes dynamic `import()` to enable lazy-loading for each modal instead of including them in the main bundle.
Copy link
Member

Choose a reason for hiding this comment

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

I'd probably skip this since we don't do it for other modals in the package.

@cajieh cajieh force-pushed the modify-view-updatestrategy-descriptor branch from fc26a9d to 9353cec Compare October 8, 2019 19:07
@cajieh cajieh changed the title [WIP] Bug 1753812: modify view update strategy descriptor Bug 1753812: modify view update strategy descriptor Oct 8, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 8, 2019
@cajieh cajieh force-pushed the modify-view-updatestrategy-descriptor branch from 9353cec to 88b5f8c Compare October 15, 2019 13:17
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.

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cyril-ui-developer, spadgett

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 15, 2019
@openshift-merge-robot openshift-merge-robot merged commit 3a421b3 into openshift:master Oct 15, 2019
@openshift-ci-robot
Copy link
Contributor

@cyril-ui-developer: All pull requests linked via external trackers have merged. Bugzilla bug 1753812 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1753812: modify view update strategy descriptor

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.3 milestone Oct 15, 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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/core Related to console core functionality component/olm Related to OLM lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants