splunk / splunk/pytest-splunk-addon
7.0.4 fails to import: splunk_cim_models is unpublished and its source repo is 404
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 66
- Forks
- 21
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 2
Description
pytest_splunk_addon/splunk.py imports splunk_cim_models at module top level. That module is registered as a pytest11 entry point, so pytest autoloads it before any marker filter is applied — every invocation fails with ModuleNotFoundError, not only CIM-marked runs.
splunk-cim-models is not on PyPI (404 for both splunk-cim-models and splunk_cim_models). pyproject.toml at tag v7.0.4 declares it only under [tool.poetry.group.dev.dependencies], sourced from https://github.com/splunk/psa-cim-models.git (branch cim-6), and that repository returns 404 to both git clone and the GitHub API.
-p no:splunk is not a workaround: that module defines every --splunk-* option, so disabling it makes pytest reject --splunk-hec-token and the rest.
Reproduced in clean venvs on Python 3.11.15 and 3.13.12 with pip install pytest-splunk-addon==7.0.4. The install succeeds; pytest startup then fails. Either publish splunk-cim-models, or make the import lazy so non-CIM markers can run.
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 with the module-level import in pytest_splunk_addon/splunk.py and review the splunk-cim-models declaration in pyproject.toml at tag v7.0.4. Reproduce startup in a clean environment with pytest-splunk-addon==7.0.4, including the --splunk-hec-token option. Done means pytest can start for non-CIM runs without ModuleNotFoundError while retaining the plugin's --splunk-* options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100