Skip to content

resubmit with_more_mem_on_failure fails lint #182

@tchaussepiedifb

Description

@tchaussepiedifb

Hello

During upgrading to Galaxy 25.0/25.1 (and TPV 2.4/3.1.3) on usegalaxy.fr, the following TPV configuration fails linting:

resubmit:
  with_more_mem_on_failure:
    condition: memory_limit_reached and attempt <= 3
    destination: tpv_dispatcher
    delay: 'attempt * 30'

Linting produces this error:

ERROR: tpv.commands.linter: Linting failed due to syntax errors in yaml file: 1 validation error for TPVConfig
tools.default.resubmit.with_more_mem_on_failure
  Input should be a valid string [type=string_type, input_value={'condition': 'memory_lim...'delay': 'attempt * 30'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.11/v/string_type
INFO : tpv.commands.shell: lint failed.
lint failed, 'tool_defaults.yml' was not copied

Previously (TPV 2.4), this format worked correctly.

Locally, I patched the type hint:

# tpv/core/entities.py & tpv/commands/type_check_template.j2
# resubmit: Optional[Dict[str, str]]  ->  resubmit: Optional[Dict[str, Any]]

After this change, the format is accepted by the linter again.

Are we using the TPV incorrectly or is this a bug ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions