Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k6 archive does not produce reproducible archives #3668

Open
eloo-abi opened this issue Mar 28, 2024 · 0 comments
Open

k6 archive does not produce reproducible archives #3668

eloo-abi opened this issue Mar 28, 2024 · 0 comments
Assignees

Comments

@eloo-abi
Copy link

Brief summary

Hi,

i'm right now working on a gitops workflow for setting up regular load/performance tests using k6 together with the k6-operator and have stumbled over that k6-archives are hard to compare.

My idea is to check if an archive has changed after building it to check if a change on kubernetes side is necessary or not.
So i was trying to sha the archives and compare that checksum.

But sadly the archives are diffing the whole time without any code changes.

Looking at the code of archive i'm expecting that its related to the modtime set here:
https://github.com/grafana/k6/blob/master/lib/archive.go#L248C1-L249C1

its now and thus changes the whole time.

maybe this could be set to a fixed value? or at least could this be configurable so reproducible builds are possible?

k6 version

0.50.0

OS

macos

Docker version and image (if applicable)

No response

Steps to reproduce the problem

k6 archive -o test.tar test.js
k6 archive -o test2.tar test.js

sha256sum test.tar test2.tar

Expected behaviour

i would expect:

  • archives are only diffing if the content has changed
  • archives are reproducible

Actual behaviour

sha differs

@eloo-abi eloo-abi added the bug label Mar 28, 2024
@eloo-abi eloo-abi changed the title k6 archive produces reproducible archives k6 archive does not produce reproducible archives Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants