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

   ## Summary
   
   `superset/common/query_object.py`'s `DEPRECATED_FIELDS` list warns and 
performs a runtime migration whenever legacy form_data key `granularity_sqla` 
is present (current name: `granularity`). The `birth_names` and `world_bank` 
example datasets — both the Python seed scripts and their YAML chart-config 
siblings — still constructed slice params using the old key, so every `superset 
load_examples` run (and every render of those charts) logged this deprecation 
warning.
   
   This mirrors the scope of #43422, which did the identical rename for the 
sibling deprecated field `timeseries_limit_metric` across the same `.py` + 
`.yaml` pairs.
   
   ## What changed
   
   - `superset/examples/birth_names.py`, `superset/examples/world_bank.py`: 
renamed `granularity_sqla` → `granularity` (8 occurrences).
   - `superset/examples/usa_births_names/charts/*.yaml` (11 files), 
`superset/examples/world_health/charts/*.yaml` (9 files): same rename, since 
`load_examples_from_configs()` loads these unconditionally alongside the Python 
loaders.
   
   ## Decisions made that were not in the instructions
   
   None.
   
   ## No-behavior-change note
   
   `get_slice_json()` (`superset/examples/helpers.py`) is a plain dict merge 
with no schema validation, and the YAML configs are loaded as plain dicts too. 
`granularity` is the field `DEPRECATED_FIELDS` migrates `granularity_sqla` into 
at read time, so this is a pure key rename — the resulting slice/chart params 
are identical once loaded, just constructed via the current field name instead 
of triggering the legacy-field warning + migration path.
   
   ## Test plan
   
   - `ruff check` / `ruff format --check` on both changed `.py` files: clean.
   - All 20 changed `.yaml` files parse successfully via `yaml.safe_load`.
   - Verified zero remaining `granularity_sqla` occurrences in the changed 
files, and confirmed the unrelated `granularity_sqla_override` variable in 
`superset/utils/core.py` (different dict, `extra_form_data`) was untouched.
   - Searched `tests/` for any assertion hardcoding `granularity_sqla` against 
`birth_names.create_slices`/`world_bank.create_slices` output specifically — 
none found.


-- 
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