-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/lib #42
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
base: develop
Are you sure you want to change the base?
Feature/lib #42
Conversation
Updated logupload target in Makefile.am to reduce sources and flags.
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.
Pull request overview
This PR implements a major refactoring to support library usage of uploadSTBLogs. The changes flatten the RuntimeContext structure by removing nested groupings and consolidate multiple source files to simplify the codebase architecture.
Key Changes:
- Flattened RuntimeContext structure eliminating nested paths, device, settings, endpoints, flags, and retry sub-structures
- Consolidated log_collector.c into archive_manager.c and cleanup_manager.c into cleanup_handler.c
- Combined individual strategy files (strategy_dcm.c, strategy_ondemand.c, strategy_reboot.c) into a unified strategies.c
- Added library build support with new uploadstblogs_run() API and separated binary build with UPLOADSTBLOGS_BUILD_BINARY flag
- Removed two test files (strategy_dcm_gtest.cpp, strategy_ondemand_gtest.cpp) and consolidated into strategies_gtest.cpp
Reviewed changes
Copilot reviewed 41 out of 42 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| uploadstblogs/unittest/*.cpp (11 files) | Updated all test files to use flattened RuntimeContext structure (e.g., ctx.log_path instead of ctx.paths.log_path) |
| uploadstblogs/src/validation.c | Updated directory validation to use flattened context fields |
| uploadstblogs/src/uploadstblogs.c | Added uploadstblogs_run() API and wrapped main() with UPLOADSTBLOGS_BUILD_BINARY conditional |
| uploadstblogs/src/strategy_selector.c | Updated strategy selection logic to use flattened flag and device type fields |
| uploadstblogs/src/strategies.c | New file combining DCM, ONDEMAND, and REBOOT strategy implementations |
| uploadstblogs/src/retry_logic.c | Updated retry logic to use flattened retry configuration fields |
| uploadstblogs/src/path_handler.c | Updated path handling to use flattened endpoint and settings fields |
| uploadstblogs/src/event_manager.c | Updated event emission to use flattened device type field |
| uploadstblogs/src/context_manager.c | Major refactoring to populate flattened RuntimeContext fields |
| uploadstblogs/src/cleanup_handler.c | Expanded to include cleanup_manager functionality with housekeeping functions |
| uploadstblogs/src/archive_manager.c | Expanded to include log_collector functionality with collection functions |
| uploadstblogs/src/Makefile.am | Added library build target and updated binary to link against library |
| uploadstblogs/include/*.h (4 files) | Updated type definitions and API declarations for library support |
| unit_test.sh | Updated test runner to reflect consolidated test files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.