DescriptionUse stats=0 for charm store interaction by CI
Bug #1276462: CI deployments have a noticable effect on the charm
download statistics.
Unfortunately, just adding an environment variable JUJU_TESTING is not
sufficient: Running something like "JUJU_TESTING=1 juju deploy mysql"
or "JUJU_TESTING juju bootstrap" does not automatically set the
environment variable in the deployed machines, where the charm downloads
happen.
After discussing the problem with TheMue I added instead a new config
parameter "testing". This parameter can then be used on the deployed
machines to add the HTTP query parameter "stats=0" to the URL.
The type Repository has three methods that issue HTTP GET requests to the
store: Get(), Info() and Event(). The latter method is only used during
charm uploads, so I did not change it.
So, Get() and Info() need access to the environment configuration. ISTM
that direct access is not possible in the package charm due to circular
import, so I added a call parameter "testing" to Get() nad Info(); this
parameter is set from the configuration data in the call sites.
https://code.launchpad.net/~adeuring/juju-core/1276462/+merge/208834
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 1
Patch Set 2 : Use stats=0 for charm store interaction by CI #Patch Set 3 : Use stats=0 for charm store interaction by CI #
Total comments: 16
MessagesTotal messages: 7
|