mathieu-lemay/pipeline-runner

pydantic_core._pydantic_core.ValidationError: 1 validation error for PipelineSpec...Extra inputs are not permitted

Closed this issue · 3 comments

Hello! First off, thank you for providing this tool!

I have just installed the tool via the instructions. Navigating to the project and running pipeline-runner list renders this error:

Traceback (most recent call last):
  File "/Users/x/.local/bin/pipeline-runner", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/x/.local/pipx/venvs/bitbucket-pipeline-runner/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/x/.local/pipx/venvs/bitbucket-pipeline-runner/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/x/.local/pipx/venvs/bitbucket-pipeline-runner/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/x/.local/pipx/venvs/bitbucket-pipeline-runner/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/x/.local/pipx/venvs/bitbucket-pipeline-runner/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/x/.local/pipx/venvs/bitbucket-pipeline-runner/lib/python3.12/site-packages/pipeline_runner/cli.py", line 179, in parse
    pipelines_definition = parse_pipeline_file(pipeline_file)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/x/.local/pipx/venvs/bitbucket-pipeline-runner/lib/python3.12/site-packages/pipeline_runner/parse.py", line 15, in parse_pipeline_file
    return PipelineSpec.model_validate(pipelines_data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/x/.local/pipx/venvs/bitbucket-pipeline-runner/lib/python3.12/site-packages/pydantic/main.py", line 568, in model_validate
    return cls.__pydantic_validator__.validate_python(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for PipelineSpec
pipelines.tags
  Extra inputs are not permitted [type=extra_forbidden, input_value={'rc-*': [{'step': {'name...php-deployment.yml']}}]}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.8/v/extra_forbidden

I have tags in my project like so:

  tags:
    rc-*:
      - step: ...
    admin-api-v*:
      - step: ...

I suppose tags aren't currently supported, so just looking for guidance on this. I just commented them out for testing and all is good. Thanks in advance!

Hi @jeitnier. Thanks for the bug report. You're right, tags are not supported yet, simply because I missed them... This should be pretty easy to add though.

I'll push a fix shortly.

I've released version 0.4.5, it should fix your issue.

I've released version 0.4.5, it should fix your issue.

Thank you so much for the quick turn around on that!