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

Update CRT HeadersError enum to include header name #1205

Merged

Conversation

dannycjones
Copy link
Contributor

@dannycjones dannycjones commented Dec 20, 2024

We recently saw an error in #1199 where "Header not found" was emitted, but its really unclear what header was missing.

2024-12-12T18:33:59.379478Z  WARN flush{req=1609 ino=2 fh=1 pid=29257 name="testfile_100M.bin"}: mountpoint_s3::fuse: flush failed: put failed: put request failed: Client error: Internal S3 client error: Header not found

This change updates the HeadersError::HeaderNotFound enum variant to contain a copy of the header name, such that error messages can emit it for debugging purposes.

It may make more sense to have all the header names we use statically defined somewhere, such that we could include a static reference to the header and avoid allocating for an error message. However, we don't expect there to be any performance regression introduced by this change. This move to static values could be made later.

Does this change impact existing behavior?

Header not found and invalid header value errors will now include the header name when printing the error message.

The enum variants change meaning any code using the enum may be impacted.

Does this change need a changelog entry?

Not for Mountpoint itself. I have added a change log entry to mountpoint-s3-crt since it is a breaking API change.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

@dannycjones dannycjones added the performance PRs to run benchmarks on label Dec 20, 2024
@dannycjones dannycjones requested a review from passaro December 20, 2024 17:37
@dannycjones dannycjones changed the title Update CRT HeadersError::HeaderNotFound to include header name Update CRT HeadersError enum to include header name Jan 6, 2025
passaro
passaro previously approved these changes Jan 6, 2025
Copy link
Contributor

@passaro passaro left a comment

Choose a reason for hiding this comment

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

LGTM!

@dannycjones dannycjones added this pull request to the merge queue Jan 6, 2025
@dannycjones dannycjones removed this pull request from the merge queue due to a manual request Jan 6, 2025
@dannycjones dannycjones temporarily deployed to PR integration tests January 6, 2025 16:25 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 6, 2025 16:25 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 6, 2025 16:25 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 6, 2025 16:25 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 6, 2025 16:25 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 6, 2025 16:25 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests January 6, 2025 16:25 — with GitHub Actions Inactive
@dannycjones dannycjones enabled auto-merge January 6, 2025 16:26
@dannycjones dannycjones requested a review from muddyfish January 7, 2025 11:44
@dannycjones dannycjones added this pull request to the merge queue Jan 7, 2025
Merged via the queue into awslabs:main with commit 91ac294 Jan 7, 2025
23 checks passed
@dannycjones dannycjones deleted the add-header-name-to-header-not-found-crt branch January 7, 2025 11:59
keremnc pushed a commit to keremnc/mountpoint-s3 that referenced this pull request Jan 24, 2025
We recently saw an error in awslabs#1199 where "Header not found" was emitted,
but its really unclear what header was missing.

2024-12-12T18:33:59.379478Z WARN flush{req=1609 ino=2 fh=1 pid=29257
name="testfile_100M.bin"}: mountpoint_s3::fuse: flush failed: put
failed: put request failed: Client error: Internal S3 client error:
Header not found

This change updates the `HeadersError::HeaderNotFound` enum variant to
contain a copy of the header name, such that error messages can emit it
for debugging purposes.

It may make more sense to have all the header names we use statically
defined somewhere, such that we could include a static reference to the
header and avoid allocating for an error message. However, we don't
expect there to be any performance regression introduced by this change.
This move to static values could be made later.

### Does this change impact existing behavior?

Header not found and invalid header value errors will now include the
header name when printing the error message.

The enum variants change meaning any code using the enum may be
impacted.

### Does this change need a changelog entry?

Not for Mountpoint itself. I have added a change log entry to
`mountpoint-s3-crt` since it is a breaking API change.

---

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and I agree to the terms of
the [Developer Certificate of Origin
(DCO)](https://developercertificate.org/).

---------

Signed-off-by: Daniel Carl Jones <[email protected]>
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.

3 participants