-
Notifications
You must be signed in to change notification settings - Fork 593
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 1910483: Fix for Storage cluster creation failed with 'Cannot read property "protocol" of null ' on adding& then cancelling Encryption #7688
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -76,14 +76,17 @@ export const EncryptionFormGroup: React.FC<EncryptionFormGroupProps> = ({ | |||||||||
}, [encryption.clusterWide, encryption.storageClass, encryptionChecked]); | ||||||||||
|
||||||||||
const toggleEncryption = (checked: boolean) => { | ||||||||||
setEncryptionDispatch(ActionType.SET_ENCRYPTION, mode, dispatch, { | ||||||||||
const payload = { | ||||||||||
...encryption, | ||||||||||
clusterWide: checked, | ||||||||||
}); | ||||||||||
setEncryptionChecked(checked); | ||||||||||
}; | ||||||||||
if (!checked) { | ||||||||||
payload.advanced = false; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should also set all encryption level and both encryption and kms states to initial value when the high level encryption box is unchecked.
There is already one check for clearing kms state on L88, please merge the above with this one. Lines 88 to 91 in c29d749
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ack |
||||||||||
payload.storageClass = false; | ||||||||||
setEncryptionDispatch(ActionType.CLEAR_KMS_STATE, mode, dispatch); | ||||||||||
} | ||||||||||
setEncryptionDispatch(ActionType.SET_ENCRYPTION, mode, dispatch, payload); | ||||||||||
setEncryptionChecked(checked); | ||||||||||
}; | ||||||||||
|
||||||||||
const toggleClusterWideEncryption = (checked: boolean) => { | ||||||||||
|
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.
@afreen23 I can see a separate useEffect is to set "hasHandled" flag for all cases, Setting a flag is kind of redundant and leads to unpredicted behavior, so I removed it from my latest change