GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Build the Go feature server image in two stages by NopeCharon · Pull Request #7066 · feast-dev/feast

Conversation

@NopeCharon

@NopeCharon NopeCharon commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

The go-feature-server image is built and published straight from the full golang:1.26 image. Every tag therefore ships the Go toolchain, gcc, protoc, the module and build caches, and Debian development packages such as linux-libc-dev. Scanners flag that package for DSA-6238-1, DSA-6253-1, DSA-6274-1 and DSA-6295-1. Users can't remediate it because it comes from the base layer.

This PR turns the Dockerfile into a two-stage build:

  • Builder stage: the existing steps (protoc install, proto generation, go build), unchanged. The base is pinned to golang:1.26-trixie, which is what golang:1.26 resolves to today.
  • Runtime stage: debian:trixie-slim with ca-certificates, plus the compiled feast binary. The binary is cgo-linked (go-sqlite3), so the runtime uses the same Debian release as the builder to get a matching glibc.

These stay the same: the working directory /app, the binary path ./feast, the exposed port and the default command. Existing deployments that mount the feature repo under /app or pass --chdir keep working.

Result (linux/arm64 build):

before (single stage) after
image size ~3.1 GB ~214 MB
linux-libc-dev 6.12.113-1 not installed
Go toolchain / gcc / protoc present absent

ldd ./feast in the runtime image shows only libc.so.6 and the dynamic loader.

Which issue(s) this PR fixes:

Fixes #7060

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Manual tests:

  • Built the image with docker buildx build -f go/infra/docker/feature-server/Dockerfile --load ..
  • Inside the image, checked ldd ./feast, dpkg -s linux-libc-dev (not installed), and that /usr/local/go, gcc and protoc are absent.
  • Ran ./feast --type=http --chdir=<mounted repo> against a repo with a local registry and a SQLite online store:
    • the HTTP and metrics servers start
    • /health returns Healthy
    • /get-online-features reaches the registry lookup and returns the expected "feature view doesn't exist" error for the empty registry

Misc

No Go code changes. make build-go-feature-server-docker and the publish workflow use the same Dockerfile path and arguments, so nothing changes in CI.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@NopeCharon
fix: Build the Go feature server image in two stages
88e31b7
The go-feature-server image was built and shipped from the full
golang:1.26 image, so every published tag carried the Go toolchain,
gcc, protoc, the module and build caches, and Debian development
packages such as linux-libc-dev. Those packages are flagged by
container scanners (for example DSA-6238-1, DSA-6253-1, DSA-6274-1 and
DSA-6295-1 against linux-libc-dev), and users cannot remediate them
because they come from the base layer.

Keep the existing build steps in a builder stage and copy only the
compiled binary into a debian:trixie-slim runtime stage with
ca-certificates. The builder is pinned to golang:1.26-trixie, which is
what golang:1.26 resolves to today, so the cgo-linked binary (needed by
go-sqlite3) runs against the same glibc release. The working directory,
binary path, exposed port and default command are unchanged, so
existing deployments that mount a feature repo under /app or pass
--chdir keep working.

The runtime image no longer contains linux-libc-dev, the Go toolchain
or compilers, and drops from about 3.1 GB to about 214 MB.

Fixes feast-dev#7060

Signed-off-by: NopeCharon <[email protected]>
@NopeCharon
NopeCharon requested a review from a team as a code owner October 23, 2026 16:45
shuchu
shuchu approved these changes Oct 24, 2026
View reviewed changes

@shuchu shuchu left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@codecov-commenter

codecov-commenter commented Oct 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.97%. Comparing base (e304a84) to head (88e31b7).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7066      +/-   ##
==========================================
- Coverage   50.99%   50.97%   -0.02%     
==========================================
  Files         455      455              
  Lines       56994    56994              
  Branches     8321     8321              
==========================================
- Hits        29063    29055       -8     
- Misses      25946    25954       +8     
  Partials     1985     1985              
Flag Coverage Δ
go-feature-server 30.37% <ø> (-0.21%) ⬇️
python-unit 52.45% <ø> (ø)
see 1 file with indirect coverage changes

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e304a84...88e31b7. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shuchu
shuchu merged commit 1e5e90c into feast-dev:master Oct 25, 2026
28 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@shuchu shuchu shuchu approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

go-feature-server image ships outdated linux-libc-dev with known kernel CVEs (DSA-6238-1/6253-1/6274-1/6295-1)

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@NopeCharon @codecov-commenter @shuchu
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.