Skip to content

fix(package): Move archive manager constants to avoid host MariaDB dependency (fixes #1185).#1197

Merged
haiqi96 merged 2 commits into
y-scope:mainfrom
haiqi96:fix_dependency_new
Aug 13, 2025
Merged

fix(package): Move archive manager constants to avoid host MariaDB dependency (fixes #1185).#1197
haiqi96 merged 2 commits into
y-scope:mainfrom
haiqi96:fix_dependency_new

Conversation

@haiqi96

@haiqi96 haiqi96 commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Description

The current non-native archive_manager.py imports constants from native/archive_manager.sh. As a side effect, it also imports dependencies that may not be available on the host machine.

This PR reorders the import such that the constants are defined in non-native script and imported by native script. In this way, the dependency issue can be avoided.

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

Manually run the package on debian-bullseye-w-docker container and confirmed that archive-manager.sh doesn't error with any dependency issue.

Summary by CodeRabbit

  • Refactor
    • Centralized command/subcommand/flag definitions for archive management to a single module for consistency across implementations.
  • Chores
    • Introduced explicit type annotations for those constants to improve clarity and tooling support.
  • Impact
    • No user-facing changes; CLI behavior and workflows remain unchanged.

@coderabbitai

coderabbitai Bot commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@haiqi96 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 44 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 58a60c6 and 1ef8b51.

📒 Files selected for processing (2)
  • components/clp-package-utils/clp_package_utils/scripts/archive_manager.py (1 hunks)
  • components/clp-package-utils/clp_package_utils/scripts/native/archive_manager.py (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@haiqi96 haiqi96 marked this pull request as ready for review August 13, 2025 19:16
@haiqi96 haiqi96 requested a review from a team as a code owner August 13, 2025 19:16

@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.

on my end, i validated by

  1. Creating a Debian 11 WSL container:
    1. In WSL Ubuntu 2204: docker pull debian:bullseye-slim; docker run -it debian:bullseye-slim then docker ps to get the container ID.
    2. docker export CONTAINER_ID > debian11.tar
    3. PowerShell: wsl --import Debian-11 C:\WSL\Debian11 C:\Users\Junhao\Downloads\debian11.tar
  2. Enabled Docker Desktop integration for the imported distro.
  3. Untar the package built from the source branch in this PR.
  4. Ran ./sbin/start-clp.sh then ./sbin/admin-tools/archive-manager.sh and observed no dependency error reported:
    usage: archive_manager.py [-h] [--config CONFIG] [--dataset DATASET] {find,del} ...
    archive_manager.py: error: the following arguments are required: subcommand
    

for the PR title, how about:

fix(package): Move archive manager constants to avoid host MariaDB dependency (fixes #1185).

@haiqi96 haiqi96 changed the title fix(package): Refactor constant imports to avoid dependency issues (fix #1185). fix(package): Move archive manager constants to avoid host MariaDB dependency (fixes #1185). Aug 13, 2025
@haiqi96 haiqi96 merged commit b630f2b into y-scope:main Aug 13, 2025
9 checks passed
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.

2 participants