From 9da6671aa7192438adc284de7cbea9273d0229ef Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 16 Mar 2022 10:13:48 -0700 Subject: [PATCH 1/3] Add `SSL_CERT_DIR` and `SSL_CERT_FILE` to the default for `[subprocess-environment].env_vars` --- .github/workflows/test.yaml | 1 - build-support/bin/generate_github_workflows.py | 5 +---- src/python/pants/core/util_rules/subprocess_environment.py | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 81d7c0c2f7f..5b8cec0f8d2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -282,7 +282,6 @@ jobs: build_wheels_linux: container: quay.io/pypa/manylinux2014_x86_64:latest env: - PANTS_CA_CERTS_PATH: /opt/_internal/certs.pem PANTS_REMOTE_CACHE_READ: 'false' PANTS_REMOTE_CACHE_WRITE: 'false' if: ${{ github.repository_owner == 'pantsbuild' }} diff --git a/build-support/bin/generate_github_workflows.py b/build-support/bin/generate_github_workflows.py index 3ae20ac71b2..dd6bd8e0186 100644 --- a/build-support/bin/generate_github_workflows.py +++ b/build-support/bin/generate_github_workflows.py @@ -487,10 +487,7 @@ def build_steps(*, is_macos: bool) -> list[Step]: "runs-on": LINUX_VERSION, "container": "quay.io/pypa/manylinux2014_x86_64:latest", "timeout-minutes": 65, - "env": { - **DISABLE_REMOTE_CACHE_ENV, - "PANTS_CA_CERTS_PATH": "/opt/_internal/certs.pem", - }, + "env": DISABLE_REMOTE_CACHE_ENV, "if": IS_PANTS_OWNER, "steps": [ *checkout(), diff --git a/src/python/pants/core/util_rules/subprocess_environment.py b/src/python/pants/core/util_rules/subprocess_environment.py index 08b2dbd2c60..96ac202508c 100644 --- a/src/python/pants/core/util_rules/subprocess_environment.py +++ b/src/python/pants/core/util_rules/subprocess_environment.py @@ -20,9 +20,9 @@ class SubprocessEnvironment(Subsystem): _env_vars = StrListOption( "--env-vars", - default=["LANG", "LC_CTYPE", "LC_ALL"], + default=["LANG", "LC_CTYPE", "LC_ALL", "SSL_CERT_FILE", "SSL_CERT_DIR"], help=( - "Environment variables to set for process invocations. " + "Environment variables to set for process invocations.\n\n" "Entries are either strings in the form `ENV_VAR=value` to set an explicit value; " "or just `ENV_VAR` to copy the value from Pants's own environment." ), From 565370084bce89b4477acb61e124dda6fb354623 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 16 Mar 2022 10:50:55 -0700 Subject: [PATCH 2/3] Review feedback # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels] --- src/python/pants/core/util_rules/subprocess_environment.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/python/pants/core/util_rules/subprocess_environment.py b/src/python/pants/core/util_rules/subprocess_environment.py index 96ac202508c..4fe9d58bf47 100644 --- a/src/python/pants/core/util_rules/subprocess_environment.py +++ b/src/python/pants/core/util_rules/subprocess_environment.py @@ -8,6 +8,7 @@ from pants.engine.rules import Get, collect_rules, rule from pants.option.option_types import StrListOption from pants.option.subsystem import Subsystem +from pants.util.docutil import doc_url from pants.util.frozendict import FrozenDict @@ -24,7 +25,9 @@ class SubprocessEnvironment(Subsystem): help=( "Environment variables to set for process invocations.\n\n" "Entries are either strings in the form `ENV_VAR=value` to set an explicit value; " - "or just `ENV_VAR` to copy the value from Pants's own environment." + "or just `ENV_VAR` to copy the value from Pants's own environment.\n\n" + f"See {doc_url('options#addremove-semantics')} for how to add and remove Pants's " + "default for this option." ), advanced=True, ) From 96e98a072067c2604b59c65e252e68f4877df315 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 16 Mar 2022 12:43:19 -0700 Subject: [PATCH 3/3] Force CI run