Skip to content

feat: support static docker file#2529

Open
Takuka0311 wants to merge 17 commits intoalibaba:mainfrom
Takuka0311:input-static-file-onetime-support-docker-file
Open

feat: support static docker file#2529
Takuka0311 wants to merge 17 commits intoalibaba:mainfrom
Takuka0311:input-static-file-onetime-support-docker-file

Conversation

@Takuka0311
Copy link
Copy Markdown
Collaborator

@Takuka0311 Takuka0311 commented Feb 10, 2026

  • refactor: enhance container management and file server integration
    • Updated the container management logic to differentiate between file server and static file server container diffs, improving clarity and maintainability.
    • Introduced new methods for applying container diffs specific to file servers and static file servers, enhancing modularity.
    • Added support for container metadata in file checkpoints, allowing better tracking of file-container associations.
    • Refactored event handling to utilize the new container management methods, ensuring consistent behavior across file server operations.
    • This refactor streamlines the container management process and enhances the overall architecture of the file server system.
  • refactor: replace Boost filesystem with std::filesystem across the codebase. This change enhances the codebase by leveraging the standard library's filesystem capabilities, promoting better performance and reducing dependencies.
    • Updated various files to utilize std::filesystem instead of Boost's filesystem for improved compatibility and modern C++ standards.
    • Adjusted path handling in unit tests and application logic to ensure consistent usage of std::filesystem.
    • Removed unnecessary Boost includes and streamlined directory operations for better readability and maintainability.

…debase

- Updated various files to utilize std::filesystem instead of Boost's filesystem for improved compatibility and modern C++ standards.
- Adjusted path handling in unit tests and application logic to ensure consistent usage of std::filesystem.
- Removed unnecessary Boost includes and streamlined directory operations for better readability and maintainability.

This change enhances the codebase by leveraging the standard library's filesystem capabilities, promoting better performance and reducing dependencies.
…and StringTools

- Replaced Boost filesystem usage with std::filesystem for improved compatibility and adherence to modern C++ standards.
- Updated path handling logic in AbsolutePath and removed deprecated functions in StringTools.
- Enhanced unit tests to validate new path handling behavior and ensure correctness.
- Removed unnecessary Boost includes to streamline the codebase.

This refactor enhances maintainability and performance by leveraging the standard library's capabilities.
- Deleted the E2EWithDockerEngineVersions job, which included Docker Engine version compatibility testing.
- Adjusted the actions-timeline to only depend on the E2E job.
- This cleanup simplifies the workflow and focuses on essential end-to-end testing processes.
…lerUnittest

- Updated all instances of bfs::remove and bfs::exists to fs::remove and fs::exists respectively in ModifyHandlerUnittest.cpp.
- This change aligns with the ongoing transition to std::filesystem for improved compatibility and modern C++ standards.
- Ensured that unit tests reflect the updated filesystem operations for consistency and correctness.
- Removed the `metrics_report_method` flag from logtail and AppConfig files as it was no longer needed.
- Cleaned up commented-out code and unnecessary includes across multiple files to improve readability and maintainability.
- Updated the handling of configuration parameters to streamline the codebase and enhance clarity.

This refactor contributes to a cleaner and more efficient code structure.
- Updated the container management logic to differentiate between file server and static file server container diffs, improving clarity and maintainability.
- Introduced new methods for applying container diffs specific to file servers and static file servers, enhancing modularity.
- Added support for container metadata in file checkpoints, allowing better tracking of file-container associations.
- Refactored event handling to utilize the new container management methods, ensuring consistent behavior across file server operations.

This refactor streamlines the container management process and enhances the overall architecture of the file server system.
… input management

- Added the AddInputWithoutStartingThread method to StaticFileServerUnittest, allowing configuration inputs to be added without starting the server thread.
- Updated TestGetNextAvailableReader and TestUpdateInputs methods to utilize the new input addition method, enhancing test determinism and clarity.
- Streamlined input management by ensuring that inputs can be added in a controlled manner, improving the overall structure of the unit tests.

This refactor enhances the test framework for the StaticFileServer, promoting better isolation and reliability in unit tests.
- Updated the condition in the UpdateInputs method to check for the negation of IsOnetimePipelineRunningBeforeStart, ensuring files are retrieved only when the pipeline is not running.
- Improved formatting of the AddInputWithoutStartingThread method in StaticFileServerUnittest for better readability.

These changes enhance the logic flow in the StaticFileServer and improve code clarity in unit tests.
…onfigurations

- Improved the UpdateInputs method in StaticFileServer to refresh container information when container discovery is enabled, ensuring better synchronization with the container manager.
- Added DataDir configuration in load.go for better organization of data files.
- Updated the feature file to reflect changes in log file paths and removed outdated content tags.
- Modified docker-compose.yaml to mount the entire test directory and adjusted health checks accordingly.
- Ensured log and data directories are created in the Docker setup for easier troubleshooting.

These changes improve the functionality and maintainability of the file server and its associated tests.
- Replaced mutex locks with ReadLock and WriteLock for better concurrency control in HasRegisteredPlugins, RemoveInput, and AddInput methods.
- Updated ReadFiles method to utilize the new inputReadersMap structure, enhancing clarity and performance.
- Adjusted unit tests to reflect changes in input handling and ensure proper functionality.
- Removed outdated Dockerfile and simplified docker-compose configuration for better maintainability.

These changes enhance the thread safety and efficiency of the StaticFileServer.
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.

1 participant