Skip to content

test: add simulation for Konflux-like behaviour#165

Merged
tarilabs merged 2 commits intocontainers:mainfrom
tarilabs:tarilabs-20260313
Mar 18, 2026
Merged

test: add simulation for Konflux-like behaviour#165
tarilabs merged 2 commits intocontainers:mainfrom
tarilabs:tarilabs-20260313

Conversation

@tarilabs
Copy link
Copy Markdown
Member

as Konflux does not use Olot to perform a multi-arch build but instead enact different and separate pipeline runs for each ModelCar arch, this result in non-layer re-use across arch,
because oras pull would generate different mtime for the model weights files. So for Konflux to achieve analogous result,
this demonstrator take the approach of setting the mtime for the model weights file to the OCI Artifact creation time

This is only a demonstrator of behaviour, performed as a test the actual Konflux Task modification proposal is being discussed raised in: konflux-ci/build-definitions#3358

as Konflux does not use Olot to perform a multi-arch build
but instead enact different and separate pipeline runs for each ModelCar arch,
this result in non-layer re-use across arch,
because oras pull would generate different mtime for the model weights files.
So for Konflux to achieve analogous result,
this demonstrator take the approach of setting the mtime for the model weights file
to the OCI Artifact creation time

This is only a demonstrator of behaviour, performed as a test
the actual Konflux Task modification proposal is being discussed raised in:
konflux-ci/build-definitions#3358

Signed-off-by: tarilabs <matteo.mortari@gmail.com>
Signed-off-by: tarilabs <matteo.mortari@gmail.com>
Copy link
Copy Markdown
Collaborator

@jonburdo jonburdo left a comment

Choose a reason for hiding this comment

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

Nice! I like these files under docs/ to track developments :)

Comment thread tests/utils/files_test.py

@pytest.mark.e2e_oras
def test_tarball_from_file_oras_pull_nondeterministic(tmp_path):
"""Demonstrate that tarball_from_file() produces different digests for the same content
Copy link
Copy Markdown
Collaborator

@jonburdo jonburdo Mar 17, 2026

Choose a reason for hiding this comment

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

I see no harm in leaving this a normal e2e test, but if this is just to demonstrate the behavior are we really testing olot here? I'm tempted to suggest (in a follow-up) we actually provide functions in olot that do the logic you have here:
https://github.com/konflux-ci/build-definitions/pull/3358/changes#diff-d35524b48f908752a9349bae77360e401d1e95c02665d477ff85c26984d529e5R150-R161

Maybe it's too oddly specific or not worth - just an idea

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Did not consider adding a feature to Olot to "pin the mtime", since the Konflux workaround at least can fix the mtime of the files to the OCI Artifact created time, which is meaningful; the separate invocations of Olot within Konflux instead has no access/knowledge of the OCI Artifact, which is the actual source for the content/files of the OCI Image KServe ModelCar.

from the readme at : https://github.com/containers/olot/pull/165/changes#diff-190d65edfaa877af2b1a93e49de07411b88a4fd58c4407a0782c5b48eff90f10R58

I wanted to have some demonstrator on our end, in addition to the .md docs and linking to the workaround; I'd say I wanted to test the behaviour of tarball_from_file (and consequently targz_from_file) so more an internal behaviour test

would this answer your very rightful question in detail?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yesh, makes sense! Thanks for pointing me to to that and the additional details

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i'll consider this resolved and merge this PR 👍

@tarilabs tarilabs merged commit d21ebab into containers:main Mar 18, 2026
14 checks passed
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.

2 participants