mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 08:09:24 +00:00
### **PR Type** Tests, Enhancement ___ ### **Description** - Enable `ZO_RESULT_CACHE_ENABLED` by default - Add helper functions and tests for `generate_tantivy_index` - Add comprehensive Puffin module unit tests - Update coverage script to install `cargo nextest` ___ ### **Changes diagram** ```mermaid flowchart LR Config["Change default ZO_RESULT_CACHE_ENABLED"] TantivyMod["Add generate_tantivy_index tests"] PuffinMod["Add Puffin module tests"] Coverage["Update coverage.sh script"] Config --> TantivyMod TantivyMod --> PuffinMod PuffinMod --> Coverage ``` ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>config.rs</strong><dd><code>Default result cache enabled</code> </dd></summary> <hr> src/config/src/config.rs - Changed default of `ZO_RESULT_CACHE_ENABLED` from false to true </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7461/files#diff-9aeee4a74c0520daa40f9b81c7016f5b6b3254375b968dd7598e745630980d62">+1/-1</a> </td> </tr> <tr> <td> <details> <summary><strong>coverage.sh</strong><dd><code>Update coverage script</code> </dd></summary> <hr> coverage.sh - Added check/install for `cargo nextest` in coverage task </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7461/files#diff-2033e8e6b7ebfb5c3fe4039f2613d92e65315436b1fdcd3bbe27708370081383">+1/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>mod.rs</strong><dd><code>Add generate_tantivy_index tests</code> </dd></summary> <hr> src/service/tantivy/mod.rs <li>Added <code>create_test_batch</code> and <code>create_test_stream</code> helpers<br> <li> Added multiple async tests for <code>generate_tantivy_index</code> and <br><code>create_tantivy_index</code> </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7461/files#diff-68837d2f393b453002ec2d95f6882cfcaf70d9ef6547be2c9a890e8b0fc3c559">+471/-0</a> </td> </tr> <tr> <td> <details> <summary><strong>mod.rs</strong><dd><code>Fix footer size and add puffin tests</code> </dd></summary> <hr> src/service/tantivy/puffin/mod.rs <li>Updated <code>FOOTER_SIZE</code> to include trailing magic<br> <li> Added unit tests for constants and serialization </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7461/files#diff-2f7f0bac01afc6e37908521d1d33d05fcd650b7a08792062976e1e7465b4a1f9">+278/-1</a> </td> </tr> <tr> <td> <details> <summary><strong>reader.rs</strong><dd><code>Add puffin reader tests</code> </dd></summary> <hr> src/service/tantivy/puffin/reader.rs <li>Added tests for <code>PuffinBytesReader</code> and <code>PuffinFooterBytesReader</code><br> <li> Covered parsing, validation, and error scenarios </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7461/files#diff-93d025368ac2b94462df57eb597f345d59967f0dbfb7745a5a7c60b008b85c16">+383/-0</a> </td> </tr> <tr> <td> <details> <summary><strong>writer.rs</strong><dd><code>Add puffin writer tests</code> </dd></summary> <hr> src/service/tantivy/puffin/writer.rs <li>Added tests for <code>PuffinBytesWriter</code> and <code>PuffinFooterWriter</code><br> <li> Verified blob writing, footer structure, and JSON serialization </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7461/files#diff-af51d55696b4d2b7e5f4c0ccd8af73e0b464db0c83114c3882548bee6ada5e1d">+306/-0</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details>