Skip to content

Commit af07518

Browse files
committed
chore: Fix local scie builds
Both CI and local builds should work!
1 parent 32d8e69 commit af07518

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

changes/.fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Forward `SCIENCE_AUTH_GITHUB_COM_BEARER` (and `SCIENCE_AUTH_API_GITHUB_COM_BEARER`) to Pants subprocesses so local scie builds (e.g. `pants package src/ai/backend/client:backendai-client-fat`) can authenticate the `science` binary against GitHub. Without a token, anonymous GitHub rate limits cause the scie-jump `.sha256` URL to return an HTML error page, surfacing as a checksum failure with `<!DOCTYPE` inside the compared digest.

pants.ci.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@ search_path = ["<PATH>"]
88
[stats]
99
log = true
1010

11-
[subprocess-environment]
12-
env_vars.add = ["SCIENCE_AUTH_API_GITHUB_COM_BEARER"]
13-
1411
[pytest]
1512
args = ["-vv", "--no-header", "--suppress-no-test-exit-code"]

pants.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ root_patterns = [
4242
"/tools/pants-plugins",
4343
]
4444

45+
[subprocess-environment]
46+
# Forward optional GitHub auth tokens used by the `science` binary during scie
47+
# builds. Without these, science calls GitHub anonymously and can hit the per-IP
48+
# rate limit (the response is HTML, which then surfaces as a checksum failure
49+
# with `<!DOCTYPE` in the digest). Set either env var to a GitHub PAT in your
50+
# shell to authenticate scie-jump/ptex/PBS downloads.
51+
env_vars.add = [
52+
"SCIENCE_AUTH_GITHUB_COM_BEARER",
53+
"SCIENCE_AUTH_API_GITHUB_COM_BEARER",
54+
]
55+
4556
[test]
4657
extra_env_vars = ["BACKEND_BUILD_ROOT=%(buildroot)s", "HOME"]
4758
attempts_default = 3

0 commit comments

Comments
 (0)