feat(gooddata-sdk): [AUTO] add region and data_center fields to CatalogOrganizationAttributes#1458
Closed
yenkins-admin wants to merge 1 commit intomasterfrom
Closed
Conversation
…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.
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.
Add
regionanddata_centerread-only fields toCatalogOrganizationAttributesand updateCatalogOrganization.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.yamlProblem: 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 varGDC_DEPLOYMENT_INFO_CLUSTER_NAME)dataCenter— stores the deployment region (from env varGDC_DEPLOYMENT_INFO_REGION)Both fields are populated only when the
ENABLE_DEPLOYMENT_INFOfeature flag is enabled. The API client (gooddata-api-client) was already regenerated with these fields as optional properties injson_api_organization_out_attributes.py.What was implemented in SDK
Updated the SDK wrapper to expose the new fields:
region: str | None = Noneanddata_center: str | None = NonetoCatalogOrganizationAttributesCatalogOrganization.from_api()to readattrs.regionandattrs.data_center(mapping fromdataCenterJSON key) from the API responseNo 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.pyJIRA: PENDING (Jira ticket will be created after review)
Risk: Low