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

include object name & version in log for r2 hash length mismatch #2250

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

Frederik-Baetens
Copy link
Contributor

No description provided.

@@ -116,39 +116,44 @@ static jsg::Ref<T> parseObjectMetadata(R2HeadResponse::Reader responseReader,
auto md5 = checksumsBuilder.getMd5();
if (md5.size() != 16) {
KJ_LOG(WARNING, "NOSENTRY MD5 checksum is not 16 bytes long",
md5.size(), md5.asBytes());
md5.size(), md5.asBytes(),
responseReader.getName(), responseReader.getVersion());
Copy link
Member

Choose a reason for hiding this comment

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

I guess if we're expanding the logging here moving it out to a separate utility method here to eliminate the duplication would be useful but I'm hoping this logging can be temporary so likely not worth changing further now :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha, that's how a lot of code like this has stuck around in the past 😅 . Pushed a commit wrapping this in a little utility function.

@Frederik-Baetens Frederik-Baetens merged commit fd604e4 into main Jun 10, 2024
9 of 10 checks passed
@Frederik-Baetens
Copy link
Contributor Author

Merged, but let me know if you have any comments around the utility function I added.

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.

None yet

2 participants