feat: separate CIM data models into standalone splunk-cim-models package#946
Open
mkolasinski-splunk wants to merge 4 commits intomainfrom
Open
feat: separate CIM data models into standalone splunk-cim-models package#946mkolasinski-splunk wants to merge 4 commits intomainfrom
mkolasinski-splunk wants to merge 4 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.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
datamodel_definition.py), 23 data model JSON schemas,CommonFields.json, andDatamodelSchema.jsoninto a new standalonesplunk-cim-modelspackagesplunk_cim_modelsinstead of internal modulesCIM_Models/datamodel_definition.pywith deprecation warningMotivation
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:
Changes
splunk-cim-models/pytest_splunk_addon/splunk.pydatamodelsfromsplunk_cim_modelspytest_splunk_addon/app_test_generator.pyDATA_MODELS_PATHfromsplunk_cim_modelspytest_splunk_addon/cim_tests/test_generator.pyCOMMON_FIELDS_PATHfromsplunk_cim_modelspytest_splunk_addon/cim_tests/json_schema.pyDATAMODEL_SCHEMA_PATHfromsplunk_cim_modelspyproject.tomlsplunk-cim-modelspath dependencyCIM_Models/datamodel_definition.pysplunk_cim_modelspathsTest plan
test-splunk-unit)splunk_app_cim_fiction,splunk_app_cim_broken,splunk_cim_model)test-splunk-external)Made with Cursor