Binding of oslo.config causes oslo.log to not be usable within a pack
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
ISSUE TYPE
- Bug Report
STACKSTORM VERSION
2.7.2
OS / ENVIRONMENT / INSTALL METHOD
one-line install
SUMMARY
StackStorm requires a specific version of oslo.config. This version does not support mutable as an argument.
The newer versions of oslo.config do.
The issue is that when installing a newer version of oslo.log, it will depend upon this setting. So any packs which inadvertantly use oslo.log will crash.
STEPS TO REPRODUCE
- Create a pack with the dependency
oslo.log>1.8.0 - Create an action with
from oslo_log import log as logging
LOG = logging.getLogger(__name__)
EXPECTED RESULTS
No error :-)
ACTUAL RESULTS
Traceback (most recent call last):
File "/opt/stackstorm/runners/python_runner/python_runner/python_action_wrapper.py", line 320, in <module>
obj.run()
File "/opt/stackstorm/runners/python_runner/python_runner/python_action_wrapper.py", line 178, in run
action = self._get_action_instance()
File "/opt/stackstorm/runners/python_runner/python_runner/python_action_wrapper.py", line 231, in _get_action_instance
raise exc_cls(msg)
TypeError: Failed to load action class from file "/opt/stackstorm/packs/infoblox/actions/get_object.py" (action file most likely doesn't exist or contains invalid syntax): __init__() got an unexpected keyword argument 'mutable'
Traceback (most recent call last):
File "/opt/stackstorm/runners/python_runner/python_runner/python_action_wrapper.py", line 224, in _get_action_instance
actions_cls = action_loader.register_plugin(Action, self._file_path)
File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/loader.py", line 173, in register_plugin
module = imp.load_source(module_name, plugin_abs_file_path)
File "/opt/stackstorm/packs/infoblox/actions/get_object.py", line 1, in <module>
from lib.action import InfobloxBaseAction
File "/opt/stackstorm/packs/infoblox/actions/lib/action.py", line 2, in <module>
from infoblox_client import connector
File "/opt/stackstorm/virtualenvs/infoblox/lib/python2.7/site-packages/infoblox_client/connector.py", line 27, in <module>
from oslo_log import log as logging
File "/opt/stackstorm/virtualenvs/infoblox/lib/python2.7/site-packages/oslo_log/log.py", line 47, in <module>
from oslo_log import _options
File "/opt/stackstorm/virtualenvs/infoblox/lib/python2.7/site-packages/oslo_log/_options.py", line 39, in <module>
help='If set to true, the logging level will be set to '
File "/opt/stackstorm/st2/lib/python2.7/site-packages/oslo_config/cfg.py", line 982, in __init__
super(BoolOpt, self).__init__(name, type=types.Boolean(), **kwargs)
TypeError: __init__() got an unexpected keyword argument 'mutable'
ACTION INPUT
No Input
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the pack dependency and action import described in the issue, then inspect python_runner/python_runner/python_action_wrapper.py alongside the reported oslo_config and oslo_log traceback. Confirm that an action using oslo.log loads without the unexpected mutable argument error; the issue does not name a repository test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100