Skip to content

Conversation

@bogdandrutu
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.52%. Comparing base (71418b6) to head (f42770a).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14073      +/-   ##
==========================================
+ Coverage   91.61%   92.52%   +0.90%     
==========================================
  Files         655      654       -1     
  Lines       42793    36071    -6722     
==========================================
- Hits        39205    33374    -5831     
+ Misses       2765     1877     -888     
+ Partials      823      820       -3     

☔ 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.

Copy link
Member

@dmathieu dmathieu left a comment

Choose a reason for hiding this comment

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

This feels like we could improve our CI to detect those issues.

@bogdandrutu
Copy link
Member Author

This feels like we could improve our CI to detect those issues.

For sure, was about to add an issue.

@bogdandrutu
Copy link
Member Author

Done #14074

@bogdandrutu bogdandrutu added this pull request to the merge queue Oct 23, 2025
Merged via the queue into open-telemetry:main with commit 89327db Oct 23, 2025
60 checks passed
@bogdandrutu bogdandrutu deleted the rm-dead-code-gen branch October 23, 2025 20:52
@github-actions github-actions bot added this to the next release milestone Oct 23, 2025
sAchin-680 added a commit to sAchin-680/opentelemetry-collector that referenced this pull request Nov 6, 2025
The implementation:
- Adds CleanInternalGeneratedFiles() to clean shared pdata/internal/ directory
- Adds CleanGeneratedFiles() method to Package for cleaning package directories
- Cleans all generated file patterns: generated_*.go, generated_wrapper_*.go,
  generated_proto_*.go, and generated_enum_*.go
- Ensures cleanup happens before any file generation to prevent partial states

This resolves issues where removed structs or enums leave behind unused
generated code, as seen in open-telemetry#14073.

Fixes open-telemetry#14074

Signed-off-by: SACHIN KUMAR <[email protected]>
sAchin-680 added a commit to sAchin-680/opentelemetry-collector that referenced this pull request Nov 6, 2025
The implementation:
- Adds CleanInternalGeneratedFiles() to clean shared pdata/internal/ directory
- Adds CleanGeneratedFiles() method to Package for cleaning package directories
- Cleans all generated file patterns: generated_*.go, generated_wrapper_*.go,
  generated_proto_*.go, and generated_enum_*.go
- Ensures cleanup happens before any file generation to prevent partial states

This resolves issues where removed structs or enums leave behind unused
generated code, as seen in open-telemetry#14073.

Fixes open-telemetry#14074

Signed-off-by: SACHIN KUMAR <[email protected]>
sAchin-680 added a commit to sAchin-680/opentelemetry-collector that referenced this pull request Nov 6, 2025
The implementation:
- Adds CleanInternalGeneratedFiles() to clean shared pdata/internal/ directory
- Adds CleanGeneratedFiles() method to Package for cleaning package directories
- Cleans all generated file patterns: generated_*.go, generated_wrapper_*.go,
  generated_proto_*.go, and generated_enum_*.go
- Ensures cleanup happens before any file generation to prevent partial states

This resolves issues where removed structs or enums leave behind unused
generated code, as seen in open-telemetry#14073.

Fixes open-telemetry#14074

Signed-off-by: SACHIN KUMAR <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Nov 10, 2025
…#14135)

#### Description

Implements automatic cleanup of generated files before pdatagen
regeneration to prevent stale code accumulation. Previously, removing
structs/enums from configuration left behind unused generated files
requiring manual cleanup (see #14073).

**Solution:** All generated files are now automatically deleted before
regeneration, ensuring generated code always matches the current
configuration.

**Implementation:**
- `CleanInternalGeneratedFiles()` - cleans shared `pdata/internal/`
directory
- `CleanGeneratedFiles()` - cleans individual package directories  
- Covers all patterns: `generated_*.go`, `generated_wrapper_*.go`,
`generated_proto_*.go`, `generated_enum_*.go`

#### Link to tracking issue

Fixes #14074 - Automatic delete generated files with pdatagen before
re-generate

#### Testing

- [x] Successfully built and ran `make genpdata`
- [x] Verified all 160+ generated files covered by cleanup patterns
- [x] No compilation or linting errors
- [x] Gracefully handles non-existent files

#### Documentation

Self-documented code with clear function comments. No user-facing
changes required.

---------

Signed-off-by: SACHIN KUMAR <[email protected]>
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