Skip to content

Conversation

lidel
Copy link
Member

@lidel lidel commented Aug 13, 2025

Docker started failing in master and PRs – see #10905 (comment)

Looked into this and I am more confused than I was before. GOFLAGS=-buildvcs=false IS in the Dockerfile. The problem is that the Makefile's $(shell ...) commands don't inherit this environment variable.

This isn't a regression from a Go 1.25 update, image/ci uses 1.24. I suspect the issue has likely always existed but may have been masked or only recently become apparent due to (guessing):

  1. Changes in how Docker caches layers
  2. Changes in GitHub Actions environment
  3. The specific conditions in the PR build environment

The root cause is that $(shell ...) in Make creates a new shell that doesn't inherit the parent's environment variables unless explicitly passed. My fix addresses this by hardcoding -buildvcs=false for the go list commands that are used to determine package names.

While at it, updated ENV to use modern notation.

cc @ipfs/kubo-maintainers for visibility.

lidel added 2 commits August 14, 2025 01:21
Docker builds were failing because go list commands in mk/golang.mk
didn't inherit GOFLAGS from the environment, causing empty package
names when .git directory was incomplete.

This issue always existed but was masked until recent changes in
GitHub Actions runners or Docker golang image exposed it.
Fixes Docker build deprecation warnings.
@lidel lidel requested a review from a team as a code owner August 13, 2025 23:33
@lidel lidel added the skip/changelog This change does NOT require a changelog entry label Aug 13, 2025
@lidel lidel changed the title Fix docker build fix(ci): docker build Aug 13, 2025
@lidel
Copy link
Member Author

lidel commented Aug 13, 2025

Green, merging so we can rebase PRs and fix CI.

@lidel lidel merged commit 8e5ef55 into master Aug 13, 2025
15 checks passed
@lidel lidel deleted the fix-docker-build branch August 13, 2025 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does NOT require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant