Skip to content

Conversation

cesnietor
Copy link
Collaborator

@cesnietor cesnietor commented May 23, 2020

Screen Shot 2020-05-22 at 5 59 36 PM

Test Steps:

  • On UI a new item on the Menu should appear for Heal
  • A server should be running in distributed mode you can do minio server ./dat{1...4}
  • Upload some files to a bucket
  • Delete one "disk" rm -rf ./dat4
  • Start healing, with recursive either by selecting the bucket (optional)

Tests missing.

@cesnietor cesnietor requested review from Alevsk, dvaldivia and bexsoft May 23, 2020 00:58
@cesnietor cesnietor self-assigned this May 23, 2020
@cesnietor cesnietor added the WIP This PR is WIP and cannot be merged yet label May 23, 2020
@cesnietor cesnietor force-pushed the mcs-heal branch 2 times, most recently from 7f2adab to cb57152 Compare May 23, 2020 01:16
dvaldivia
dvaldivia previously approved these changes May 23, 2020
Comment on lines 67 to 74
// interface HealStatus {
// beforeHeal: number[];
// afterHeal: number[];
// objectsHealed: number;
// objectsScanned: number;
// healDuration: number;
// sizeScanned: string;
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

if this code is not need it please delete it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Comment on lines 126 to 131
interface colorH {
[Green: string]: number;
Yellow: number;
Red: number;
Grey: number;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be moved to the heal/types.ts file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

if req.FormValue("force-start") != "" {
boolVal, err := strconv.ParseBool(req.FormValue("force-start"))
if err != nil {
return healOptions{}, err
Copy link
Contributor

Choose a reason for hiding this comment

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

should we return nil instead of an empty struct? in the case of yes func return should be changed to *healOptions too

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done


// getHealOptionsFromReq return options from request for healing process
// path come as : `/heal/bucket1` and query params come on request form
func getHealOptionsFromReq(req *http.Request) (hOptions healOptions, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should return pointer to struct to be consistent with the functions called by the other endpoints

Suggested change
func getHealOptionsFromReq(req *http.Request) (hOptions healOptions, err error) {
func getHealOptionsFromReq(req *http.Request) (hOptions *healOptions, err error) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

createStyles({
watchList: {
background: "white",
maxHeight: "400px",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use only numeric values in createStyles function when using pixels

Suggested change
maxHeight: "400px",
maxHeight: 400,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

maxHeight: "400px",
overflow: "auto",
"& ul": {
margin: "4px",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
margin: "4px",
margin: 4,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

overflow: "auto",
"& ul": {
margin: "4px",
padding: "0px",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
padding: "0px",
padding: 0

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

borderRadius: 5,
marginLeft: 10,
textAlign: "left",
minWidth: "206px",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
minWidth: "206px",
minWidth: 206,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done


interface colorH {
[Green: string]: number;
Yellow: number;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we have the same structure as Green for all the elements in the interface

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no, it seems that it should be only on the first one which will define the signature index :
else it shows Duplicate string index signature.

@cesnietor cesnietor requested review from Alevsk and bexsoft May 26, 2020 21:16
@cesnietor cesnietor requested a review from dvaldivia May 26, 2020 21:16
@cesnietor cesnietor removed the WIP This PR is WIP and cannot be merged yet label May 26, 2020
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

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

LGTM

@dvaldivia dvaldivia merged commit fa068b6 into minio:master May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants