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

   > **DRAFT — do not merge yet.** Two gates: #42797 (shadow-row reads pinned 
to `(id, uuid)`) must land first, and SIP-210 
([#39492](https://github.com/apache/superset/issues/39492)) needs a passed dev@ 
[VOTE]. Opened early so the diff and the operator guidance can be reviewed in 
parallel.
   
   ### SUMMARY
   
   Flips the two versioning release defaults for general availability:
   
   | Setting | Before | After |
   |---|---|---|
   | `VERSION_HISTORY` | `False` | **`True`** |
   | `ENABLE_VERSIONING_CAPTURE` | `false` | **`true`** (env-var default) |
   
   Every save of a chart, dashboard, or dataset now writes version rows, and 
the version history panel (#41551) appears on Explore and Dashboard pages.
   
   **The two flip together deliberately** (they are not independently useful). 
The panel reads what capture writes, so panel-on with capture-off renders an 
empty *"No history yet"* — which misrepresents an edited entity as unchanged. 
That is the one combination worse than either switch being off.
   
   **`ENABLE_VERSIONING_CAPTURE` is retained permanently** as an operational 
kill-switch, not removed with the rollout toggles. Setting it falsy stops 
capture within a restart, no revert-and-redeploy. Unlike the soft-delete 
toggle, turning it off is a **clean stop**: existing version rows stay readable 
and no entity state is altered.
   
   **Scope: versioning only.** The soft-delete flips are #42800. FR-009 permits 
the two shipping in different releases, and they answer to different gates — a 
SIP vote here, an internal determination there — so they are kept independently 
reviewable, shippable, and revertible.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — configuration defaults. The UI this enables shipped in #41551 and is 
unchanged here.
   
   ### TESTING INSTRUCTIONS
   
   - `pytest tests/unit_tests/versioning tests/unit_tests/config_test.py 
tests/unit_tests/initialization_test.py` — 164/164
   - `pytest tests/integration_tests/versioning` — 84 passed, 4 skipped
   - `pre-commit run` green; `docs/static/feature-flags.json` regenerated by 
the docs-sync hook
   
   Manual: with default config, edit a chart twice and open **Version history** 
on Explore — both saves appear. Set `ENABLE_VERSIONING_CAPTURE=false` and 
restart; further saves write no rows and the panel stops accruing, while 
previously captured history remains readable.
   
   Worth noting for reviewers: no test in the suite asserted the *old* 
defaults, so nothing needed superseding here. (The soft-delete counterpart, 
#42800, had exactly one such guard.)
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [x] Required feature flags: `VERSION_HISTORY` and 
`ENABLE_VERSIONING_CAPTURE` (this changes their defaults; both are retained, 
the latter permanently)
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   **`UPDATING.md`** gains an entry covering what operators should expect:
   
   - **Storage growth.** Capture writes shadow rows per save, so the metadata 
database grows with edit volume. `version_history.prune_old_versions` bounds it 
at `SUPERSET_VERSION_HISTORY_RETENTION_DAYS` (default 30). A deployment that 
replaces `CELERY_CONFIG` rather than inheriting must carry both the 
`superset.tasks.version_history_retention` import and the beat entry — #42641 
adds a startup warning naming whichever is absent.
   - **`PUT` response shape changes.** Entity updates now return populated 
`old_version_uuid` / `new_version_uuid` and an `ETag` header, which were null 
or absent while capture was off.
   
   **Why #42797 gates this.** Capture-on by default widens exactly the window 
that PR closes: version reads and restore matched shadow rows on the reusable 
integer id alone, so an entity created under a recycled id inherited its 
predecessor's history and could be overwritten by a restore. Purge frequency 
rises as soft delete graduates, and id reuse is deterministic on SQLite ROWID 
tables — so the defect gets more reachable precisely as these defaults roll out.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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