Skip to content

bug(decompress): All decompress subcommands fail with ImportError due to renamed function #2059

@junhaoliao

Description

@junhaoliao

Bug

All decompress.sh subcommands (x/extract-file, i/extract-ir, j/extract-json) fail immediately with:

ImportError: cannot import name 'validate_dataset_exists' from 'clp_package_utils.scripts.native.utils'

native/decompress.py line 39 imports validate_dataset_exists (singular), but #1992 renamed the function to validate_datasets_exist (plural) in native/utils.py line 75. Since this is a module-level import, the entire decompress module fails to load, making all decompression operations non-functional.

Expected: Decompression commands should work. The import should reference validate_datasets_exist and the call site at line 151 should be updated accordingly.

CLP version

c48968d (main, introduced in #1992)

Environment

  • Ubuntu 22.04.5 LTS
  • Docker 29.2.1
  • CLP package version 0.9.1-dev

Reproduction steps

  1. Build the package: task
  2. Start CLP: cd build/clp-package && ./sbin/start-clp.sh
  3. Compress some data: ./sbin/compress.sh --dataset myds --timestamp-key timestamp ~/samples/postgresql.jsonl
  4. Get an archive ID: ls var/data/archives/myds/
  5. Attempt any decompress subcommand, e.g.: ./sbin/decompress.sh j <archive_id> --dataset myds
  6. Observe the ImportError. The same error occurs for ./sbin/decompress.sh x <path> and ./sbin/decompress.sh i <msg_ix> --orig-file-path <path>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions