aminghadersohi commented on code in PR #44190:
URL: https://github.com/apache/superset/pull/44190#discussion_r4074634537


##########
docs/docs/using-superset/version-history.mdx:
##########
@@ -68,7 +125,20 @@ what the user changed.
 ## Previewing a version
 
 Selecting a version loads it into the page so you can see it before deciding
-anything. While a preview is active:
+anything.
+
+<img
+  src={useBaseUrl('/img/version-history/version-history-preview.jpg')}
+  alt="Illustrative chart preview from an earlier build, with Restore, Open as 
new chart, and Close preview actions; history selection highlighting differs"
+/>
+
+This screenshot illustrates the preview actions in an earlier build. It
+uses the older **First tracked save** label and predates single-selection
+highlighting: the UI highlights only the previewed
+history group, not both groups as shown. The live group retains its **Current**
+label.

Review Comment:
   The screenshot already shows single-selection: only the previewed **First 
tracked save** group is tinted (#E8F0F2), the **Current** group is #FFFFFF. 
Pixel-sampled both. "not both groups as shown" describes a different image, so 
it tells readers to discount a screenshot that is correct here.
   
   ```suggestion
   This screenshot illustrates the preview actions in an earlier build. It
   uses the older **First tracked save** label. The live group retains its
   **Current** label.
   ```



##########
docs/docs/using-superset/version-history.mdx:
##########
@@ -39,13 +56,47 @@ stops filling — an empty or stale history misrepresents the 
entity as
 unchanged. History only accrues while capture is on; edits made while it was
 off are not reconstructed.
 
+## How long history is kept
+
+The `version_history.prune_old_versions` background task prunes expired
+history. The default Celery beat configuration schedules it daily at 03:00
+in the configured Celery timezone. It runs only when beat and workers are
+running with the required schedule and task registration; see the
+[operator checklist](./recently-archived.mdx#running-retention-tasks).
+
+The `SUPERSET_VERSION_HISTORY_RETENTION_DAYS` configuration value defaults to
+30 days. It is initialized from the environment variable of the same name
+and can be overridden in `superset_config.py`. Restart the relevant processes
+after changing environment or configuration values.
+
+At startup, a non-integer environment value or one above 36,500 logs a warning
+and falls back to 30 days. Use zero, not an arbitrarily large number, to
+disable pruning.

Review Comment:
   This guard (config.py:1764-1790) runs at import, before `from 
superset_config import *` (config.py:3485), so it covers the env var only. A 
`superset_config.py` value skips both checks: `timedelta(days=800000)` raises 
OverflowError, caught into `{"error": 1}` — a nightly no-op, not a fallback.
   
   ```suggestion
   At startup, a non-integer environment value or one above 36,500 logs a 
warning
   and falls back to 30 days. That check covers the environment variable only: a
   value set in `superset_config.py` is not validated, and a non-integer or
   out-of-range one makes each run fail instead. Use zero, not an arbitrarily
   large number, to disable pruning.
   ```



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