This PR revolves around the undocumented Metronome api that will give us immediate job status.
Unfortunately, I had to change the interface signature of RunLs to return a pointer to a Job structure instead of the previous []*JobStatus.
The undocumented api adds 4 structures to the Job JSON structure which I made into pointers, adding omitempty so the normal API works.
Before, run-now type long lasting Metronone jobs, like a server, are the only type to return a job status - because it's ACTIVE. All others jobs - normal transient - wouldn't before unless you queried just when they ran.
Now all the status shows up. A job with crontab like */2 * * * * now has 100s of items.
Thankfully, there is a _timestamp parameter that can be used to filter from an epoch time to limit the results.
Obviously, the success/failure status list can get long especially for a job the runs */2 * * * * etc. I did not expose the _timestamp through the Metronome interface though with the hope that Mesosphere fixes this.
Here are the specific items in this PR:
Change LabelList to map[string][string]. Doc was confusing so I had called LabelList a struct with fixed members.
Change client.api* series of functions to take map[string][]string to support the same option being used multiple time - and to be standard. The hidden api uses embed multiple times.
Fix /ping call to return correct type
Add tests for hidden api
Add tests for json to struct transforms with support for hidden api related structs
This PR revolves around the undocumented Metronome api that will give us immediate job status.
Unfortunately, I had to change the interface signature of RunLs to return a pointer to a
Job
structure instead of the previous[]*JobStatus
.The undocumented api adds 4 structures to the Job JSON structure which I made into pointers, adding
omitempty
so the normal API works.Before,
run-now
type long lasting Metronone jobs, like a server, are the only type to return a job status - because it's ACTIVE. All others jobs - normal transient - wouldn't before unless you queried just when they ran.Now all the status shows up. A job with crontab like
*/2 * * * *
now has 100s of items.Thankfully, there is a
_timestamp
parameter that can be used tofilter from
an epoch time to limit the results.Obviously, the
success/failure
status list can get long especially for a job the runs*/2 * * * *
etc. I did not expose the _timestamp through the Metronome interface though with the hope that Mesosphere fixes this.Here are the specific items in this PR:
embed
multiple times.