-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[cmd/mdatagen] Add lint/ordering validation for metadata.yaml #13782
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
Signed-off-by: Paulo Dias <[email protected]>
Signed-off-by: Paulo Dias <[email protected]>
Signed-off-by: Paulo Dias <[email protected]>
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (83.01%) 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 #13782 +/- ##
==========================================
- Coverage 91.61% 91.59% -0.02%
==========================================
Files 655 655
Lines 42729 42782 +53
==========================================
+ Hits 39147 39188 +41
- Misses 2761 2769 +8
- Partials 821 825 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Paulo Dias <[email protected]>
Signed-off-by: Paulo Dias <[email protected]>
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
/label -stale never-stale |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
The proposal LGTM. @paulojmdias are you planning to finalize the PR? |
|
@dmitryax yes, I will work into it soon |
… into feat/13781 Signed-off-by: Paulo Dias <[email protected]>
Signed-off-by: Paulo Dias <[email protected]>
Signed-off-by: Paulo Dias <[email protected]>
Signed-off-by: Paulo Dias <[email protected]>
|
@dmitryax I think you can review now. All the reordering of The The |
dmitryax
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.
Do you have any script or temporary command to update existing files? It'll be painful to sort all the metadata.yaml files in contrib manually
…telemetry#43447) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…pen-telemetry#43449) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…metry#43477) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…etry#43478) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…en-telemetry#43472) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…-telemetry#43471) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…pen-telemetry#43462) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…metry#43459) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…pen-telemetry#43451) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…emetry#43463) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…metry#43476) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…telemetry#43469) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…lemetry#43468) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…n-telemetry#43461) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…lemetry#43460) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…en-telemetry#43465) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…telemetry#43455) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…pen-telemetry#43450) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
open-telemetry#43454) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…tries (open-telemetry#43446) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…pen-telemetry#43445) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…pen-telemetry#43441) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…n-telemetry#43583) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…lemetry#43578) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…lemetry#43582) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…lemetry#43581) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…en-telemetry#43580) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
open-telemetry#43579) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 --------- Signed-off-by: Paulo Dias <[email protected]> Co-authored-by: Alex Boten <[email protected]>
…telemetry#43627) #### Description Sort metadata.yaml file in preparation for sort validation using mdatagen. Context: open-telemetry/opentelemetry-collector#13782 Signed-off-by: Paulo Dias <[email protected]>
…elemetry#43639) #### Description Sort metadata.yaml files since sort validation using mdatagen was already merged. Context: open-telemetry/opentelemetry-collector#13782 Fixes core collector tests. Core pipeline failed: https://github.com/open-telemetry/opentelemetry-collector/actions/runs/18602672590/job/53044660662 Signed-off-by: Paulo Dias <[email protected]>
Description
Extend mdatagen to validate that keys in metadata.yaml files are alphabetically sorted (resource_attributes, attributes, metrics, events, and telemetry.metrics).
The idea came from open-telemetry/opentelemetry-collector-contrib#42477 (comment)
Link to tracking issue
Fixes #13781
Testing
I added tests to validate unordered data and expect an error on it.