-
Notifications
You must be signed in to change notification settings - Fork 36
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
Problem: dependent build fails behind an unauthenticated proxy #201
Conversation
@@ -101,6 +101,11 @@ defmodule Cldr.Install do | |||
|
|||
url = "#{base_url()}#{locale_filename(locale_name)}" | |||
|
|||
if proxy = System.get_env("HTTPS_PROXY") || System.get_env("https_proxy") do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no scheme selection as the base_url is known in advance
@d-led , thanks for very for the PR. I think this is best added to cldr_utils since that provides HTTP support for the Cldr family. I'll leave this PR open until I make the change in Thanks for the contribution, greatly appreciated. |
Thanks to @d-led for the suggestion and PR to support http proxy configuration. While the configuration key is added here, the implementation will go into `cldr_utils`.
I've published cldr_utils version 2.23.0 that incorporates your PR. Would you consider I have also added a commit that adds |
Makes sense. Thx. Will do now |
@kipcole9 the upgraded |
getting a strange build in local docker without proxy. gotta follow up:
no such error on I seem to be unable to pin the problem down. Both environment variables are not set in the docker build. Why does the ↓ the env var was set to whitespace somehow. Not a fault in |
upd: |
Thanks @d-led, I'll close the PR. And make the code more resilient to invalid HTTP_PROXY env vars in cldr_utils. Thanks for your patience. |
I've published cldr_utils version 2.23.1 that makes |
superb. Thanks! For posterity: the combination that didn't work: Dockerfile: ARG HTTPS_PROXY=
ENV HTTPS_PROXY=${HTTPS_PROXY}
ENV https_proxy=${HTTPS_PROXY}
#...
RUN ./build_release.sh build_release.sh: #!/bin/bash
set -euo pipefail
IFS=$'\n\t'
//...
mix.compile for some reason, the variables seem to be set, although empty, causing Fixed the build script with the following: if [[ "$HTTPS_PROXY" = "" ]]; then unset HTTPS_PROXY; fi |
Problem
During a CI build behind a proxy (no auth parameters, just
HTTPS_PROXY
set, getting dependencies works, however building cldr fails with:as httpc options are not set in
Cldr.Install.install_locale_name
Solution
httpc
, another mechanism might be preferable