-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Refactor initialize_logger_level and unit_tests_version_510 #11879
base: main
Are you sure you want to change the base?
Conversation
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
@rajv79 can you run clang-format to fix formatting issues? |
|
I applied Clang-Format to fix formatting issues for both changes |
Fixed
…On Thu, Jan 16, 2025, 7:04 PM Jingyu Zhou ***@***.***> wrote:
@rajv79 <https://github.com/rajv79> can you run clang-format to fix
formatting issues?
—
Reply to this email directly, view it on GitHub
<#11879 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASRDHPG7FOCOGDX4AP3ORMT2LBCIXAVCNFSM6AAAAABVBJWHZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJXGE2TINZZGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
@jzhou77 I did the fixes so now it can be merage to the main ? |
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Failed here: Retrying |
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
What should I change sir more for this. As last time I just got an
feedback to change and make into clang format.
…On Tue, Jan 21, 2025, 12:57 PM FoundationDB CI ***@***.***> wrote:
Result of foundationdb-pr-clang-arm on Linux CentOS 7
- Commit ID: c6b8c5f
<c6b8c5f>
- Duration 0:43:34
- Result: ❌ *FAILED*
- Error: Error while executing command: ninja -v -C build_output -j
${NPROC} all packages strip_targets. Reason: exit status 1
- Build Log
<https://d1e0l78xbkh3xa.cloudfront.net/foundationdb/foundationdb-pr-clang-arm/aa456fd8-c8a0-4248-91ca-d2ee7234e402.gz>
terminal output (available for 30 days)
- Build Workspace
<https://d1e0l78xbkh3xa.cloudfront.net/foundationdb-pr-clang-arm/aa456fd8-c8a0-4248-91ca-d2ee7234e402/workspace.zip>
zip file of the working directory (available for 30 days)
—
Reply to this email directly, view it on GitHub
<#11879 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASRDHPDQODRZARF4KCAQXXD2L2DALAVCNFSM6AAAAABVBJWHZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBVGM4TQMBQGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@saintstack @jzhou77 any updates on the commit |
Problem
The initialize_logger_level function was implemented using repetitive if-elif blocks, reducing readability and maintainability.
The unit tests for FoundationDB API version 510 lacked coverage for core functionality, including key-value operations, range reads, and transaction handling.
Solution
Refactor initialize_logger_level:
Replaced the repetitive if-elif blocks with a dictionary mapping of logging levels to their corresponding constants.
Improved readability and maintainability while ensuring the function’s correctness.
Added validation to handle invalid logging levels using a ValueError.
Enhanced Unit Tests for Version 510:
Test Set and Get Key-Value:
A unit test was added to verify the ability to set and retrieve key-value pairs using transactions. Ensures correctness by:
Writing a key-value pair to the database.
Committing the transaction.
Reading the value back in a new transaction and comparing it to the expected result.