TraceMachina / nativelink

NativeLink is an open source high-performance build cache and remote execution server, compatible with Bazel, Buck2, Reclient, and other RBE-compatible build systems. It offers drastically faster builds, reduced test flakiness, and specialized hardware.
https://nativelink.com
Apache License 2.0
1.19k stars 117 forks source link

Update coverage for nativelink-config and nativelink-error #1445

Closed leodziki closed 2 weeks ago

leodziki commented 3 weeks ago

Description

Increase coverage percentage to 80-100% for nativelink-config and nativelink-error modules

Fixes #1401

Type of change

Checklist


This change is Reviewable

leodziki commented 2 weeks ago

Thanks for the detailed instructions! I'll follow the instructions on how to test with Bazel and try to fix the formatting issue. Running nix develop seems like a good way to keep your CI and environment in sync. I'll also double check the review status and see if the discussion with @allada is resolved. Thanks for the help! I'll fix the issue as is.

leodziki commented 2 weeks ago

Including the prost and codegen functions was my choice to simplify code generation and message parsing. However, it seems unnecessary here. So I'm going to remove it. It's also important to note that while consistency in string format can improve code readability and maintainability when switching from raw strings (r#"") to regular strings ("") in your code, the choice between raw strings and regular strings is not always a critical factor. Raw strings are typically used when dealing with complex JSON input that contains escape sequences like \n or \". In the absence of these escape sequences, regular strings can represent the data structure more cleanly and concisely. I fixed the code by doing everything correctly. I also added error messages to help identify the cause of the error.