Skip to content
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

Refactor: common resolve registry with policy checks #536

Merged
merged 8 commits into from
Jan 8, 2025

Conversation

jerbly
Copy link
Contributor

@jerbly jerbly commented Jan 4, 2025

  • Refactored CLI registry commands to remove some duplication. Resolving the registry with policy checks is common for generate, resolve and check.
  • Added missing after_resolution policy checks to generate and resolve through the common code.
  • Removed duplication in CLI args to maintain consistency.
  • Removed the deprecated --registry-git-sub-dir option.
  • Fixed bug in check if --skip-policies was specified then it would not fail for any validation errors. e.g. this fails registry check -r "https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v1.27.0.zip[model]" --future but this would pass registry check -r "https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v1.27.0.zip[model]" --future --skip-policies

@jerbly jerbly requested a review from a team as a code owner January 4, 2025 15:58
Copy link

codecov bot commented Jan 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.5%. Comparing base (dc69528) to head (8a4e24f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #536     +/-   ##
=======================================
- Coverage   74.5%   74.5%   -0.1%     
=======================================
  Files         51      51             
  Lines       3960    3960             
=======================================
- Hits        2954    2953      -1     
- Misses      1006    1007      +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, really great cleanup!!! Just want to check on some functionality that may have also not been consistent across commands.

src/registry/check.rs Show resolved Hide resolved
@lquerel
Copy link
Contributor

lquerel commented Jan 8, 2025

Great cleanup, and thank you for doing that!

@lquerel lquerel merged commit 6d4ea66 into open-telemetry:main Jan 8, 2025
23 checks passed
@jerbly jerbly deleted the refactor-resolve-with-policies branch January 8, 2025 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants