Skip to content

Rename Collection content item to Knowledge - #5494

Open
mmhw wants to merge 3 commits into
masterfrom
MW/CRTX-253957/rename-collection-to-knowledge
Open

Rename Collection content item to Knowledge#5494
mmhw wants to merge 3 commits into
masterfrom
MW/CRTX-253957/rename-collection-to-knowledge

Conversation

@mmhw

@mmhw mmhw commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Renames the Collection content item type to Knowledge across the SDK. The Collection feature (#5393) is already merged into master; this PR renames its Python classes, content types, directory, and source field, while preserving the server-side contract keys unchanged.

Changes

Renamed (classes / types / files)

  • Collection -> Knowledge (object model, parser, strict object, old pack object)
  • CollectionParser -> KnowledgeParser, StrictCollection -> StrictKnowledge, InvalidCollectionFileName -> InvalidKnowledgeFileName
  • ContentType.COLLECTION ("Collection") -> ContentType.KNOWLEDGE ("Knowledge")
  • FileType.COLLECTION ("collection") -> FileType.KNOWLEDGE ("knowledge")
  • COLLECTIONS_DIR = "Collections" -> KNOWLEDGE_DIR = "Knowledge" (folder is singular)
  • Files: objects/knowledge.py, parsers/knowledge.py, strict_objects/knowledge.py, schemas/knowledge.yml, pack_objects/knowledge/, TestSuite/knowledge.py, assets/default_knowledge/knowledge-sample.yml
  • Source YAML field collectionids -> knowledgeids

Preserved (server contract — intentionally unchanged)

  • server_name / metadata_name: agentixknowledgecollection
  • Unifier target key: systemknowledgecollectionids

Notes

  • Added an as_folder special-case so the Knowledge folder stays singular (Knowledge).

Testing

  • validate_content_path_test.py and agentix_markdown_unifier_test.py: 235 passed
  • ruff check: clean

@mmhw
mmhw requested a review from a team as a code owner August 12, 2026 12:41
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

🚫 SDK Nightly required

This PR modifies files that require the SDK Nightly pipeline to be run before it can be merged:

  • demisto_sdk/commands/content_graph/common.py
  • demisto_sdk/commands/content_graph/interface/neo4j/queries/validations.py
  • demisto_sdk/commands/content_graph/objects/__init__.py
  • demisto_sdk/commands/content_graph/objects/agentix_agent.py
  • demisto_sdk/commands/content_graph/objects/pack.py
  • demisto_sdk/commands/content_graph/objects/pack_content_items.py
  • demisto_sdk/commands/content_graph/parsers/__init__.py
  • demisto_sdk/commands/content_graph/parsers/agentix_agent.py
  • demisto_sdk/commands/content_graph/parsers/pack.py
  • demisto_sdk/commands/content_graph/strict_objects/agentix_agent.py
  • demisto_sdk/commands/validate/validators/GR_validators/GR105_duplicate_content_id.py
  • demisto_sdk/commands/validate/validators/GR_validators/GR109_is_supported_modules_compatibility.py
  • demisto_sdk/commands/validate/validators/GR_validators/GR109_is_supported_modules_compatibility_all_files.py
  • demisto_sdk/commands/validate/validators/GR_validators/GR109_is_supported_modules_compatibility_list_files.py
  • demisto_sdk/commands/validate/validators/GR_validators/GR116_is_agent_total_token_budget.py
  • demisto_sdk/commands/content_graph/objects/knowledge.py
  • demisto_sdk/commands/content_graph/parsers/knowledge.py
  • demisto_sdk/commands/content_graph/strict_objects/knowledge.py

Required action:

  1. Run the SDK Nightly pipeline against this branch.
  2. Add a link to the nightly run in this PR's description.
  3. Add the nightly-run-passed label once the run has passed (or nightly-run-skipped if you have a documented reason not to run it, with reviewer approval).
Alternative: run a Content build instead of the full SDK Nightly (click to expand)

If your change is scoped (e.g. a single new validator or a small bug fix), you can run a Content build against this SDK branch instead of the full SDK Nightly pipeline. When your change is a new validator, make sure it is registered in the Content repo's validation_config.toml so the Content build's run-validations job picks it up via demisto-sdk validate -a (the -a "all files" mode is what run-validations uses; a -g "git-diff" run will not exercise your new validator on unchanged files). Once the Content build is green, add the nightly-run-passed label to satisfy this gate.

This check will re-run automatically when a label is added or removed.

@github-actions

Copy link
Copy Markdown

Changelog(s) in markdown:

  • Renamed the Collection content item type to Knowledge. #5494

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