8000 Use api to get driver schema file by apatard · Pull Request #3898 · ansible/molecule · GitHub
[go: up one dir, main page]

Skip to content

Use api to get driver schema file - #3898

Merged
ssbarnea merged 1 commit into
ansible:mainfrom
apatard:molecule_driver_json
Apr 28, 2023
Merged

ssbarnea merged 1 commit into
ansible:mainfrom
apatard:molecule_driver_json

Conversation

@apatard
@apatard apatard commented Apr 26, 2023
Copy link
Copy Markdown
Contributor

Current code is assuming that the molecule driver are inside a molecule_$driver python resource, which is not the case. For instance, vagrant plugin is in molecule_plugins.

As a solution:

  • extend driver class to provide a schema_file() member, allowing to return a path to the driver.json file,
  • replace schema_v3 code to use molecule api and get the schema file path thanks to the new schema_file().

@apatard
apatard commented Apr 26, 2023
Copy link
Copy Markdown
Contributor Author

Opening the PR as draft, since I'd like testing and comments

@apatard apatard mentioned this pull request Apr 26, 2023
apatard added a commit to apatard/molecule-plugins that referenced this pull request Apr 27, 2023
Add molecule vagrant schema json file.
Requires ansible/molecule#3898.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
@apatard
apatard force-pushed the molecule_driver_json branch from 491e416 to e54e87c Compare April 28, 2023 12:04
Current code is assuming that the molecule driver are inside
a molecule_$driver python resource, which is not the case.
For instance, vagrant plugin is in molecule_plugins.

As a solution:
- extend driver class to provide a schema_file() member,
  allowing to return a path to the driver.json file,
- replace schema_v3 code to use molecule api and get the
  schema file path thanks to the new schema_file().

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
@apatard
apatard marked this pull request as ready for review April 28, 2023 12:04
@apatard
apatard requested review from a team as code owners April 28, 2023 12:04
@apatard
apatard requested review from cidrblock, priyamsahoo, ssbarnea and zhan9san and removed request for a team April 28, 2023 12:04
@ssbarnea ssbarnea added the bug label Apr 28, 2023
8000
@ssbarnea
ssbarnea merged commit 400a3b7 into ansible:main Apr 28, 2023
apatard added a commit to apatard/molecule-plugins that referenced this pull request Apr 28, 2023
Add molecule vagrant schema json file.
Requires ansible/molecule#3898.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
apatard added a commit to apatard/molecule-plugins that referenced this pull request Apr 28, 2023
Add molecule vagrant schema json file.
Requires ansible/molecule#3898.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
@avanderm
avanderm commented Jun 1, 2023 •
Copy link
Copy Markdown

Started getting failures today with molecule-podman version 2.0.3 (molecule version 5.0.1):

FileNotFoundError: [Errno 2] No such file or directory: '/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/molecule_podman/driver.json'

EDIT: nvm, checked referenced issue and CI/CD process was still using molecule-podman instead of molecule-plugins

apatard added a commit to apatard/molecule-plugins that referenced this pull request Jun 26, 2023
Add molecule vagrant schema json file.
Requires ansible/molecule#3898.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0