Skip to content

[cmd/schemagen] Fix mode detection and add manual override for schemagen package targeting#15453

Merged
dmitryax merged 4 commits into
open-telemetry:mainfrom
jkoronaAtCisco:schemagen_mode_fix
Jun 16, 2026
Merged

[cmd/schemagen] Fix mode detection and add manual override for schemagen package targeting#15453
dmitryax merged 4 commits into
open-telemetry:mainfrom
jkoronaAtCisco:schemagen_mode_fix

Conversation

@jkoronaAtCisco

Copy link
Copy Markdown
Member

Description

This change fixes mode detection for -p by resolving the target package's on-disk source directory via a lightweight packages.Load call before reading its metadata.yaml. This works for any package reachable from the local module graph, including cross-repo dependencies present in the module cache. When the package is not in the local module graph, detection falls back to the existing default; a new -m component|package flag is provided as a manual override for that case.

Testing

Changes covered with unit tests.

Documentation

Updated README.md .

Authorship

  • I, a human, wrote this pull request description myself.

@jkoronaAtCisco
jkoronaAtCisco requested a review from a team as a code owner June 16, 2026 09:32
@jkoronaAtCisco
jkoronaAtCisco requested a review from jmacd June 16, 2026 09:32
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.79%. Comparing base (f40e46c) to head (8088285).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15453   +/-   ##
=======================================
  Coverage   90.79%   90.79%           
=======================================
  Files         719      719           
  Lines       47168    47187   +19     
=======================================
+ Hits        42825    42844   +19     
  Misses       3085     3085           
  Partials     1258     1258           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dmitryax
dmitryax added this pull request to the merge queue Jun 16, 2026
Merged via the queue into open-telemetry:main with commit 198b335 Jun 16, 2026
68 checks passed
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