feat(gooddata-sdk): [AUTO] add knowledge document REST endpoint wrappers#1441
Closed
yenkins-admin wants to merge 1 commit intomasterfrom
Closed
feat(gooddata-sdk): [AUTO] add knowledge document REST endpoint wrappers#1441yenkins-admin wants to merge 1 commit intomasterfrom
yenkins-admin wants to merge 1 commit intomasterfrom
Conversation
Adds CatalogKnowledgeService with create_document, upsert_document, get_document, list_documents, and delete_document methods wrapping the new afm-exec-api knowledge endpoints. Includes SDK model classes (CatalogKnowledgeDocumentMetadata, request/response DTOs) and exports them via gooddata_sdk.__init__ / GoodDataSdk.catalog_knowledge property. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1441 +/- ##
==========================================
+ Coverage 77.24% 77.40% +0.16%
==========================================
Files 227 229 +2
Lines 14672 14807 +135
==========================================
+ Hits 11334 11462 +128
- Misses 3338 3345 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Adds SDK wrapper layer for the five new knowledge document REST endpoints (create, upsert, list, get, delete) introduced in afm-exec-api.
Problem ID: P008 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/23194184862
What changed in gdc-nas
2724d20feat(gen-ai): add get/list operations + cleanup — Major proto surface cleanup:IngestKnowledgeDocumentRequest/Responseremoved (legacy),UpdateKnowledgeDocumentRequestrenamed toUpsertKnowledgeDocumentRequest,CreateKnowledgeDocumentResponse+UpdateKnowledgeDocumentResponsecollapsed intoWriteKnowledgeDocumentResponse,KnowledgeDocumentrenamed toKnowledgeSearchResultwith newworkspace_id/title/scopesfields, newKnowledgeDocumentMetadatamessage, newGetKnowledgeDocumentRequest/ResponseandListKnowledgeDocumentsRequest/Responsemessages, newget_knowledge_documentandlist_knowledge_documentsRPCs.5086919feat(afm-exec-api): expose knowledge document REST endpoints — Adds full CRUD REST endpoints:POST /documents,PUT /documents,GET /documents,GET /documents/{filename},DELETE /documents/{filename}. All endpoints hidden from OpenAPI and delegate to gen-ai gRPC service.337418ffeat(afm-exec-api): gate knowledge endpoints onenableGenAIChatFF — All 6 knowledge endpoints gated onENABLE_GEN_AI_CHATfeature flag viaFeatureFlagResolver, matching the pattern used byAIControllerandAgenticWorkflowsController.039f820fix(afm): knowledge return 404 + refactor —GET /documents/{filename}now returns HTTP 404 (NotFoundException) when document is not found (was 200+null).GetKnowledgeDocumentResponseDtowrapper removed; endpoint returnsKnowledgeDocumentMetadataDtodirectly. SharedtoMetadataDto()helper extracted.What was implemented in SDK
Created
CatalogKnowledgeServicewrapping the five new afm-exec-api knowledge document REST endpoints. Added@attrs.definemodel classes for all request/response DTOs. Wired the service intoGoodDataSdkvia acatalog_knowledgeproperty and exported all new public classes fromgooddata_sdk.__init__. Unit tests cover model construction,as_api_model()serialization, and service method delegation usingMagicMock.Files modified
packages/gooddata-sdk/src/gooddata_sdk/catalog/knowledge/__init__.py(new)packages/gooddata-sdk/src/gooddata_sdk/catalog/knowledge/declarative_model/__init__.py(new)packages/gooddata-sdk/src/gooddata_sdk/catalog/knowledge/declarative_model/knowledge_document.py(new) —CatalogKnowledgeDocumentMetadataand request/response model classespackages/gooddata-sdk/src/gooddata_sdk/catalog/knowledge/service.py(new) —CatalogKnowledgeServicewith create, upsert, get, list, delete methodspackages/gooddata-sdk/src/gooddata_sdk/sdk.py—catalog_knowledgeproperty wired inpackages/gooddata-sdk/src/gooddata_sdk/__init__.py— new public exports addedpackages/gooddata-sdk/tests/catalog/knowledge/__init__.py(new)packages/gooddata-sdk/tests/catalog/knowledge/test_knowledge_document_service.py(new) — unit tests usingMagicMockJIRA: PENDING (Jira ticket will be created after review)
Risk: Low