Closed haiqi96 closed 13 hours ago
The pull request introduces significant changes across multiple files to support JSON extraction alongside existing IR extraction functionalities. Key modifications include the addition of new constants, classes, and methods, as well as renaming attributes and functions to reflect a shift from "IR" to "stream" terminology. These updates enhance command handling, job configuration, and overall flexibility in data extraction processes, ensuring that both IR and JSON types can be processed effectively.
File | Change Summary |
---|---|
components/clp-package-utils/clp_package_utils/general.py | Added constant EXTRACT_JSON_CMD , renamed ir_output_dir to stream_output_dir , updated references in generate_container_config and validate_worker_config to accommodate new naming conventions. |
components/clp-package-utils/clp_package_utils/scripts/decompress.py | Renamed handle_extract_ir_cmd to handle_extract_stream_cmd , added support for JSON extraction, updated command handling logic, and introduced a new parser for JSON extraction commands. |
components/clp-package-utils/clp_package_utils/scripts/native/decompress.py | Renamed submit_and_monitor_ir_extraction_job_in_db to submit_and_monitor_extraction_job_in_db , updated to handle multiple extraction job types, and modified command handling to support both IR and JSON extraction. |
components/job-orchestration/job_orchestration/scheduler/constants.py | Added new enum value EXTRACT_JSON to QueryJobType . |
components/job-orchestration/job_orchestration/scheduler/job_config.py | Introduced ExtractJsonJobConfig class with attributes archive_id and target_chunk_size . |
components/job-orchestration/job_orchestration/scheduler/query/query_scheduler.py | Added StreamExtractionHandle , IrExtractionHandle , and JsonExtractionHandle classes, updated job handling logic to support both extraction types, and improved error handling with new utility functions. |
components/job-orchestration/job_orchestration/scheduler/scheduler_data.py | Added ExtractJsonJob class and modified ExtractIrJob class to remove specific properties. |
components/clp-package-utils/clp_package_utils/scripts/start_clp.py | Updated parameter names from "ir" to "stream" in various functions, reflecting a shift in terminology. |
components/clp-py-utils/clp_py_utils/clp_config.py | Renamed ir_output to stream_output , introduced StreamOutput class, and updated validation logic accordingly. |
components/clp-py-utils/clp_py_utils/create-results-cache-indices.py | Changed command-line argument from --ir-collection to --stream-collection , updating associated logic. |
components/job-orchestration/job_orchestration/executor/query/celeryconfig.py | Updated import and task routing from extract_ir_task to extract_stream_task . |
components/job-orchestration/job_orchestration/executor/query/extract_stream_task.py | Updated make_command function to handle both IR and JSON extraction, renamed extract_ir to extract_stream , and modified parameters accordingly. |
components/log-viewer-webui/server/settings.json | Renamed MongoDB configuration keys from MongoDbIrFilesCollectionName to MongoDbStreamFilesCollectionName and updated directory paths. |
components/log-viewer-webui/server/src/DbManager.js | Renamed variables and methods to reflect changes from IR to stream, added new method submitAndWaitForExtractStreamJob . |
components/log-viewer-webui/server/src/app.js | Updated MongoDB collection name from irFilesCollectionName to streamFilesCollectionName . |
components/log-viewer-webui/server/src/routes/static.js | Renamed irFilesDir to streamFilesDir and updated static file serving logic accordingly. |
components/package-template/src/etc/clp-config.yml | Changed ir_collection_name to stream_collection_name and removed ir_output section, adding a new stream_output section. |
components/log-viewer-webui/server/.env | Removed IR_DATA_DIR and added STREAMS_DATA_DIR with updated path. |
components/log-viewer-webui/client/src/ui/QueryStatus.jsx | Introduced functionality for handling JSON extraction queries, modified control flow to accommodate new parameters. |
EXTRACT_JSON_CMD
constant and modifications to the CLPDockerMounts
class, which are connected to updates in the decompress.py
scripts that also introduce support for JSON extraction and modify command handling.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Sorry for the delay, still in the process of putting together my review.
Description
This PR adds json extraction task for the clp-package to prepare for the log-viewer support. The PR contains the following changes:
Validation performed
For CLP-unstructured. Confirmed that a compressed file and be opened in the log-viewer via CLP webui.
For CLP-Json Confirmed that a Jsonl file gets can be extracted when submitting a job via decompress.sh script
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Refactor