Skip to content

golden tests#486

Open
mzihlmann wants to merge 19 commits intomainfrom
golden-tests
Open

golden tests#486
mzihlmann wants to merge 19 commits intomainfrom
golden-tests

Conversation

@mzihlmann
Copy link
Collaborator

@mzihlmann mzihlmann commented Feb 2, 2026

Description

adding a new kind of integration tests "golden tests"
The new features that come up are often concerned with performance improvements. These improvements are taken by not following the Dockerfile to the letter, but reorder and skip instructions where possible. It is both difficult to mentally model what exactly happens with an optimization and difficult to write tests that verify an optimization is indeed taken. Golden tests come to the rescue, basically kaniko learned a new --dryrun flag, which lets it print a plan instead of running commands. The plan shows what kaniko would be doing, this is after all optimizations were applied, in a sort of "intermediate representation". We can now simply compare the plan kaniko generates to a "golden plan" from a previous run and if there is a diff we most likely have a bug.

This will bring in a new dependency yaml. maybe we should separate productive and testing 3rparty?

@mzihlmann mzihlmann force-pushed the golden-tests branch 4 times, most recently from 8875098 to d2fddd1 Compare February 2, 2026 18:29
@mzihlmann mzihlmann marked this pull request as ready for review February 2, 2026 18:30
@mzihlmann mzihlmann requested review from 0hlov3, BobDu, babs and nejch February 2, 2026 18:30
@mzihlmann mzihlmann force-pushed the golden-tests branch 2 times, most recently from 27f740f to e3d8a17 Compare February 2, 2026 22:26
@mzihlmann mzihlmann force-pushed the golden-tests branch 4 times, most recently from 09d4103 to c59d8ff Compare February 5, 2026 20:44
@mzihlmann
Copy link
Collaborator Author

we could consider switching to toml, that would drop ~10k lines of dependencies as yaml is heavy

@mzihlmann
Copy link
Collaborator Author

refactored it to no longer use yaml files, but instead go files directly. This is not only simpler in terms of dependencies but allows us to update plans automatically too. so a win win.

@mzihlmann
Copy link
Collaborator Author

now that the dockerfile is separate to the test definitions, we could even consider referencing dockerfiles from integrationtests, this way we would always ensure that both plan is correct and we can indeed build the dockerfile too.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant