-
Notifications
You must be signed in to change notification settings - Fork 487
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
Fingerprint validation fails when artifacts have different filenames but same contents/hash #709
Comments
A key question is what purpose the filename check that leads to this error in the "validate_for_build" method in fingerprint.py actually serves?
What can actually lead to this error being emitted correctly, other than internal errors in Jenkins? |
The same problem, and still not work for save
|
What is the use case in your code? Fingerprints are found by MD5 and first file that has this fingerprint will be referred via "fileName" attribute and this is current check. At the same time, the list of all files with the same fingerprint is returned. This is not currently checked. Do you want check to be made that your file is in that list? |
I want it to work :) The only thing I have that is at all unusual is that several files have different names but the same MD5. This leads to the error above if I enable fingerprints and try to save artifacts via jenkinsapi. I don't really see the point of the check, so I would be happy for it to be removed, but keeping track of all the files with a certain MD5 and checking that the file is in the list would also work I guess. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@gjb1002 I too have experienced this issue where I have one original file and another with a timestamp appended too it. I don't see the importance of checking the file name during the verification process in fingerprint, but if it is to remain I think checking all file names that have a matching MD5 and return true on a single match instance would be a reasonable fix. Edit software versions python: 2.7.16 |
ISSUE TYPE
Jenkinsapi 0.3.9
Jenkins 2.150.2
SUMMARY
If I do "Replay" from a pipeline build it confuses the fingerprint handling code, frequently leading to errors when the fingerprints are perfectly correct. This seems to be because the new artifact has the same content and hence md5sum but a different file name (our artifact has a timestamp in its name), leading to the "original" structure having the wrong data.
EXPECTED RESULTS
Fingerprints should match correctly.
ACTUAL RESULTS
jenkinsapi.custom_exceptions.ArtifactBroken: Artifact c95cdb45923926b28833833b770770e1 seems to be broken, check <jenkins url>
In log
Filename from jenkins (<artifact name from original build>) did not match provided (<artifact name from replayed build>)
The text was updated successfully, but these errors were encountered: