[pkgsite] internal/frontend: fall back to process env when go env fails

2 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
May 14, 2026, 10:28:37 AM (2 days ago) May 14
to Ethan Lee, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Hyang-Ah Hana Kim, golang...@luci-project-accounts.iam.gserviceaccount.com, kokoro, Jonathan Amsterdam, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
internal/frontend: fall back to process env when go env fails

When pkgsite is deployed to prod containers (using debian:stable-slim
for example), the Go CLI binary is not installed. Previously
loadGoPrivatePatterns failed when executing `go env`, setting cfg.ok =
false and short-circuiting all external link lookups (deps.dev and
codewiki.google) for all public modules.

Ultimately this altered page load timing on staging, causing screentests
to fail. This change restores proper external link lookups in prod and
staging.
Change-Id: I6cebca582b556c9a2227bd9f6c0f0a20afa6d8ac
Auto-Submit: Ethan Lee <etha...@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
kokoro-CI: kokoro <noreply...@google.com>
Files:
  • M internal/frontend/links.go
  • M internal/frontend/links_test.go
Change size: S
Delta: 2 files changed, 14 insertions(+), 35 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: pkgsite
Gerrit-Branch: master
Gerrit-Change-Id: I6cebca582b556c9a2227bd9f6c0f0a20afa6d8ac
Gerrit-Change-Number: 777840
Gerrit-PatchSet: 3
Gerrit-Owner: Ethan Lee <etha...@google.com>
Gerrit-Reviewer: Ethan Lee <etha...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Jonathan Amsterdam <j...@google.com>
Gerrit-Reviewer: kokoro <noreply...@google.com>
Gerrit-CC: kokoro <noreply...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages