-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Remove unused generated code from pprofile #14073
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
b15c844 to
e9c518e
Compare
Signed-off-by: Bogdan Drutu <[email protected]>
e9c518e to
f42770a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
dmathieu
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.
This feels like we could improve our CI to detect those issues.
For sure, was about to add an issue. |
|
Done #14074 |
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]>
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]>
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]>
…#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]>
No description provided.