Repository navigation
Conversation
nsklikas
force-pushed
the
token-request-through-proxy
branch
from
November 19, 2026 13:59
c54a5c8 to
3e3e5c2
Compare
The actions asked Hydra for their token from the charm container with no proxy and no timeout. Where the only way out is a proxy, the request hung until the kernel's connect timeout and the CLI then ran with no token. The request now goes through the http_proxy and https_proxy options, unless no_proxy names the endpoint's host, and has a timeout of 10 s. Fixes #68
nsklikas
force-pushed
the
token-request-through-proxy
branch
from
November 23, 2026 14:37
3e3e5c2 to
ae1b4a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The actions ask Hydra for the management token from the charm container, with
requests, with no proxy and no timeout. Juju gives the model's proxy settings to the charm asJUJU_CHARM_*_PROXY, whichrequestsdoes not read. In a model whose only way out is an HTTP proxy, the request waits until the kernel's connect timeout (about two minutes),_get_management_token()returnsNone, and the CLI runs with--token no-token. The action then fails withinvalid token. Fixes #68.Change
https_proxyoption, orhttp_proxyfor anhttpendpoint. Whenno_proxynames the endpoint's host, it goes without the proxy.CharmConfig.get_proxy_config()returns the three options for the charm's own requests.With the options unset, nothing changes but the timeout.
Tests
tests/unit/test_clients.py(new): the request goes through the proxy, or not whenno_proxynames the host, and has the timeout.tests/unit/test_configs.py:get_proxy_config().test_charm.pyfail onmainas they are (InconsistentScenarioError, thepebble-readycontainer), with and without this change.