eschutho opened a new pull request, #43468:
URL: https://github.com/apache/superset/pull/43468

   ## Summary
   
   Datadog logs for `apache/superset` production surfaced a recurring 
`DeprecationWarning`: *"The field \`groupby\` is deprecated, please use 
\`columns\` instead."* (`superset/common/query_object.py::DEPRECATED_FIELDS`).
   
   The `groupby` -> `columns` rename was already applied to two sibling 
`DEPRECATED_FIELDS` entries in these same example fixtures 
(`timeseries_limit_metric` in #43422, `granularity_sqla` in #43432), but both 
of those PRs left every `groupby` occurrence in 
`superset/examples/birth_names.py` and `superset/examples/world_bank.py` (and 
their exported `.yaml` chart configs under 
`superset/examples/usa_births_names/charts/` and 
`superset/examples/world_health/charts/`) untouched. This closes that gap for 
the `groupby` field specifically.
   
   **Decisions made that were not in the instructions**
   None.
   
   ## What changed
   
   - `superset/examples/birth_names.py`, `superset/examples/world_bank.py`: 
renamed the `groupby` key/kwarg to `columns` in the `create_slices()` default 
params and per-slice overrides passed to `get_slice_json()`.
   - 19 exported chart YAML fixtures under 
`superset/examples/usa_births_names/charts/` and 
`superset/examples/world_health/charts/`: renamed the `groupby` key under 
`params:` to `columns:`.
   - `groupbyRows` / `groupbyColumns` (pivot-table-v2-specific fields, 
unrelated to this deprecation) were left untouched.
   
   No behavior change: this only renames a dict key that's consumed identically 
either way — `get_slice_json()` does a plain `dict.update()` merge, and 
downstream `QueryObject` construction already treats `columns` as the current 
name for this field (`DEPRECATED_FIELDS` exists specifically to accept both 
during a migration window). The generated example dashboards/charts are 
unchanged.
   
   ## Test plan
   
   - `ruff check` / `ruff format --check` on both changed `.py` files: clean.
   - All 19 changed `.yaml` files parse via `yaml.safe_load`: clean.
   - `ast.parse()` on both changed `.py` files: clean.
   - Manually verified `get_slice_json()`'s dict-merge/override semantics are 
unaffected by the rename (defaults + per-slice kwarg override both resolve to 
the `columns` key as expected).
   - Local pytest run blocked by a pre-existing, unrelated import error in this 
shared clone (`ModuleNotFoundError`/`ImportError` chain unrelated to these 
files) — could not run the integration test suite that exercises 
`create_slices()` (`tests/integration_tests/fixtures/birth_names_dashboard.py`, 
`world_bank_dashboard.py`); relying on CI for full integration coverage.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to