Comment 3 for bug 1302118

Revision history for this message
Dave Cheney (dave-cheney) wrote : Re: [Bug 1302118] Re: config-get returns scientific notation for large ints

Hmm, interesting.

unit-test-0: 2014-04-04 03:05:33 DEBUG juju.worker.logger logger.go:45
reconfiguring logging from "<root>=DEBUG" to
"<root>=WARNING;unit=DEBUG"
unit-test-0: 2014-04-04 03:05:34 INFO config-changed 3e+07

Yet when I add a test case to the output_test.go tests in cmd/ it passes ... hmm

On Fri, Apr 4, 2014 at 6:03 AM, Curtis Hovey <email address hidden> wrote:
> This might be an issue with goyaml.
>
> ** Changed in: juju-core
> Status: New => Triaged
>
> ** Changed in: juju-core
> Importance: Undecided => High
>
> ** Tags added: config
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> Matching subscriptions: MOAR JUJU SPAM!
> https://bugs.launchpad.net/bugs/1302118
>
> Title:
> config-get returns scientific notation for large ints
>
> Status in juju-core:
> Triaged
>
> Bug description:
> I was writing a new charm and I found an interesting problem.
>
> When I put a large int value in config.yaml (30000000) and read this
> value in config-changed with config-get it returned the scientific
> notation of that number 3e+07.
>
> This result was unexpected and very hard to deal with the number in a
> bash script. I was trying to do some math with "bc" which does not
> recognize this format of scientific notation.
>
> I have included a skeleton charm that shows this. Deploy the charm
> and watch the unit logs it will echo the value from the config-changed
> hook.
>
> Please let me know if you need any more information.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1302118/+subscriptions