Skip to content

deploy related -> content variant issue #24

Description

@m1ci

Following command fails:

python3 -m databusclient deploy --versionid https://databus.openflaas.de/milandoj/group-1/artifact-1/version-1 --title "version-1 title" --abstract "version abstract" --description "version description" --license http://dalicc.net/licenselibrary/AdaptivePublicLicense10 --apikey KEYYYYY 'https://data.openflaas.de/milandoj/group-1/artifact-1/version-1/file.txt.bz2'
https://databus.openflaas.de/milandoj/group-1/artifact-1/version-1
Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/databusclient/__main__.py", line 3, in <module>
    cli.app()
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/typer/main.py", line 500, in wrapper
    return callback(**use_params)  # type: ignore
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/databusclient/cli.py", line 20, in deploy
    dataid = client.createDataset(versionId,title,abstract,description,license,distributions)
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/databusclient/client.py", line 143, in createDataset
    (name, cvs, formatExtension, compression, contentLength, sha256sum) = __getFileInfo(artifactName, dst_string)
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/databusclient/client.py", line 89, in __getFileInfo
    cvs = __getCVs(distribution_str)
  File "/Users/milan/Library/Python/3.7/lib/python/site-packages/databusclient/client.py", line 13, in __getCVs
    cv_str = args[1].strip("_")
IndexError: list index out of range

Activity

  1. m1ci commented on Oct 22, 2025

    @m1ci
    Author

    another command that does not work - also related to content variants

    python3 -m databusclient deploy --versionid https://databus.openflaas.de/milandoj/group-1/artifact-1/version-1 --title "version-1 title" --abstract "version abstract" --description "version description" --license http://dalicc.net/licenselibrary/AdaptivePublicLicense10 --apikey KEY 'https://data.openflaas.de/milandoj/group-1/artifact-1/version-1/file.txt.bz2||txt|bz2|54407588e5aec9f4ba03778ed979393621a9bd6354aa17ca2b405ad3a172f2de:45'
    
  2. changed the title [-]content variant related issue[/-] [+]deploy related -> content variant issue[/+] on Oct 23, 2025
  3. added
    deployIssue related to data deploy functionality from databus
    on Oct 27, 2025
  4. AggarwalKashvi commented on Jan 2, 2026

    @AggarwalKashvi

    Hi! if no one is working on it I would like to take up this issue

  5. vaibhav45sktech commented on Jan 3, 2026

    @vaibhav45sktech
    Contributor

    Greetings @m1ci . I’d like to take ownership of this issue and work on a fix could you please assign it to me?

  6. agrim-git-hub commented on Jan 3, 2026

    @agrim-git-hub
    Contributor

    Hi @m1ci , I would like to take this up.

    I have analyzed the traceback and the cause is clear. The def get_content_variants() method in deploy.py strictly expects the distribution string to split into multiple parts. When a user provides a URL/filename that doesn't match this expected format , args ends up with fewer than 2 elements, causing the IndexError at args[1].strip("").

    What i suggest we can do:

    Add a defensive check inside def _get_content_variants() to verify len(args) >= 2 before accessing the index.

    If the check fails, raise a custom ValueError with a descriptive message (explaining the expected format) instead of letting the raw IndexError crash the application.

    Add a unit test with a malformed URL to verify the clean error handling.

    I am already set up and familiar with the codebase from my current work on the checksum feature (PR #44). I can implement this fix immediately.

  7. added a commit that references this issue on Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    deployIssue related to data deploy functionality from databus

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions