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

fix(connector): better locating and error reporting for connector library #15342

Merged
merged 4 commits into from
Feb 29, 2024

Merge branch 'main' into bz/better-locate-java-lib

96f68d4
Select commit
Loading
Failed to load commit list.
Merged

fix(connector): better locating and error reporting for connector library #15342

Merge branch 'main' into bz/better-locate-java-lib
96f68d4
Select commit
Loading
Failed to load commit list.
Task list completed / task-list-completed Started 2024-02-29 07:43:12 ago

3 / 4 tasks completed

1 task still to be completed

Details

Required Tasks

Task Status
Canonicalize the path of current_exe before looking for the sibling libs directory. So it's based on the real path of the binary (like /opt/homebrew/Cellar/risingwave/1.6/bin/risingwave), instead of the symbolic link (/opt/homebrew/bin/risingwave). opt/homebrew/bin/libs will make no sense. Incomplete
Use fs_err as the replacement of std::fs to provide better error reporting. Incomplete
Use LazyLock::get_or_try_init instead of storing the Err variant into the static variable once the initialization fails. The main motivation is to resolve the error source issue, but the advised behavior appears to make more sense to me as well.
// Note: anyhow!(e) doesn't preserve source
// https://github.com/dtolnay/anyhow/issues/341
Err(anyhow!(e.to_report_string()).context("jvm not initialized properly"))
Incomplete
I have written necessary rustdoc comments Completed
I have added necessary unit tests and integration tests Completed
All checks passed in ./risedev check (or alias, ./risedev c) Completed
My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users) Incomplete