-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(mdatagen): add automatic feature gate documentation generation #14130
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
base: main
Are you sure you want to change the base?
feat(mdatagen): add automatic feature gate documentation generation #14130
Conversation
1ba9385 to
cc3891a
Compare
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (94.87%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #14130 +/- ##
==========================================
- Coverage 92.25% 92.22% -0.04%
==========================================
Files 658 658
Lines 41184 41222 +38
==========================================
+ Hits 37996 38017 +21
- Misses 2182 2193 +11
- Partials 1006 1012 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
58737ba to
0fe7f89
Compare
Implements automatic documentation generation for component feature gates via mdatagen, addressing issue open-telemetry#14067. Changes: - Extended metadata-schema.yaml with feature_gates section - Added FeatureGate types and validation to metadata.go - Created documentation template for feature gates - Integrated into documentation generation pipeline - Added test data and test cases - Updated README with usage examples All tests passing (282 tests) and lint checks clean. Signed-off-by: SACHIN <[email protected]>
Fix import grouping to properly separate standard library imports from third-party imports. This resolves the goimpi check failure in CI. Signed-off-by: SACHIN <[email protected]>
Signed-off-by: SACHIN <[email protected]>
0fe7f89 to
ca8e3eb
Compare
Add test cases covering all validation scenarios: - Valid alpha and stable gates - Empty description error - Invalid stage error - Version format validation (missing 'v' prefix) - to_version requirement for stable/deprecated gates - Empty gate ID validation Achieves 100% coverage for validateFeatureGates function. Signed-off-by: SACHIN KUMAR <[email protected]>
- Changed FeatureGates to []FeatureGate with ID field for preserved ordering - Added duplicate ID validation - Updated templates to iterate list using .ID - Added feature_gates section to schema and README - Updated tests and testdata - Removed accidentally committed mdatagen binary Addresses all feedback from @mx-psi on PR open-telemetry#14130
- Remove changelog entry (mdatagen is internal tool) - Add validation: feature gates must be sorted by ID - Add validation: each feature gate must have reference_url - Add validation: ID must match regex ^[0-9a-zA-Z.]*$ - Add comprehensive tests for all validations - Revert unrelated formatting changes to package_test.go.tmpl
mx-psi
left a comment
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.
To make CI pass you can run make gogenerate and add 'mycomponent' to this list
There's a couple more things to do but we can do them in a follow up PR, let's focus on these and the inline comment and I can merge your PR
- Add 'mycomponent' to allowed status.class in metadata-schema.yaml - Add 'mycomponent' to cspell dictionary for spelling checks
|
Done in f92d1f8!
The schema file now has zero unrelated changes. |
codeboten
left a comment
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.
Thanks @sAchin-680! Looks like just a space in the generated file's import list and it should be good to go to pass the CI checks
Hey @codeboten. Fixed the import spacing in |
Description
Implements automatic documentation generation for component feature gates via mdatagen.
Component authors can now declare feature gates in
metadata.yaml, and mdatagen will automatically generate standardized markdown documentation including gate IDs, stages, descriptions, version information, and reference links.Key Changes:
metadata-schema.yamlwithfeature_gatessectionFeatureGatetypes with validation (required fields, valid stages, version format)Link to tracking issue
Fixes(edit by @mx-psi) Updates #14067Testing
TestRunContents/feature_gates.yamltest caseDocumentation
cmd/mdatagen/README.mdwith usage examplescmd/mdatagen/internal/testdata/documentation.md