Closed sweep-ai[bot] closed 1 day ago
Traceback (most recent call last):
File "/app/sweepai/handlers/fix_ci.py", line 286, in fix_ci_failures_once
logs_list = get_ci_failure_logs(error_runs, pull_request)
File "/app/sweepai/handlers/fix_ci.py", line 182, in get_ci_failure_logs
raw_logs = unzip_and_extract_logs(raw_binary_logs)
File "/app/sweepai/handlers/fix_ci.py", line 137, in unzip_and_extract_logs
zip_file = zipfile.ZipFile(io.BytesIO(blob))
File "/usr/local/lib/python3.10/zipfile.py", line 1272, in __init__
self._RealGetContents()
File "/usr/local/lib/python3.10/zipfile.py", line 1339, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
File is not a zip file
Sweep has encountered a runtime error unrelated to your request. Please let us know via this link or at support@sweep.dev directly.
:book: For more information on how to use Sweep, please read our documentation.
Purpose
Improve the robustness of image hashing in
hash.go
by implementing modern perceptual hashing algorithms, such as pHash, in addition to the existing MD5 file hashing.Description
The changes in this pull request include:
hash.go
to include perceptual hashing:ImageInfo
struct to include a field for perceptual hashcomputeHashes
function to calculate both file hash and perceptual hashIconCreator
interface and its implementation to include perceptual hashingDefaultIconCreator
struct to implement the new perceptual hashing methodsimilarity.go
file to utilize the new perceptual hash for image comparisonreport.go
file to include perceptual hash information in the HTML reportSummary
The key changes in this pull request are:
hash.go
to include perceptual hashingIconCreator
interface andDefaultIconCreator
implementationsimilarity.go
to use perceptual hash for image comparisonreport.go
to include perceptual hash information in the HTML reporthash_test.go
Fixes
21. Continue the conversation here: https://app.sweep.dev/c/d00297a0-36f7-425f-88bf-c4d027e63010.
To have Sweep make further changes, please add a comment to this PR starting with "Sweep:".
:book: For more information on how to use Sweep, please read our documentation.