Skip to content

Consolidate v2 unstable file format warnings and improve diagnostic report styling#1404

Draft
Copilot wants to merge 7 commits intomainfrom
copilot/fix-weaver-registry-warnings
Draft

Consolidate v2 unstable file format warnings and improve diagnostic report styling#1404
Copilot wants to merge 7 commits intomainfrom
copilot/fix-weaver-registry-warnings

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 3, 2026

Running weaver registry check on v2 schema emits a separate "File format definition/2 is not yet stable" warning for every v2 file, producing noisy output. The "Diagnostic report" header also renders in red even when only warnings are present.

Changes

  • Consolidate UnstableFileFormat warnings via a new generic Error::consolidate() method (crates/weaver_semconv/src/lib.rs): The error type itself owns the deduplication logic, grouping UnstableFileFormat warnings by file_format value and merging their provenances into a single warning listing all affected files, e.g.:
    ⚠ File format `definition/2` is not yet stable: ./model/gen-ai/spans.yaml, ./model/gen-ai/registry.yaml, ./model/mcp/spans.yaml
    
    The loader (crates/weaver_resolver/src/loader.rs) simply calls Error::consolidate() without any error-type-specific knowledge.
  • Severity-aware diagnostic header color (defaults/diagnostic_templates/ansi/errors.txt.j2): Render "Diagnostic report" in yellow when all diagnostics are warnings/advice, red only when errors are present.

Copilot AI and others added 2 commits May 3, 2026 19:11
…der yellow for warnings-only

Agent-Logs-Url: https://github.com/open-telemetry/weaver/sessions/0e6c4b41-ee69-49b2-9e94-2465dbd7124c

Co-authored-by: lmolkova <2347409+lmolkova@users.noreply.github.com>
Comment thread crates/weaver_resolver/src/loader.rs Outdated
Comment thread crates/weaver_resolver/src/loader.rs Outdated
Agent-Logs-Url: https://github.com/open-telemetry/weaver/sessions/ded673d2-74bd-4bc3-8a73-d6f56182535c

Co-authored-by: lmolkova <2347409+lmolkova@users.noreply.github.com>
@lmolkova
Copy link
Copy Markdown
Member

lmolkova commented May 4, 2026

@copilot fix ci errors

@lmolkova lmolkova marked this pull request as ready for review May 4, 2026 02:33
@lmolkova lmolkova requested a review from a team as a code owner May 4, 2026 02:33
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 4, 2026

@copilot fix ci errors

Fixed in 657fe8f — the cargo fmt check was failing due to formatting in the new test code.

Copilot AI requested a review from lmolkova May 4, 2026 02:35
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.4%. Comparing base (69132ef) to head (657fe8f).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1404   +/-   ##
=====================================
  Coverage   82.4%   82.4%           
=====================================
  Files        120     120           
  Lines      10092   10108   +16     
=====================================
+ Hits        8320    8334   +14     
- Misses      1772    1774    +2     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lmolkova
Copy link
Copy Markdown
Member

lmolkova commented May 4, 2026

@copilot add changelog entry, keep it super-short, match existing style

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 4, 2026

@copilot add changelog entry, keep it super-short, match existing style

Added in 9ea2552.

@lmolkova lmolkova moved this to To consider for the next release in OTel Weaver Project May 6, 2026
@lmolkova lmolkova marked this pull request as draft May 8, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To consider for the next release

Development

Successfully merging this pull request may close these issues.

2 participants