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 context to fs_napi errors #8149

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

tangledbytes
Copy link
Member

Explain the changes

This PR attempts to add context to the errors coming from fs_napi. The context field is then used in the S3 error reporting if it's available. The PR also reduces the log level for OnError method.

This sometimes means duplicate logging, however it was still kept this way as not all the errors coming from the fs_napi necessarily fails an S3 operation. It could be helpful to see all the errors that we encountered and the error that resulted in the operation failure.

Another approach that was tested but I decided against it was to add the context info in the error message itself. It removes the construct of context but that also means that the error message will be more verbose and hard/fragile === tests against them.

Example of current fix:
image

Issues: Fixed #xxx / Gap #xxx

Fixes #8065

  • Doc added/updated
  • Tests added

src/native/util/common.h Outdated Show resolved Hide resolved
src/native/fs/fs_napi.cpp Outdated Show resolved Hide resolved
@tangledbytes tangledbytes force-pushed the utkarsh/fix/8065 branch 2 times, most recently from edbc059 to a25982d Compare July 4, 2024 11:22
@tangledbytes tangledbytes requested a review from guymguym July 5, 2024 12:19
Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>
@tangledbytes tangledbytes merged commit e1c6fed into noobaa:master Jul 8, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NSFS on syscall error should log the operation info and not just the error code (even if debug level is low)
2 participants