feat!: separate CIM data models into standalone splunk-cim-models package [BREAKING]#949
Merged
mkolasinski-splunk merged 16 commits intomainfrom Mar 27, 2026
Merged
feat!: separate CIM data models into standalone splunk-cim-models package [BREAKING]#949mkolasinski-splunk merged 16 commits intomainfrom
mkolasinski-splunk merged 16 commits intomainfrom
Conversation
Extract CIM version definitions (datamodel_definition.py), data model JSON schemas (23 files), CommonFields.json, and DatamodelSchema.json into a new splunk-cim-models package. This enables independent CIM version releases without requiring a full PSA release. Changes: - Create splunk-cim-models/ package with setuptools build backend - Update splunk.py to import datamodels from splunk_cim_models - Update app_test_generator.py to use DATA_MODELS_PATH from splunk_cim_models - Update cim_tests/test_generator.py to use COMMON_FIELDS_PATH from splunk_cim_models - Update cim_tests/json_schema.py to use DATAMODEL_SCHEMA_PATH from splunk_cim_models - Add splunk-cim-models as path dependency in pyproject.toml - Keep backward-compat stub in CIM_Models/datamodel_definition.py with deprecation warning - Update unit tests to expect new package paths
Change splunk-cim-models dependency from path reference to standard version constraint so pip consumers (e.g. TAs) can specify their own source for splunk-cim-models without conflicting with PSA's internal path reference in the built wheel metadata.
The test-splunk-external job's Test step never exported GH_TOKEN to the runner environment, so docker-compose couldn't pass it through to the container (even though docker-compose-ci.yml declared '- GH_TOKEN'). Without the token, entrypoint.sh had no credentials to clone the private psa-cim-models repo, causing poetry install to fail entirely.
Fixes pre-commit failure in CI run 22754142433.
test_splunk_cim_model asserts a fixed list of field names drawn from the v2 Change data model (e.g. All_Changes::result). That field doesn't exist in v1, so the assertion always fails for the 1.x matrix cell. Switch the test-cim-models-versions job to splunk_app_cim_fiction, which uses --splunk-dm-path with local fiction data models. Expected outcomes are identical across all splunk-cim-models versions, while all PSA import paths (COMMON_FIELDS_PATH, DATAMODEL_SCHEMA_PATH, datamodels) are still exercised -- an incompatible package will surface as a collection or runtime error. splunk_cim_model stays in test-splunk-matrix where it runs with the default v2 dev dependency and its version-specific field assertions are valid.
dkaras-splunk
approved these changes
Mar 27, 2026
Contributor
|
🎉 This PR is included in version 7.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
splunk-cim-modelsis no longer a runtime dependency of PSA. Itis now a dev-only dependency (used only for PSA's own tests).
Add-ons must declare
splunk-cim-modelsin their own dependenciesto control CIM version independently — this is the core purpose of the
separation.
Summary
CommonFields.json, andDatamodelSchema.jsoninto a new standalonesplunk-cim-modelspackage
splunk_cim_modelsinstead ofinternal modules
CIM_Models/datamodel_definition.pywith deprecation warning
splunk-cim-modelsdeclared as dev dependency — add-ons owntheir CIM version
Motivation
Every CIM version bump (4.18 → 5.x → 6.x) currently forces a full PSA
release even though only data changes. Separating CIM data into its own
package enables:
psa-cim-models Package
v1: CIM v5.5.2 era models (for add-ons still on PSA 5.x)v2: CIM v6.4.0 era models (for PSA 6.x add-ons)Add-on Validation
Both add-ons use PSA
feat/cim-separationbut differ only in CIMversion — proving the decoupling works:
Jira
https://splunk.atlassian.net/browse/ADDON-85727
BREAKING CHANGE: splunk-cim-models is no longer a runtime dependency of PSA. Add-ons must declare it in their own dependencies to control CIM version independently.