From da6d4972715bf29d8616eb0ccc75dd9445a271ec Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Fri, 8 Nov 2024 14:54:14 +0530 Subject: [PATCH] fix: Support `NO_PROXY` for RTS-Temporal connection (#37284) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Temporal connection SDK used in RTS, uses GRPC to talk to the Temporal server. The GRPC library being used only respects the lowercase proxy env variables (`http_proxy`, `https_proxy` and `no_proxy`), and not the uppercase ones. They have an [open issue asking for this since 2020](https://github.com/grpc/grpc-node/issues/1292). However, in our `entrypoint.sh`, we normalize `http_proxy` and `HTTP_PROXY`, similarly for `https_proxy` and `HTTPS_PROXY`. But we're not doing this normalization for `no_proxy` and `NO_PROXY`. This PR fixes this by doing the same normalization to `no_proxy`. /test sanity ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 310fa2c85ac45b4f9a9bc5ce63b1c54839192306 > Cypress dashboard. > Tags: `@tag.Sanity` > Spec: >
Fri, 08 Nov 2024 07:00:17 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **New Features** - Improved handling of proxy environment variables for enhanced configuration consistency. - **Bug Fixes** - Ensured `localhost` and `127.0.0.1` are always included in the `NO_PROXY` variable for better connectivity. --- deploy/docker/fs/opt/appsmith/entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deploy/docker/fs/opt/appsmith/entrypoint.sh b/deploy/docker/fs/opt/appsmith/entrypoint.sh index a89f36ba5c..ce39e43598 100644 --- a/deploy/docker/fs/opt/appsmith/entrypoint.sh +++ b/deploy/docker/fs/opt/appsmith/entrypoint.sh @@ -25,6 +25,13 @@ setup_proxy_variables() { export NO_PROXY="127.0.0.1,$NO_PROXY" fi + # If one of NO_PROXY or no_proxy are set, copy it to the other. If both are set, prefer NO_PROXY. + if [[ -n ${NO_PROXY-} ]]; then + export no_proxy="$NO_PROXY" + elif [[ -n ${no_proxy-} ]]; then + export NO_PROXY="$no_proxy" + fi + # If one of HTTPS_PROXY or https_proxy are set, copy it to the other. If both are set, prefer HTTPS_PROXY. if [[ -n ${HTTPS_PROXY-} ]]; then export https_proxy="$HTTPS_PROXY"