Skip to content

fix(clp-package): Updates decompression script with database name change in ClpConfig (fixes #1764).#1765

Merged
sitaowang1998 merged 5 commits into
y-scope:mainfrom
sitaowang1998:db-names
Dec 10, 2025
Merged

fix(clp-package): Updates decompression script with database name change in ClpConfig (fixes #1764).#1765
sitaowang1998 merged 5 commits into
y-scope:mainfrom
sitaowang1998:db-names

Conversation

@sitaowang1998

@sitaowang1998 sitaowang1998 commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Description

This PR fixes #1764 by updating decompression script to use latest databases["names"][ClpDbNameType.CLP].

This PR also uses ClpDbNameType instead of ClpDbUserType in the compression task with similar usage.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  • Compression, search and decompress works end-to-end using Celery.
  • Compression, search and decompress works end-to-end using Spider.

Summary by CodeRabbit

  • Refactor
    • Updated internal database configuration handling to read the DB name from a structured names mapping rather than a flat field, and adjusted related imports and references for consistency across components.

✏️ Tip: You can customize this high-level summary in your review settings.

@sitaowang1998 sitaowang1998 requested a review from a team as a code owner December 10, 2025 18:41
@coderabbitai

coderabbitai Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Two Python files were updated to use the renamed database-name structure: code now reads database names from the nested names mapping using ClpDbNameType.CLP and imports ClpDbNameType where needed instead of ClpDbUserType.

Changes

Cohort / File(s) Summary
Database connection name access
components/clp-package-utils/clp_package_utils/scripts/native/decompress.py, components/job-orchestration/job_orchestration/executor/compress/compression_task.py
Replaced flat "name" access with the nested ["names"][ClpDbNameType.CLP] lookup for DB name. Updated imports: added ClpDbNameType and removed ClpDbUserType where applicable.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review decompress.py for any remaining references to the removed ClpDbUserType or to the old "name" key.
  • Verify compression_task.py imports ClpDbNameType and that the DB-name lookup uses the correct mapping key.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR addresses issue #1764 by updating both decompress.py and compression_task.py to use ClpDbNameType.CLP instead of the old 'name' key, resolving the KeyError.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the database name parameter access issue identified in #1764; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and concisely summarizes the primary change: updating the decompression script to use the new database name structure from ClpConfig.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@junhaoliao junhaoliao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i verified that:

  • No remaining references to the old pattern ["name"] was found
  • The distinction between ClpDbNameType (for database names) and ClpDbUserType (for credentials) is now properly applied throughout the codebase

can we file a bug report (maybe we can ask the rabbit to do it) and add the issue number to the PR title?

@sitaowang1998 sitaowang1998 changed the title fix(clp-package): Updates decompression script with database name change in ClpConfig. fix(clp-package): Updates decompression script with database name change in ClpConfig (fixes #1764). Dec 10, 2025
@sitaowang1998 sitaowang1998 merged commit 0984002 into y-scope:main Dec 10, 2025
20 checks passed
@sitaowang1998 sitaowang1998 deleted the db-names branch December 10, 2025 21:16
davidlion pushed a commit to davidlion/clp that referenced this pull request Jan 17, 2026
junhaoliao pushed a commit to junhaoliao/clp that referenced this pull request May 17, 2026
junhaoliao pushed a commit to junhaoliao/clp that referenced this pull request May 17, 2026
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.

clp-text decompression with decompress.sh x fails

2 participants