Repository navigation
Close the Content Library 5391 schema gaps - #128
Merged
Merged
Conversation
The Content Library entry is either Splunkbase app_id 5391 (any name) or a local entry named DA-ITSI-ContentLibrary. Validation now enforces the closed structure from the review: - install_all_apps must be a bool when set; a quoted "true" is rejected. - install_all_apps: true with content_pack_apps present (even empty) is rejected, so the either/or rule checks key presence. - content_pack_install and force_run_playbook_after_restart reject null as well as non-bool values; a null would make the role skip the pack. - DA-ITSI-ContentLibrary is reserved for the library; any other entry (Splunkbase or local, with or without itsi_content_pack) is rejected. - Local library entries reject app_id, and path must be a non-empty string. - Pack names are compared without surrounding whitespace. - update_mode is accepted on the library entry (the role honors it). - install_all_apps is a catalog key, so spa config explain resolves it. Tests cover each rule; guard tests pin the non-object pack item and the default splunkbase source. Co-authored-by: Cursor <cursoragent@cursor.com>
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
Enforces a closed schema for the ITSI Content Library entry. The entry is either Splunkbase
app_id: 5391(any name) orsource: localnamedDA-ITSI-ContentLibrary. Pack names and playbook paths stay flexible.Follows the independent review of the change set.
Rules now enforced
install_all_appsmust be a bool when set. A quoted"true"is rejected.install_all_apps: truewithcontent_pack_appspresent (even empty) is rejected.content_pack_installandforce_run_playbook_after_restartreject null and non-bool values.DA-ITSI-ContentLibraryis reserved for the library. Any other entry is rejected.app_id, andpathmust be a non-empty string.update_modeis accepted on the library entry. Other unknown keys are rejected, anddeployment_targetstays rejected.install_all_appsis a catalog key, sospa config explainresolves it.Other
spa apps add 5391 --install-all-content-packswrites top-levelinstall_all_apps: true, the key theapps_itsi_content_packrole reads.Test plan
./tests/run_local_tests.shpasses on the committed state (1508 passed). One test fails only in the exported archive used for that check, because it had no.gitdirectory.tests/test_docs.pydrift checks pass.docs/commands.mdanddocs/config.mddid not need regenerating.