Skip to content

feat!: separate CIM data models into standalone splunk-cim-models package [BREAKING]#946

Open
mkolasinski-splunk wants to merge 12 commits intomainfrom
feat/cim-separation
Open

feat!: separate CIM data models into standalone splunk-cim-models package [BREAKING]#946
mkolasinski-splunk wants to merge 12 commits intomainfrom
feat/cim-separation

Conversation

@mkolasinski-splunk
Copy link
Contributor

@mkolasinski-splunk mkolasinski-splunk commented Feb 13, 2026

⚠️ Breaking Change

`splunk-cim-models` is no longer a runtime dependency of PSA. It is now a dev-only dependency (used only for PSA's own tests).

Add-ons must declare `splunk-cim-models` in their own dependencies to control CIM version independently — this is the core purpose of the separation.

Summary

  • Extract CIM version definitions, 23 data model JSON schemas, `CommonFields.json`, and `DatamodelSchema.json` into a new standalone `splunk-cim-models` package
  • Update PSA to import CIM data from `splunk_cim_models` instead of internal modules
  • Keep backward-compat stub in `CIM_Models/datamodel_definition.py` with deprecation warning
  • `splunk-cim-models` declared as dev dependency — add-ons own their 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:

  • Independent CIM version releases without touching PSA
  • Add-ons can pin/control CIM version in their own dependencies
  • Cleaner separation of test framework logic vs. CIM data

psa-cim-models Package

Add-on Validation

Both add-ons use PSA `feat/cim-separation` but differ only in CIM version — proving the decoupling works:

Add-on PSA branch CIM models
splunk-add-on-for-microsoft-office-365 feat/cim-separation psa-cim-models@v1 (CIM v5)
splunk-add-on-for-box feat/cim-separation psa-cim-models@v2 (CIM v6)

Jira

https://splunk.atlassian.net/browse/ADDON-85727

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
@mkolasinski-splunk mkolasinski-splunk requested a review from a team as a code owner February 13, 2026 07:12
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.
@mkolasinski-splunk mkolasinski-splunk changed the title feat: separate CIM data models into standalone splunk-cim-models package feat!: separate CIM data models into standalone splunk-cim-models package [BREAKING] Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant