-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Remove unnecessary env variables passing #1560
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,9 +5,7 @@ ARCH=$(uname -m) | |
| FILE_NAME="wal2json-Linux-$ARCH-glibc.so" | ||
|
|
||
| docker_curl() { | ||
| # The environment variables can be specified in lower case or upper case. | ||
| # The lower case version has precedence. http_proxy is an exception as it is only available in lower case. | ||
| docker run --rm -e http_proxy -e https_proxy -e HTTPS_PROXY -e no_proxy -e NO_PROXY curlimages/curl:7.77.0 "$@" | ||
| docker run --rm curlimages/curl:7.77.0 "$@" | ||
|
||
| } | ||
|
|
||
| if [[ $WAL2JSON_VERSION == "latest" ]]; then | ||
|
|
||
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.
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.
Doesn't this break current users' workflow using
http_proxyenv variable?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.
Yes you are right. But I think it's very specific scenario: such users can access the Dockerhub without any proxy, but need http proxy for some resources during Sentry installation, like https://github.com/getsentry/wal2json.
For users who access any Internet resources (including Dockerhub) during installation it's required to set HTTP Proxy several times:
docker pull~/.docker/config.jsonfor any commands inside docker containers/etc/environmentfor settings shell proxy variablesI think we can set only do 1. and 2. But in this case
docker buildwill fail because in the commands above we explicitly overwrite proxy variables with empty values, that is why I suggest to modify these lines.Actually we can keep these lines unchanged but from our discussion getsentry/develop#622 (comment) I'd found that this behavior is a bit unclear, that is why I'd created this PR with such changes.
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.
Let me check it one more time. I'd tried to install Sentry with my changes again and there are some issues.
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.
I'd rechecked this one more time. Proxies from
~/.docker/config.jsonwork only fordocker runcommand and do not work fordocker build. It is written in the docker docs:So we have to pass proxy env variables explicitly for the build command, that is why this PR shouldn't be merged.