-
Notifications
You must be signed in to change notification settings - Fork 666
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Molecule 5.0 Failing on GitHub Action #3883
Comments
I could have observed the same bug on my GitHub action: https://github.com/kmezynski/ansible-role-ohmyzsh/actions/runs/4756760785/jobs/8452737921. No changes to the role itself were made since last successful build on 19th April. By just looking on the traceback and most recent changes to the molecule's code, I'd start debugging from #3874. |
PRs are more than welcomed but support questions should go to discussions. I am not sure if this counts as support or a real bug so I will not move it to discussions yet. |
Molecule 5.0 Failing on GitHub Action: ansible/molecule#3883
Related to ansible/molecule#3883 Related to #12
The original reporter had a GitHub Action that ran The same is true for the
This no longer works in 5.0.0:
The replacement is documented:
It would be nice if the error message was clearer instead of simply raising |
- ansible/molecule#3883 - Ansible Compat PIN, da neuere Versionen Ansible > 2.12 erfordern
- ansible/molecule#3883 - Ansible Compat PIN, da neuere Versionen Ansible > 2.12 erfordern, ansible/ansible-compat#215
- ansible/molecule#3883 - Ansible Compat PIN, da neuere Versionen Ansible > 2.12 erfordern, ansible/ansible-compat#215
- ansible/molecule#3883 - Ansible Compat PIN, da neuere Versionen Ansible > 2.12 erfordern, ansible/ansible-compat#215
I was also impacted by this today and here is a proposition to make it clear in the documentation (#3899). |
If one upgrade from previous molecule versions, and since drivers are now provided by the molecule-plugins, molecule-podman|docker|vagrant packages needs to be removed. See: - ansible#3883 - ansible#3895
If one upgrade from previous molecule versions, and since drivers are now provided by the molecule-plugins, molecule-podman|docker|vagrant packages needs to be removed. See: - ansible#3883 - ansible#3895
A crude hack for this would be something like:
This would improve the situation, as a backtrace for missing driver is bad. |
So to confirm the fix is to change It would be good to have some sort of error message when the failure happens |
If someone try installing plugins (say docker) with molecule[docker], nothing will get installed as it should be molecule-plugins or molecule-plugins[docker]. This leads to a python backtrace similar to the one found in ansible#3883. This should be handled properly, so check that the driver is in api.drivers() before trying to get the value. Signed-off-by: Arnaud Patard <[email protected]>
Molecule has moved the various drivers into a new molecule-plugins package, see ansible/molecule#3883
If someone try installing plugins (say docker) with molecule[docker], nothing will get installed as it should be molecule-plugins or molecule-plugins[docker]. This leads to a python backtrace similar to the one found in ansible#3883. This should be handled properly, so check that the driver is in api.drivers() before trying to get the value. Signed-off-by: Arnaud Patard <[email protected]>
…itHub Actions (#202) * fix(ansible-lint): FQDN and `name` * fix(ansible-lint): add `name` and FQDN for module call * fix(ansible-lint): add `name` to tasks and FQDN for module * fix(ansible-lint): add task `name` and FQDN for module calls * fix(ansible-lint): last `include_tasks` * fix(ansible-lint): add task names and FQDN * refactor: `Ensure` to `Run` * [skip ci]refactor: add exist and seperate ensure installed node task, mention build cluster * [skip ci]refactor: Pipe seperator * [skip ci]refactor: run * refactor: remove quotes as other files don't use them For templated vars in task name * [skip ci]refactor: task names, use `Run` * [skip ci]refactor: use variable name in task name * [skip ci]refactor: task names * [skip ci]refactor: add service mgr in task name * [skip ci]refactor: add task names and module FQDNs * [skip ci]refactor: fix task name * [skip ci]refactor: add - * [skip ci]refactor: include task names and FQDNs * [skip ci]refactor: add task names and FQDNs * [skip ci]: ignore `name[template]` * refactor: `when` clause for `block` should be before `block` * fix: ansible/molecule#3883 * refactor: molecule lint command was removed in version `5.0.0` Use separate CI job step to run linting instead. * [skip ci]refactor: noqa for command tasks Subject to change * refactor: use Ubuntu 22.04 Suspect issues with Molecule tests are related to cgroups v2.
Molecule has moved the various drivers into a new molecule-plugins package, see ansible/molecule#3883
Molecule has moved the various drivers into a new molecule-plugins package, see ansible/molecule#3883
Molecule has moved the various drivers into a new molecule-plugins package, see ansible/molecule#3883
Probably won't work until ansible/molecule#3883 is fixed.
If one upgrade from previous molecule versions, and since drivers are now provided by the molecule-plugins, molecule-podman|docker|vagrant packages needs to be removed. See: - #3883 - #3895 Co-authored-by: Daniel Ziegenberg <[email protected]>
If someone try installing plugins (say docker) with molecule[docker], nothing will get installed as it should be molecule-plugins or molecule-plugins[docker]. This leads to a python backtrace similar to the one found in #3883. This should be handled properly, so check that the driver is in api.drivers() before trying to get the value. Signed-off-by: Arnaud Patard <[email protected]> Co-authored-by: Daniel Ziegenberg <[email protected]> Co-authored-by: Sorin Sbarnea <[email protected]>
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Issue Type
Molecule and Ansible details
Molecule installation method (one of):
Ansible installation method (one of):
Detail any linters or test runners used:
Desired Behavior
Molecule not failing to run.
Actual Behaviour
Since release of molecule 5.0 my github action is failing with the following error:
https://github.com/dgibbs64/ansible-role-linux_admin_packages/actions/runs/4759492512/jobs/8458829447
Traceback (most recent call last):
File "/home/runner/.local/bin/molecule", line 8, in
sys.exit(main())
File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/runner/.local/lib/python3.10/site-packages/molecule/command/test.py", line 113, in test
base.execute_cmdline_scenarios(scenario_name, args, command_args, ansible_args)
File "/home/runner/.local/lib/python3.10/site-packages/molecule/command/base.py", line 94, in execute_cmdline_scenarios
get_configs(args, command_args, ansible_args, glob_str),
File "/home/runner/.local/lib/python3.10/site-packages/molecule/command/base.py", line 185, in get_configs
configs = [
File "/home/runner/.local/lib/python3.10/site-packages/molecule/command/base.py", line 186, in
config.Config(
File "/home/runner/.local/lib/python3.10/site-packages/molecule/config.py", line 64, in call
obj.after_init()
File "/home/runner/.local/lib/python3.10/site-packages/molecule/config.py", line 116, in after_init
self.config = self._reget_config()
File "/home/runner/.local/lib/python3.10/site-packages/molecule/config.py", line 306, in _reget_config
env = util.merge_dicts(os.environ, self.env)
File "/home/runner/.local/lib/python3.10/site-packages/molecule/config.py", line 201, in env
"MOLECULE_INSTANCE_CONFIG": self.driver.instance_config,
File "/usr/lib/python3.10/functools.py", line 981, in get
val = self.func(instance)
File "/home/runner/.local/lib/python3.10/site-packages/molecule/config.py", line 185, in driver
driver = api.drivers(config=self)[driver_name]
File "/home/runner/.local/lib/python3.10/site-packages/molecule/api.py", line 30, in getitem
return self.dict[i]
KeyError: 'docker'
The text was updated successfully, but these errors were encountered: