feat(gooddata-pipelines): make workspace data filter fields optional#1609
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1609 +/- ##
==========================================
+ Coverage 78.99% 79.01% +0.02%
==========================================
Files 231 231
Lines 15603 15619 +16
==========================================
+ Hits 12325 12341 +16
Misses 3278 3278 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
janmatzek
reviewed
May 12, 2026
Comment on lines
+67
to
+69
| Workspace data filter fields are optional. Both must be set together or | ||
| both left unset; when set, a single-column WDF binding is emitted on the | ||
| declarative dataset. |
Contributor
There was a problem hiding this comment.
this is obvious from the validator
Comment on lines
+256
to
+258
| # Workspace data filter fields are optional and must be set together | ||
| # (validated on the input model). Emit columns/references only when | ||
| # both are provided. |
Contributor
There was a problem hiding this comment.
This is duplicating the docstring on the validator. Not sure if it is necessary here
Comment on lines
+314
to
+315
| workspace_data_filter_columns=wdf_columns or None, | ||
| workspace_data_filter_references=wdf_references or None, |
Contributor
There was a problem hiding this comment.
What would happen if we passed the empty lists here?
111991b to
2d426cc
Compare
janmatzek
reviewed
May 13, 2026
| if wdf_id is not None: | ||
| # `check_wdf_pair` on the model guarantees the column name is | ||
| # set whenever the id is. | ||
| assert wdf_column_name is not None |
Contributor
There was a problem hiding this comment.
maybe you can add the wdf_column_name to the condition check above?
2d426cc to
e8a1375
Compare
janmatzek
previously approved these changes
May 13, 2026
e8a1375 to
dbd27bc
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dbd27bc to
a1194a0
Compare
janmatzek
approved these changes
May 13, 2026
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
https://gooddata.atlassian.net/browse/MCMIC-2430
Makes
workspace_data_filter_idandworkspace_data_filter_column_nameonCustomDatasetDefinitionoptional (str | None = None). Previously both were required, which forced callers to provide values even for datasets that don't participate in a workspace data filter — a shape the underlyinggooddata_sdkalready supports (workspace_data_filter_columnsandworkspace_data_filter_referencesonCatalogDeclarativeDatasetare bothlist[...] | None = None).Driven by a real need on the MIC BCA tooling: BCA datasets per spec don't have WDF, and the wrapper API was blocking that legitimate use case.
Backward compatibility
check_wdf_pairvalidator enforces both-or-neither: setting only one of the two now raises a clearValidationErrorinstead of producing a malformed declarative dataset.workspace_data_filter_columns/workspace_data_filter_referenceswhen both fields are non-None; otherwise the SDK receivesNone(which it accepts).Test plan
pytest tests/— 186 passing.ruff check src/ tests/— clean.🤖 Generated with Claude Code