RSDK-12536: Jobs CLI Parity#5731
Open
allisonschiang wants to merge 14 commits intoviamrobotics:mainfrom
Open
Conversation
allisonschiang
commented
Feb 11, 2026
allisonschiang
commented
Feb 23, 2026
| Name: generalFlagPart, | ||
| Aliases: []string{generalFlagPartID, generalFlagPartName}, | ||
| Required: true, | ||
| // partFlags builds the standard part/org/location/machine flag set. |
Member
Author
There was a problem hiding this comment.
if we want users to be able to input part id within the interactive huh form, we need to create a wrapper around the commonPartFlags so it can take part-id as an optional input (and won't instantly reject add-job if there's no part-id)
allisonschiang
commented
Feb 23, 2026
| } | ||
|
|
||
| // parseJSONOrFile tries to read input as a file, falls back to parsing as inline JSON | ||
| func parseJSONOrFile(input string) (map[string]any, error) { |
Member
Author
There was a problem hiding this comment.
will use the updated enable/disable resource parseJSONOrFile here (with the updated error msg)
allisonschiang
commented
Feb 23, 2026
| Usage: "add a scheduled job to a machine part", | ||
| Description: `Add a scheduled job that runs a method on a resource at a given interval. | ||
|
|
||
| With --attributes, pass a single JSON object (inline or path to a JSON file) with: |
Member
Author
There was a problem hiding this comment.
should I delete the description for using the -attributes tag if we want to encourage the interactive flow? viam module generate doesn't advertise the flag path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
testing (I tested to make sure it worked by looking at app, used AI to test individual validations):
add-job
Validated (rejected with error):
object
'{"name":"t","schedule":"5s","resource":"x","method":"DoCommand","log_configuration":{"level":"verbose"}}' → invalid log level
exists) → duplicate name
Working (created successfully):
'{"name":"t-loglevel","schedule":"5s","resource":"x","method":"DoCommand","log_configuration":{"level":"debug"}}'
update-job
Validated (rejected with error):
Warned (updated with warning):
Working (updated successfully):
delete-job
Validated (rejected with error):
Working (deleted successfully):