Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travel tasks only accept == modifier #69

Open
DiTo97 opened this issue Nov 19, 2022 · 0 comments
Open

Travel tasks only accept == modifier #69

DiTo97 opened this issue Nov 19, 2022 · 0 comments

Comments

@DiTo97
Copy link

DiTo97 commented Nov 19, 2022

Generally, the definition of a Travel task has the following form:

tasks:
  <phase>:
    <step>:
      - task: <travel-task-package><modifier><version>
        name: <travel-task-name>
        config:
          .
          .
          .

where <travel-task-package> can either be a published package (e.g., on PyPI) or a local bag.

The problem is that, unless the optional arg python_module is provided, the only accepted <modifier> is ==, whereas all of them should be supported as in the function sanitize_versioned_package.

At the moment, a Travel task like the following crashes:

tasks:
  <phase>:
    <step>:
      - task: traveltask_google_artifact_registry~=0.0.1
        name: <travel-task-name>
        config:
          .
          .
          .

with the following error:

Traceback (most recent call last):
    ...
ModuleNotFoundError: No module named 'traveltask_google_artifact_registry~=0'

Implementing a fix should be quite easy since the file pip_sanitizers.py already has all the logic to check for different modifiers, and assert that any resulting split is a valid package.

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

No branches or pull requests

1 participant