Skip to content

chore: only rebuild golden image on changes#556

Merged
dd23 merged 10 commits intomainfrom
dd/chore/golden_image_cache
May 4, 2026
Merged

chore: only rebuild golden image on changes#556
dd23 merged 10 commits intomainfrom
dd/chore/golden_image_cache

Conversation

@dd23
Copy link
Copy Markdown
Member

@dd23 dd23 commented Apr 29, 2026

Description of changes

Previously we always built the golden image, when a docker build flow ran. This lead to more than 16.000 images built and stored: https://github.com/zama-ai/kms/pkgs/container/kms%2Frust-golden-image

Now, we check if something has actually changed, and only build the image in that case.

Issue ticket number and link

Observed CI flows

PR Checklist

I attest that all checked items are satisfied. Any deviation is clearly justified above.

  • Title follows conventional commits (e.g. chore: ...).
  • Tests added for every new pub item and test coverage has not decreased.
  • Public APIs and non-obvious logic documented; unfinished work marked as TODO(#issue).
  • unwrap/expect/panic only in tests or for invariant bugs (documented if present).
  • No dependency version changes OR (if changed) only minimal required fixes.
  • No architectural protocol changes OR linked spec PR/issue provided.
  • No breaking deployment config changes OR devops label + infra notified + infra-team reviewer assigned.
  • No breaking gRPC / serialized data changes OR commit marked with ! and affected teams notified.
  • No modifications to existing versionized structs OR backward compatibility tests updated.
  • No critical business logic / crypto changes OR ≥2 reviewers assigned.
  • No new sensitive data fields added OR Zeroize + ZeroizeOnDrop implemented.
  • No new public storage data OR data is verifiable (signature / digest).
  • No unsafe; if unavoidable: minimal, justified, documented, and test/fuzz covered.
  • Strongly typed boundaries: typed inputs validated at the edge; no untyped values or errors cross modules.
  • Self-review completed.

@dd23 dd23 requested a review from a team as a code owner April 29, 2026 16:28
@cla-bot cla-bot Bot added the cla-signed The CLA has been signed. label Apr 29, 2026
Comment thread .github/workflows/docker-build.yml Fixed
Comment thread .github/workflows/docker-build.yml Fixed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

Consolidated Tests Results 2026-05-04 - 14:47:51

Test Results

passed 12 passed

Details

tests 12 tests
clock not captured
tool junit-to-ctrf
build build-and-test arrow-right test-reporter link #1872
pull-request chore: only rebuild golden image on changes link #556

test-reporter: Run #1872

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
12 12 0 0 0 0 0 not captured

🎉 All tests passed!

Tests

View All Tests
Test Name Status Flaky Duration
k8s_test_crs_uniqueness 34.2s
k8s_test_insecure_keygen_encrypt_and_public_decrypt 2m 18s
k8s_test_insecure_keygen_encrypt_multiple_types 2m 33s
k8s_test_keygen_and_crs 2m 13s
k8s_test_keygen_uniqueness 5m 48s
k8s_test_crs_uniqueness 32.4s
k8s_test_insecure_keygen_encrypt_and_public_decrypt 2m 6s
k8s_test_insecure_keygen_encrypt_multiple_types 2m 19s
k8s_test_keygen_and_crs 2m 2s
k8s_test_keygen_uniqueness 5m 19s
k8s_test_centralized_insecure 54.9s
nightly_full_gen_tests_default_k8s_centralized_sequential_crs 1.8s

🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@dd23 dd23 requested a review from a team as a code owner April 29, 2026 18:15
Copy link
Copy Markdown
Contributor

@eudelins-zama eudelins-zama left a comment

Choose a reason for hiding this comment

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

What we do in fhevm, is only building the golden image manually via a worfklow when needed (instead of "automatic" build as in kms).

I wonder if it makes sense to do the same here.

Tbh, it feels very hard to review (as a human), and not worth the extra complexity.

Wdyt?

@dd23
Copy link
Copy Markdown
Member Author

dd23 commented Apr 30, 2026

What we do in fhevm, is only building the golden image manually via a worfklow when needed (instead of "automatic" build as in kms).

I wonder if it makes sense to do the same here.

Tbh, it feels very hard to review (as a human), and not worth the extra complexity.

Wdyt?

Not a fan of doing this manually, tbh. The chainguard image changes in irregular intervals (unlike the pretty regular rust updates) and it seems a bit annoying to be required to check this every now and then. Maybe it's not the most critical to keep it super up-to-date, but these manual things are often forgotten until something breaks.

Yes, this seems a bit complex, because it tries to capture going back and forth between old and new versions (which we just did on main), but I'd say we spend a bit of time on a proper review now and then have a solid solution that hopefully just works in the future, without requiring much attention.

Comment thread .github/workflows/docker-build.yml Outdated
eudelins-zama
eudelins-zama previously approved these changes Apr 30, 2026
Copy link
Copy Markdown
Contributor

@eudelins-zama eudelins-zama left a comment

Choose a reason for hiding this comment

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

LGTM 🙂

eudelins-zama
eudelins-zama previously approved these changes Apr 30, 2026
dvdplm
dvdplm previously approved these changes May 4, 2026
Copy link
Copy Markdown
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

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

lgtm. Left some questions for my own education.

Comment thread .github/workflows/docker-build.yml
Comment thread .github/workflows/docker-build.yml
Comment thread .github/workflows/docker-build.yml
Comment thread .github/workflows/docker-build.yml Outdated
@dd23 dd23 dismissed stale reviews from dvdplm and eudelins-zama via ee39763 May 4, 2026 13:49
@dd23 dd23 merged commit b067f5f into main May 4, 2026
75 checks passed
@dd23 dd23 deleted the dd/chore/golden_image_cache branch May 4, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The CLA has been signed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants