Skip to content

change(scripts): verify copied file checksums and skip plots - #577

Open
zubeydecivelek wants to merge 1 commit into
CERNDocumentServer:masterfrom
zubeydecivelek:copy-script
Open

change(scripts): verify copied file checksums and skip plots#577
zubeydecivelek wants to merge 1 commit into
CERNDocumentServer:masterfrom
zubeydecivelek:copy-script

Conversation

@zubeydecivelek

@zubeydecivelek zubeydecivelek commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

During faser migration I had file checksum mismatch errors, it would be better to verify during copy script and log in case something goes wrong. And if we're skipping plots during migration, no need to copy the plot files.

Comment on lines +59 to +65
prefix = "ERROR" if dest_md5 != expected else "SUCCESS"
if prefix == "ERROR":
print(
"ERROR checksum mismatch: recid={} expected={} dest={}".format(
recid, expected, dest_md5
)
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
prefix = "ERROR" if dest_md5 != expected else "SUCCESS"
if prefix == "ERROR":
print(
"ERROR checksum mismatch: recid={} expected={} dest={}".format(
recid, expected, dest_md5
)
)
checksum_mismatch = dest_md5 != expected
if checksum_mismatch:
raise <appropriate error class>(
"ERROR checksum mismatch: recid={} expected={} dest={}".format(
recid, expected, dest_md5
)
)

I think it should fail if there is something wrong in the file, otherwise it fails silently and puts it in the log. What if I don't check the log?

@kpsherva kpsherva moved this from In review 🔍 to In progress in Sprint Q3 2026 ☀️ Aug 18, 2026
@kpsherva

Copy link
Copy Markdown
Contributor

did you come across the checksum mismatch when copying the files or when running the migration?

@zubeydecivelek

Copy link
Copy Markdown
Contributor Author

did you come across the checksum mismatch when copying the files or when running the migration?

@kpsherva there’s no checksum verification mechanism when copying the files. I had the checksum mismatch during the migration. I copied the files again, and everything worked fine.

I think we should verify the checksums when copying the files to prevent errors during migration.

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