Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upswagger: define type for rfc3339nano timestamps #12374
Comments
mark-rushakoff
added
the
area/api-docs
label
Mar 5, 2019
mark-rushakoff
referenced this issue
Mar 5, 2019
Open
task: run FinishedAt value doesn't match date-time regex in swagger #12280
russorat
added
the
team/control
label
Apr 22, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


mark-rushakoff commentedMar 5, 2019
Tasks use some rfc3339nano timestamps in a few places. #12280 is related to a run's startedAt and finishedAt values not matching swagger, because the type is defined as date-time in swagger but rfc3339nano doesn't match.
Dashboards' createdAt and updatedAt have the same issue; see #12298.
There may be other places than those two, but those are the only two outstanding issues I know of.
To fix this generally, we should have a swagger type that is capable of displaying subsecond precision.
Note, one drawback of the default rfc3339nano formatting:
FWIW, flux has a workaround to avoid removing trailing zeros: https://github.com/influxdata/flux/blob/16950c44f1433dd34f656a4128adeed73d270fcc/values/time.go#L52-L62
If we decide that sortability is a property worth keeping, we could find a way to standardize on what flux is doing there for printing out timestamps.