chore: regenerate api-client, fix local docker stack, re-record cassettes#1507
Open
chore: regenerate api-client, fix local docker stack, re-record cassettes#1507
Conversation
The models/ (plural) directory contained ~1145 Pydantic v2 model files accidentally committed during an openapi-generator v7.0 test. These are dead code — all SDK imports go through models/__init__.py which re-exports from model/ (singular, the actual generated client). risk: low
Download OpenAPI schemas from staging DEX and regenerate the gooddata-api-client. Adds new fields including `parameters` on DeclarativeAnalyticsLayer and `isNullable` on LDM entities. risk: low
The staging API now returns a `parameters` field on DeclarativeAnalyticsLayer. Without this field on the SDK wrapper class, it was silently dropped during the round-trip conversion, causing test assertion failures. risk: low
a4ad747 to
e81ff59
Compare
Latest api-gw image expects Kotlin duration strings (e.g. "1m") instead of bare numbers for CACHE_EXPIRE_AFTER_WRITE.
Layout PUT API does not persist data source passwords. Add entities PATCH in upload_demo_layout.py to set the password explicitly. Make _patch_ds_credentials conftest fixture use ds_password from test config as fallback when DS_PASSWORD env var is not set.
Update load YAML files, expected JSON files, and refresh data to match the current staging API which now returns isNullable on LDM entities and parameters on DeclarativeAnalyticsLayer. risk: low
Add configure_normalization() to vcrpy_utils that rewrites environment-specific values (host, org_id, org_name, hostname) to canonical local equivalents during cassette recording. This ensures cassettes recorded from staging or local docker-compose produce identical files. Regenerate all cassettes from local to establish clean canonical baseline. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> risk: low
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1507 +/- ##
=======================================
Coverage 77.32% 77.33%
=======================================
Files 227 227
Lines 14768 14770 +2
=======================================
+ Hits 11420 11422 +2
Misses 3348 3348 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Re-record all gooddata-sdk test fixtures from staging environment. Cassettes are now normalized to canonical localhost values by the new configure_normalization() in vcrpy_utils. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> risk: low
VCR passes response body as bytes, not str. The isinstance(body_string, str) check silently skipped normalization, leaving staging values in cassettes. Now handles both bytes and str body types. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> risk: low
Re-record all gooddata-sdk cassettes from staging with the bytes body normalization fix active. Cassettes now have canonical localhost values in both URIs and response bodies. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> risk: low
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.
Summary
Brings the SDK in sync with latest staging: regenerated api-client, added a new feature field, fixed the local docker-compose stack, fixed data source credential handling, and re-recorded all VCR cassettes.
1. Remove accidental Pydantic v2 model files
Cleans up Pydantic v2 model files that were accidentally committed and don't belong in the codebase.
2. Regenerate api-client from latest staging OpenAPI spec
Re-generates
gooddata-api-clientfrom the latest staging OpenAPI spec, picking up new endpoints and schema changes.3. Add
parametersfield toCatalogDeclarativeAnalyticsLayerExposes the new
parametersfield from the API in the high-level SDK model.4. Fix docker-compose api-gw cache duration format
The latest
api-gwECR image switched to Kotlin duration parsing — bare numbers like60are no longer accepted. ChangedCACHE_EXPIRE_AFTER_WRITEandUSER_CACHE_EXPIRE_AFTER_WRITEfrom60to1m(matching gdc-nas). Without this fix,api-gwcrashes on startup withInvalid duration string format: '60'.5. Persist DS password after layout upload + fix local credential patching
Two issues fixed:
upload_demo_layout.pyuploads data sources viaPUT /api/v1/layout/dataSources, but the layout API does not persist the password. Added an entities PATCH call after the layout PUT to explicitly set passwords. Without this, calcique cannot connect to PostgreSQL and all execution/scan/export tests fail with400: Incorrect credentials._patch_ds_credentialsconftest fixture only activated whenDS_PASSWORDenv var was set (staging). For local tests, the credentials file placeholdersecretwas never replaced with the actual passwordpassw0rd. Changed the fixture to fall back totest_config["ds_password"]when the env var is absent.6. Re-record VCR cassettes against latest staging
All VCR cassettes re-recorded against latest staging with the regenerated api-client. This is the source of truth for test fixtures going forward.
Test plan
OVERWRITE=1 make test TEST_ENVS=py314passes all 364 tests against local stackmake test-stagingpasses all 364 tests against stagingJIRA: TRIVIAL
risk: low