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

Add errno to fuse_error macro #1189

Merged

Conversation

renanmagagnin
Copy link
Contributor

Added errno to fuse_error macro

Does this change impact existing behavior? No

Does this change need a changelog entry? No


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).

Signed-off-by: Renan Magagnin <[email protected]>
@renanmagagnin renanmagagnin temporarily deployed to PR integration tests December 6, 2024 16:19 — with GitHub Actions Inactive
@renanmagagnin renanmagagnin temporarily deployed to PR integration tests December 6, 2024 16:19 — with GitHub Actions Inactive
@renanmagagnin renanmagagnin temporarily deployed to PR integration tests December 6, 2024 16:19 — with GitHub Actions Inactive
@renanmagagnin renanmagagnin temporarily deployed to PR integration tests December 6, 2024 16:19 — with GitHub Actions Inactive
@renanmagagnin renanmagagnin temporarily deployed to PR integration tests December 6, 2024 16:19 — with GitHub Actions Inactive
@renanmagagnin renanmagagnin temporarily deployed to PR integration tests December 6, 2024 16:19 — with GitHub Actions Inactive
@renanmagagnin renanmagagnin temporarily deployed to PR integration tests December 6, 2024 16:19 — with GitHub Actions Inactive
@renanmagagnin renanmagagnin added this pull request to the merge queue Dec 6, 2024
@@ -810,7 +810,7 @@ fn read_with_no_permissions_for_a_key_sse() {
read_result.expect("should be able to read a default-encrypted file after the first read failure");
}

let log_line_pattern = format!("^.*WARN.*{encrypted_object}.*read failed: get request failed: get object request failed: Client error: Forbidden: User: .* is not authorized to perform: kms:Decrypt on resource: {key_id} because no session policy allows the kms:Decrypt action.*$");
let log_line_pattern = format!("^.*WARN.*{encrypted_object}.*read 5 failed: get request failed: get object request failed: Client error: Forbidden: User: .* is not authorized to perform: kms:Decrypt on resource: {key_id} because no session policy allows the kms:Decrypt action.*$");
Copy link
Contributor

Choose a reason for hiding this comment

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

The error message does not look right. Why are we adding the error number here?

Copy link
Contributor

Choose a reason for hiding this comment

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

We had a chat, we're probably looking for something like "read failed returning errno 5"

Copy link
Contributor

@dannycjones dannycjones Dec 10, 2024

Choose a reason for hiding this comment

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

It may be worth taking a look at this libc(?) function that can return a string form of the error: https://man7.org/linux/man-pages/man3/errno.3.html. Or maybe we just do something Rust-side.

The idea is if we can instead get to something like:

"read failed returning EPERM"

Copy link
Contributor

Choose a reason for hiding this comment

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

Oops, see we're already working in this PR: #1197

Merged via the queue into awslabs:main with commit 936f4c3 Dec 6, 2024
23 checks passed
@renanmagagnin renanmagagnin deleted the feature/include-errno-in-fuse-error branch December 6, 2024 17:00
github-merge-queue bot pushed a commit that referenced this pull request Dec 10, 2024
This change improves the clarity of [fuse_error with
errono](#1189).

### Does this change impact existing behavior? No

### Does this change need a changelog entry? No

---

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: Renan Magagnin <[email protected]>
Co-authored-by: Alessandro Passaro <[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.

4 participants