Skip to content

feat(gooddata-sdk): [AUTO] add region and data_center fields to CatalogOrganizationAttributes#1458

Closed
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P011-add-deployment-info-to-organization
Closed

feat(gooddata-sdk): [AUTO] add region and data_center fields to CatalogOrganizationAttributes#1458
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P011-add-deployment-info-to-organization

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Add region and data_center read-only fields to CatalogOrganizationAttributes and update CatalogOrganization.from_api() to deserialize them from the API response.

Caution

Test fixtures need recording. The following fixture files are referenced by tests but do not exist yet.
They must be recorded against a live GoodData server before merging:

  • packages/gooddata-sdk/tests/catalog/fixtures/organization/organization.yaml

Problem: P011 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/23235917307

What changed in gdc-nas

Commit f0f3783 added two new read-only (@ApiOutOnly) fields to the Organization model in the metadata-api OpenAPI spec:

  • region — stores the cluster name (from env var GDC_DEPLOYMENT_INFO_CLUSTER_NAME)
  • dataCenter — stores the deployment region (from env var GDC_DEPLOYMENT_INFO_REGION)

Both fields are populated only when the ENABLE_DEPLOYMENT_INFO feature flag is enabled. The API client (gooddata-api-client) was already regenerated with these fields as optional properties in json_api_organization_out_attributes.py.

What was implemented in SDK

Updated the SDK wrapper to expose the new fields:

  • Added region: str | None = None and data_center: str | None = None to CatalogOrganizationAttributes
  • Updated CatalogOrganization.from_api() to read attrs.region and attrs.data_center (mapping from dataCenter JSON key) from the API response

No changes to as_api_model() or write paths — these are output-only fields.

Files modified

  • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/entity_model/organization.py

JIRA: PENDING (Jira ticket will be created after review)
Risk: Low

…ogOrganizationAttributes

Add read-only `region` and `data_center` fields to CatalogOrganizationAttributes,
and update CatalogOrganization.from_api() to deserialize them from API responses.
These correspond to the @ApiOutOnly fields added in the metadata-api OpenAPI spec.
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.

2 participants