-
Notifications
You must be signed in to change notification settings - Fork 3
Add dynamic lookup for enterprise SASL mechanisms from source code #137
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
Conversation
…oved type extraction - Add dynamic lookup for enterprise SASL mechanisms from source code - Fix template type extraction with proper bracket-counting for nested templates - Implement constexpr identifier resolution for accurate default values - Refactor FriendlyDefaultTransformer with production-ready architecture - Eliminate hardcoded values in favor of dynamic source code analysis - Add comprehensive error handling and performance optimizations - Bump package version to 4.10.1 Resolves issues where enterprise properties showed function names instead of actual values and improves overall code quality with zero hardcoded fallbacks.
✅ Deploy Preview for docs-extensions-and-macros ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthrough
Sequence Diagram(s)sequenceDiagram
autonumber
participant PE as PropertyExtractor
participant TF as FriendlyDefaultTransformer
participant SRC as Redpanda Source Tree
participant FS as Filesystem
note over PE,SRC: New/Changed: constexpr & enterprise SASL resolution
PE->>TF: parse(default_value, type)
alt default references constexpr identifier
TF->>TF: _get_resolver() [lazy cache]
TF->>PE: get_resolve_constexpr_identifier()
TF->>SRC: resolve_constexpr_identifier(identifier)
alt identifier found
SRC-->>TF: literal string value
TF-->>PE: resolved value
else not found
TF-->>PE: fallback to original/default
end
else default is vector or sstring or chrono
TF->>TF: _process_sstring_constructor / _parse_vector_contents / CHRONO
TF-->>PE: parsed value
end
note over PE,FS: Enterprise SASL mechanisms resolution
PE->>FS: locate sasl_mechanisms.h
FS-->>PE: file contents or not found
alt file found and parsed
PE->>SRC: resolve_constexpr_identifier(...) for each mechanism
SRC-->>PE: concrete strings (where available)
PE-->>PE: set mechanisms list
else failure
PE-->>PE: use fallback ["GSSAPI", "OAUTHBEARER"] or descriptive override
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Docstrings generation was requested by @JakeSCahill. * #137 (comment) The following files were modified: * `tools/property-extractor/property_extractor.py` * `tools/property-extractor/transformers.py`
Note Generated docstrings for this pull request at #138 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (3)
package.json
(1 hunks)tools/property-extractor/property_extractor.py
(6 hunks)tools/property-extractor/transformers.py
(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tools/property-extractor/transformers.py (1)
tools/property-extractor/property_extractor.py (1)
resolve_constexpr_identifier
(343-421)
🪛 Ruff (0.13.3)
tools/property-extractor/property_extractor.py
399-399: Loop control variable dirs
not used within loop body
Rename unused dirs
to _dirs
(B007)
922-922: Local variable original_s
is assigned to but never used
Remove assignment to unused variable original_s
(F841)
tools/property-extractor/transformers.py
41-41: Consider moving this statement to an else
block
(TRY300)
43-43: Redundant exception object included in logging.exception
call
(TRY401)
461-461: Unused method argument: file_pair
(ARG002)
492-492: Redundant exception object included in logging.exception
call
(TRY401)
549-549: Unused method argument: file_pair
(ARG002)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules - docs-extensions-and-macros
- GitHub Check: Header rules - docs-extensions-and-macros
- GitHub Check: Pages changed - docs-extensions-and-macros
Docstrings generation was requested by @JakeSCahill. * #137 (comment) The following files were modified: * `tools/property-extractor/property_extractor.py` * `tools/property-extractor/transformers.py` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…docs-extensions-and-macros into config-prop-fixes
Recent changes in Redpanda's codebase modified how SASL mechanism defaults are defined, which broke our property extraction automation. The automation was returning internal C++ function names and type identifiers instead of user-friendly values:
"is_enterprise_sasl_mechanism"
instead of["GSSAPI", "OAUTHBEARER"]
"config::sasl_mechanisms_override"
instead of"object"
The property extractor now correctly generates: