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

Schema validation: fails for "molecule.yml" : pipelining: true not allowed as an option to ssh_connection in the provisioner schema #3714

Closed
fredflev opened this issue Oct 31, 2022 · 1 comment
Labels

Comments

@fredflev
Copy link
Contributor

fredflev commented Oct 31, 2022

Issue Type

  • Bug report

Molecule and Ansible details

ansible --version && molecule --version
ansible [core 2.13.5]
  config file = /Users/REDACTED/.ansible.cfg
  configured module search path = ['/Users/REDACTED/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/REDACTED/workspace/.venv/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/REDACTED/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/REDACTED/workspace/.venv/bin/ansible
  python version = 3.10.8 (main, Oct 13 2022, 10:17:43) [Clang 14.0.0 (clang-1400.0.29.102)]
  jinja version = 3.1.2
  libyaml = True
molecule 4.0.3 using python 3.10 
    ansible:2.13.5
    delegated:4.0.3 from molecule
    docker:2.1.0 from molecule_docker requiring collections: community.docker>=3.0.2 ansible.posix>=1.4.0

Molecule installation method (one of):

  • pip

Ansible installation method (one of):

  • pip

Detail any linters or test runners used:

Desired Behavior

No error when running schema validation with the following provisioner config in molecule.yml

provisioner:
  config_options:
    ssh_connection:
      pipelining: true

Actual Behaviour

Schema validation fails:

molecule -vvv test  
DEBUG    Validating schema /Users/REDACTED_USER/REDACTED_ROLE_NAME/molecule/default/molecule.yml.
CRITICAL Failed to validate /Users/REDACTED_USER/REDACTED_ROLE_NAME/molecule/default/molecule.yml

["Additional properties are not allowed ('pipelining' was unexpected)"]

Removing pipelining: true from molecule.yml let me run molecule without issue since the schema validation does not fail anymore.

    ssh_connection:
      pipelining: true

It seems that pipelining is not one of the valid option in the schema and adding it or maybe setting "additionalProperties": true would fix the config validation issue I am now running into since schema validation has been implemented/moved into molecule.

https://github.com/ansible-community/molecule/blob/f8d08dff973e8e65cdac81a804cdb8015925fabe/src/molecule/data/molecule.json#L416-L429

REM: It seems a bit restrictive to only allow. control_path and scp_if_ssh as ssh_connection properties.

@fredflev fredflev added the bug label Oct 31, 2022
@fredflev fredflev changed the title Allow pipelining: true as an option to ssh_connection in the provisioner schema Schema validation: fails for "molecule.yml" : pipelining: true not allowed as an option to ssh_connection in the provisioner schema Oct 31, 2022
@zhan9san
Copy link
Contributor

It seems that pipelining is not one of the valid option in the schema and adding it or maybe setting "additionalProperties": true would fix the config validation issue I am now running into since schema validation has been implemented/moved into molecule.

@fredflev

You are absolutely right. Could you plz submit a PR to fix it?

@ssbarnea

There are many options in ssh_connection connection plugin.

It will make this schema bigger if we add each option in it.

So I think "additionalProperties": true is acceptable as well as other model which may contains many options.

Let me know if you have any concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants