Skip to content

feat(gooddata-sdk): [AUTO] Add WRITE/READ_KNOWLEDGE_DOCUMENTS and BASE_UI_ACCESS permissions#1569

Open
yenkins-admin wants to merge 1 commit intomasterfrom
auto/openapi-sync-C007-20260420-r82171
Open

feat(gooddata-sdk): [AUTO] Add WRITE/READ_KNOWLEDGE_DOCUMENTS and BASE_UI_ACCESS permissions#1569
yenkins-admin wants to merge 1 commit intomasterfrom
auto/openapi-sync-C007-20260420-r82171

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Summary

Added test_organization_permission_validation to test_catalog_permission.py to cover the new BASE_UI_ACCESS org permission value. No SDK wrapper source changes were needed: the auto-generated gooddata-api-client already carries WRITE_KNOWLEDGE_DOCUMENTS, READ_KNOWLEDGE_DOCUMENTS (WorkspacePermission), and BASE_UI_ACCESS (OrganizationPermission) in its allowed_values dicts, and the SDK wrapper uses the dynamic value_in_allowed validator that reads those dicts at runtime.

Impact: enum_addition | Services: gooddata-metadata-client

Files changed

  • packages/gooddata-sdk/tests/catalog/test_catalog_permission.py

Agent decisions

Decisions (2)

no SDK wrapper source changes — Set status to implemented (test addition only) rather than no_changes

  • Alternatives: Add explicit constants or a TypeAlias for the new enum values, Mark as no_changes since no wrapper source changed
  • Why: The value_in_allowed validator in catalog/base.py reads allowed_values from the client_class() at runtime, so the new enum values propagate automatically from the auto-generated client. A test file change was still appropriate to assert all org permission values (including BASE_UI_ACCESS) are valid.

test approach for enum addition — Unit test using existing _validation_helper pattern without cassettes

  • Alternatives: Integration test with cassette, Skip test entirely since auto-generated client already validates
  • Why: The _validation_helper function only instantiates SDK objects; it makes no HTTP calls. No cassette is needed. The three existing workspace/datasource permission validation tests follow the same pattern, and adding the org-permission counterpart keeps the test suite symmetric.
Assumptions to verify (3)
  • The auto-generated gooddata-api-client in gooddata-api-client/ was already regenerated from the updated OpenAPI spec before this agent ran.
  • SELF_SERVICE_ENTITLEMENTS in the diff refers to the old OrganizationPermission that was replaced by SELF_CREATE_TOKEN in the current codebase; no renaming is needed in the SDK wrapper.
  • The WorkspacePermission diff only shows ANALYZE and VIEW as existing values for brevity; MANAGE, EXPORT, etc. already existed prior to this cluster.
Layers touched (1)
  • tests — Added test_organization_permission_validation unit test
    • packages/gooddata-sdk/tests/catalog/test_catalog_permission.py

Source commits (gdc-nas)

  • ba12e35 feat: enforce knowledge document permissions
  • 7c52d90 feat(afm-exec-api): gate knowledge APIs with enableAIKnowledge
  • 3d58a73 Merge pull request #20450 from peter-plochan/perm/base-ui-access
OpenAPI diff
       "WorkspacePermission": {
         "enum": [
           "ANALYZE",
+          "READ_KNOWLEDGE_DOCUMENTS",
+          "WRITE_KNOWLEDGE_DOCUMENTS",
           "VIEW"
         ]
       },
       "OrganizationPermission": {
         "enum": [
+          "BASE_UI_ACCESS",
           "MANAGE",
           "SELF_SERVICE_ENTITLEMENTS"
         ]
       }

Workflow run


Generated by SDK OpenAPI Sync workflow

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.66%. Comparing base (c00ca3b) to head (341b5f3).
⚠️ Report is 170 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1569       +/-   ##
===========================================
+ Coverage    0.00%   78.66%   +78.66%     
===========================================
  Files         158      230       +72     
  Lines       11048    15405     +4357     
===========================================
+ Hits            0    12118    +12118     
+ Misses      11048     3287     -7761     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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