Repository navigation
fix: use CLI flag default values instead of manual isset checks - #1099
Conversation
The serve command was checking !cmd.IsSet() for CDC lazy chunking flags and manually setting defaults in code. This moves the defaults directly into the CLI flag definitions using the Value field, making the code cleaner and consistent with standard Go CLI patterns. This also updates the Helm chart to default lazyChunkingEnabled to true instead of null, ensuring the default is explicit in the values.yaml.
|
This change is part of the following stack: Change managed by git-spice. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the handling of default values for CDC lazy chunking configuration. Instead of relying on conditional checks within the application logic, default values are now directly embedded into the CLI flag definitions. This change simplifies the codebase, improves maintainability, and ensures that the application's behavior regarding lazy chunking is consistent with its declared CLI flags. Additionally, the Helm chart's default for lazy chunking has been made explicit, enhancing clarity for deployments. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors how default values for CDC lazy chunking flags are handled in the serve command. Instead of manually checking if flags are set and applying defaults in the code, this change moves the default values directly into the CLI flag definitions using the Value field. This simplifies the code and aligns with standard Go CLI practices. The corresponding Helm chart and documentation have also been updated to reflect these changes, making the default behavior for lazyChunkingEnabled explicit. The changes are correct and improve code clarity and maintainability. I have no further comments.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1099 +/- ##
=====================================
Coverage 5.04% 5.04%
=====================================
Files 6 6
Lines 436 436
=====================================
Hits 22 22
Misses 410 410
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Lazy chunking was made the default in #1099, but enabling it silently on upgrade is a behavior change: it starts background workers, a cleanup cron job, and delays compressed NAR deletion without user consent. Revert the default to false so users must explicitly opt in. Changes: - pkg/ncps/serve.go: Value true->false, fix usage string - charts/ncps/values.yaml: lazyChunkingEnabled true->false - charts/ncps/tests/configmap_test.yaml: fix default assertion - docs: update all references from default true to false --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
The serve command was checking !cmd.IsSet() for CDC lazy chunking flags
and manually setting defaults in code. This moves the defaults directly
into the CLI flag definitions using the Value field, making the code
cleaner and consistent with standard Go CLI patterns.
This also updates the Helm chart to default lazyChunkingEnabled to true
instead of null, ensuring the default is explicit in the values.yaml.