-
Notifications
You must be signed in to change notification settings - Fork 111
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
RSDK-9286 - simplify org-location-machine-part hierarchy #4703
RSDK-9286 - simplify org-location-machine-part hierarchy #4703
Conversation
@@ -1327,7 +1327,7 @@ var app = &cli.App{ | |||
Usage: "removes binary data with file IDs in a single org and location from dataset", | |||
UsageText: createUsageText("dataset data remove", | |||
[]string{datasetFlagDatasetID, generalFlagOrgID, dataFlagLocationID, dataFlagFileIDs}, false), | |||
// TODO(RSDK-9286) do we need to ask for og and location here? | |||
// CR erodkin: we need these because currently the way the Data APIs work, if you don't pass the primary org ID then it won't work correctly and I don't think we can properly infer which one is the "correct" one. We could do something hacky! but probably better to leave this to data to fix, and flag this to reviewers in the meantime. | |||
Flags: []cli.Flag{ |
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.
We continue to ask for and require all of org/location/machine for RemoveDataFromDataset
. Per discussion with @dmhilly and @tahiyasalam, the behavior here will change depending on which org ID is passed, and if we pass a secondary org ID instead of the primary owning org ID then data will not be removed correctly.
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.
Everything looking good, just have to update the usage text with the new required/unrequired options
cli/app.go
Outdated
@@ -1727,8 +1724,14 @@ var app = &cli.App{ | |||
Name: "status", | |||
Usage: "display part status", | |||
UsageText: createUsageText("machines part status", []string{generalFlagMachine, generalFlagPart}, true), |
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.
if machine is no longer required, this has to be updated. same goes for all the other commands
cli/app.go
Outdated
@@ -1888,10 +1877,14 @@ var app = &cli.App{ | |||
Usage: "start a shell on a machine part", | |||
Description: `In order to use the shell command, the machine must have a valid shell type service.`, | |||
UsageText: createUsageText( | |||
"machines part shell", []string{generalFlagOrganization, generalFlagLocation, generalFlagMachine, generalFlagPart}, false, | |||
"machines part shell", []string{generalFlagMachine, generalFlagPart}, false, |
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.
machine doesn't seem to be required
Minimizes the information needed when working with the org/location/machine/part hierarchy. We continue to allow for all information to be passed and indicate as such because the way information is passed alters what's necessary, i.e. passing just part is okay if we pass the part ID, but not if we pass the part name.
As a flyby, updates the way the hierarchy is shared to ensure accuracy. Previously, if we passed just a machine ID and a part ID, we'd list the org and location as the alphabetically first ones even when that wasn't correct.
Tested locally by running commands with minimized information, ensured no change in behavior.