Skip to content

Conversation

@patrickbrophy
Copy link
Contributor

Fixes #2827. When running pelican object stat --checksums sha, the client would display what checksum the server returned without any indication that the requested checksum type wasn't provided. Now we track the requested checksums and track that they are satisfied. We now log a warning when the requested checksum types are not returned by the server.

@patrickbrophy patrickbrophy added this to the v7.23 milestone Dec 8, 2025
Copy link
Collaborator

@turetske turetske left a comment

Choose a reason for hiding this comment

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

I have some clarifying questions, just so I understand the fix.

delete(remaining, info.Algorithm)
collected = true
}
if len(remaining) == 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to clarify more my own understanding, since you only delete info.Algorithm from remaining when there is no checksumErr, this is only true if all the checksums have evaluated with no error?

if checksumErr == nil {
checksumErr = errors.New("no checksum data returned by server")
}
err = errors.Wrap(checksumErr, "failed to fetch checksums")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this mean if the server doesn't have checksumming, this will throw an error? Or is there a check higher up in the algorithm I can't see due to the nature of the PR

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.

pelican stat obj --checksums sha returns MD5

2 participants