fix(webui): Fix dataset handling in compression job creation to use default when value is empty (fixes #1854).#1855
Conversation
…efault when value is empty (fixes y-scope#1854).
WalkthroughSubmit-path payload construction for Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @components/webui/client/src/pages/IngestPage/Compress/index.tsx:
- Around line 61-63: The code currently only sets payload.dataset to
CLP_DEFAULT_DATASET_NAME when values.dataset is undefined or empty, so non-empty
custom dataset values are never sent; update the logic around values.dataset
(the same block handling payload.dataset) to assign payload.dataset =
values.dataset when values.dataset is defined and non-empty (i.e., add an else
branch or use a ternary) while keeping the fallback to CLP_DEFAULT_DATASET_NAME
for undefined/empty inputs; reference payload.dataset, values.dataset, and
CLP_DEFAULT_DATASET_NAME to locate and modify the code.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
components/webui/client/src/pages/IngestPage/Compress/index.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}
⚙️ CodeRabbit configuration file
- Prefer
false == <expression>rather than!<expression>.
Files:
components/webui/client/src/pages/IngestPage/Compress/index.tsx
🧠 Learnings (3)
📓 Common learnings
Learnt from: quinntaylormitchell
Repo: y-scope/clp PR: 1125
File: components/job-orchestration/job_orchestration/scheduler/compress/compression_scheduler.py:267-291
Timestamp: 2025-09-15T22:20:40.750Z
Learning: For CLP compression jobs, the team has decided to fail the entire job immediately upon encountering any invalid input path, rather than continuing to process valid paths. This decision was made during PR #1125 development.
Learnt from: haiqi96
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-07-29T14:04:13.769Z
Learning: User haiqi96 requested creating a GitHub issue to document a bug fix from PR #1136, which addressed MySQL compatibility issues with invalid SQL CAST operations in the WebUI component.
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1004
File: components/clp-package-utils/clp_package_utils/scripts/native/decompress.py:139-144
Timestamp: 2025-06-24T08:54:14.438Z
Learning: In the CLP codebase, the get_orig_file_id function signature was changed after a recent merge to no longer accept a dataset parameter, making previous suggestions that reference this parameter invalid.
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1036
File: components/clp-py-utils/clp_py_utils/clp_metadata_db_utils.py:204-211
Timestamp: 2025-07-03T12:58:18.407Z
Learning: In the CLP codebase, the validate_and_cache_dataset function in components/clp-py-utils/clp_py_utils/clp_metadata_db_utils.py uses in-place updates of the existing_datasets set parameter rather than returning a new set, as preferred by the development team.
📚 Learning: 2025-08-14T05:06:59.010Z
Learnt from: junhaoliao
Repo: y-scope/clp PR: 1050
File: components/clp-package-utils/clp_package_utils/scripts/archive_manager.py:178-178
Timestamp: 2025-08-14T05:06:59.010Z
Learning: In the decompress.py script, the --dataset argument was only added to the json_extraction_parser but not to the ir_extraction_parser, causing AttributeError when handle_extract_stream_cmd tries to access parsed_args.dataset for IR extraction commands.
Applied to files:
components/webui/client/src/pages/IngestPage/Compress/index.tsx
📚 Learning: 2025-09-15T22:20:40.750Z
Learnt from: quinntaylormitchell
Repo: y-scope/clp PR: 1125
File: components/job-orchestration/job_orchestration/scheduler/compress/compression_scheduler.py:267-291
Timestamp: 2025-09-15T22:20:40.750Z
Learning: For CLP compression jobs, the team has decided to fail the entire job immediately upon encountering any invalid input path, rather than continuing to process valid paths. This decision was made during PR #1125 development.
Applied to files:
components/webui/client/src/pages/IngestPage/Compress/index.tsx
🧬 Code graph analysis (1)
components/webui/client/src/pages/IngestPage/Compress/index.tsx (1)
components/webui/common/src/config.ts (1)
CLP_DEFAULT_DATASET_NAME(51-51)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: package-image
- GitHub Check: check-generated
- GitHub Check: lint-check (ubuntu-24.04)
- GitHub Check: lint-check (macos-15)
|
the docs CI is failing which is unrelated to the changes in the current PR: https://github.com/y-scope/clp/actions/runs/20968400563/job/60264957848 @coderabbitai create an issue to track the CI failure |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain@junhaoliao I'll create an issue to track the docs CI failure. Let me first gather the details about the failure. 🏁 Script executed: Length of output: 12754 🏁 Script executed: Length of output: 42 @junhaoliao I've created issue #1866 to track the docs CI failure: #1866 The issue documents the operation canceled error that occurred during the coreutils installation on the macos-15 runner, and includes links back to this PR and the failing workflow run. 🧠 Learnings used |
…efault when value is empty (fixes y-scope#1854). (y-scope#1855)
…efault when value is empty (fixes y-scope#1854). (y-scope#1855)
…efault when value is empty (fixes y-scope#1854). (y-scope#1855)
Description
as the title says, we missed to provide override when the input field is empty.
Checklist
breaking change.
Validation performed
also, as a sanity test:
Repeat 1 & 2
3. entered "samples" in the Dataset field
4. clicked the "Submit" button and observed the job was submitted and completed successfully
Checked the "Search" tab. In the Dataset drop-down, both "default" and "samples" are listed as options. Performed a search with query string "1" for each dataset and observed results were returned.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.