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

Use api to get driver schema file #3898

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

apatard
Copy link
Contributor

@apatard apatard commented Apr 26, 2023

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
Copy link
Contributor Author

apatard commented Apr 26, 2023

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>
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 ssbarnea, zhan9san, cidrblock and priyamsahoo and removed request for a team April 28, 2023 12:04
@ssbarnea ssbarnea added the bug label Apr 28, 2023
@ssbarnea ssbarnea merged commit 400a3b7 into ansible:main Apr 28, 2023
13 of 14 checks passed
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
Copy link

avanderm commented Jun 1, 2023

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.

None yet

3 participants