test: add simulation for Konflux-like behaviour#165
test: add simulation for Konflux-like behaviour#165tarilabs merged 2 commits intocontainers:mainfrom
Conversation
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>
jonburdo
left a comment
There was a problem hiding this comment.
Nice! I like these files under docs/ to track developments :)
|
|
||
| @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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Yesh, makes sense! Thanks for pointing me to to that and the additional details
There was a problem hiding this comment.
i'll consider this resolved and merge this PR 👍
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