-
Notifications
You must be signed in to change notification settings - Fork 888
feat(cli): allow showing schedules for multiple workspaces #10596
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
Conversation
234f0cb
to
2d662e4
Compare
d9afcb6
to
dd3fa2a
Compare
StartsNext: nextStartDisplay, | ||
StopsAfter: autostopDisplay, | ||
StopsNext: nextStopDisplay, | ||
} |
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.
Should we include the datapoints "calculated" here in the API response instead (obviously not the formatting, but timestamps, etc). I'm thinking it'd be better if our CLI was "dumber", and it might help other API consumers too.
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.
What specific datapoints do you want included?
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.
I suppose I'm thinking of something like this:
GET /workspace/uuid
{
...,
"schedule": {
"starts_next": time,
"stops_next": time,
...
},
...
}
Maybe more fields if it makes sense. Basically I'm thinking if we can avoid the need to call cron.Weekly
, etc since a client who wants to know this information will need to be able to parse cron tabs (+ any other business logic that may be releavant).
Just an idea.
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.
It's not a bad idea! Filed #10621
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Fixes #10428
coder list
: adds information about next start / stop to available columns (not default)coder schedule
:show
now essentiallycoder list
with a different set of columnsWhat this looks like: