terraform-provider-coder icon indicating copy to clipboard operation
terraform-provider-coder copied to clipboard

Use Duration strings instead of seconds when we accept timeouts / intervals

Open ammario opened this issue 2 years ago • 3 comments

E.g., in coder_app and coder_agent.metadata.

ammario avatar Mar 28 '23 20:03 ammario

Something like? 1m30s instead of 90?

matifali avatar Jun 28 '23 21:06 matifali

Yes, exactly. It's not clear what the unit is otherwise.

It's also painful to write automated tests when the interval is 1s. It takes many seconds to get a significant sample size.

ammario avatar Jun 28 '23 22:06 ammario

One reason to keep it a number is it simplifies arithmetic. I would still prefer we use milliseconds for testing and flexibility. Any key that accepts a duration number should indicate the unit in the suffix. E.g. we should use internal_ms instead of interval.

ammario avatar Oct 15 '24 19:10 ammario