Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Update charm libraries #92

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/charms/loki_k8s/v0/loki_push_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def _alert_rules_error(self, event):

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 27
LIBPATCH = 28

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -2119,9 +2119,13 @@ def _download_and_push_promtail_to_workload(self, promtail_info: dict) -> None:
# If no Juju proxy variable was set, we set proxies to None to let the ProxyHandler get
# the proxy env variables from the environment
proxies = {
"https_proxy": os.environ.get("JUJU_CHARM_HTTPS_PROXY", ""),
"http_proxy": os.environ.get("JUJU_CHARM_HTTP_PROXY", ""),
"no_proxy": os.environ.get("JUJU_CHARM_NO_PROXY", ""),
# The ProxyHandler uses only the protocol names as keys
# https://docs.python.org/3/library/urllib.request.html#urllib.request.ProxyHandler
"https": os.environ.get("JUJU_CHARM_HTTPS_PROXY", ""),
"http": os.environ.get("JUJU_CHARM_HTTP_PROXY", ""),
# The ProxyHandler uses `no` for the no_proxy key
# https://github.com/python/cpython/blob/3.12/Lib/urllib/request.py#L2553
"no": os.environ.get("JUJU_CHARM_NO_PROXY", ""),
}
proxies = {k: v for k, v in proxies.items() if v != ""} or None

Expand Down
Loading