Skip to content
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

Convert seconds to nanoseconds for juju.unit.run #237

Merged
merged 2 commits into from
Jun 5, 2018

Conversation

gnuoy
Copy link

@gnuoy gnuoy commented Jun 5, 2018

The juju.unit.run docstring does not specify what units the timeout
value should be in. This led to issue #225. Having looked into it,
juju is expecting it to be in nanoseconds. I don't think
nanoseconds is particularly intuitive so I have updated the function
to take the timeout in seconds and convert it internally to
nanoseconds.

I appreciate this is a breaking change for anyone currently specifying
the timeout in nanoseconds so I would quite understand if this change
is nack'd in which case I will submit a subsequent pr which simply
updates the doc string. Closes #225.

Liam Young added 2 commits June 5, 2018 10:12
The juju.unit.run docstring does not specify what units the timeout
value should be in. This led to issue juju#225. Having looked into it,
juju is expecting it to be in nanoseconds. I don't think
nanoseconds is particularly intuitive so I have updated the function
to take the timeout in seconds and convert it internally to
nanoseconds.

I appreciate this is a breaking change for anyone currently specifying
the timeout in nanoseconds so I would quite understand if this change
is nack'd in which case I will submit a subsequent pr which simply
updates the doc string. Closes juju#225.
@tvansteenburgh tvansteenburgh self-requested a review June 5, 2018 16:25
Copy link
Contributor

@tvansteenburgh tvansteenburgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does break back-compat but I think it's worth it in this case. #225 shows that users will intuitively expect this value to be in seconds. Plus, libjuju is still pre-1.0, so technically there are no api guarantees yet anyway.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants