Skip to content

Commit 35b38f9

Browse files
authored
Merge pull request #104 from DataRecce/feature/drc-3549-auto-snapshot-recce-docs
docs(cloud): document Auto-Snapshot shared base + StalenessBanner
2 parents 9fc7168 + 48f7ded commit 35b38f9

6 files changed

Lines changed: 72 additions & 1 deletion

File tree

120 KB
Loading

docs/setup-guides/environment-best-practices.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ Configure your CD workflow to run:
9191

9292
See [Setup CD](setup-cd.md) for workflow configuration.
9393

94+
!!! info "Recce Cloud keeps PR diffs clean when the base moves"
95+
Recce Cloud freezes a snapshot of the shared base into each PR session at upload time, so subsequent merges to `main` don't leak into the PR diff as phantom modified or removed models. When production moves on, a yellow banner appears on the session offering a one-click **Refresh base** action. See [Refresh Base](../using-recce/staleness-banner.md) for details.
96+
9497
## Obtain Artifacts for Environments
9598

9699
Recce uses base and current environment artifacts (`manifest.json`, `catalog.json`) to find corresponding tables in the data warehouse for comparison.

docs/using-recce/data-developer.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Once you push changes and open a PR, the Recce Agent validates automatically.
7676

7777
#### What Happens
7878

79-
1. Your CI pipeline runs `recce-cloud upload`
79+
1. Your CI pipeline runs `recce-cloud upload`. At upload time, Recce Cloud captures a per-PR snapshot of the shared base so reviewers see a clean diff of only what this PR changed — see [Refresh Base](staleness-banner.md) for what happens if production moves on later.
8080
2. The agent compares your PR branch against the base branch
8181
3. The agent runs validation checks based on detected changes
8282
4. A data review summary posts to your PR
@@ -195,3 +195,4 @@ Confirm your workflow works:
195195
- [Data Reviewer Workflow](data-reviewer.md) - How reviewers use Recce
196196
- [Admin Setup](admin-setup.md) - Set up your organization
197197
- [Data Review Summary](../what-you-can-explore/summary.md) - Understanding agent summaries
198+
- [Refresh Base](staleness-banner.md) - Keep PR comparisons aligned when production moves

docs/using-recce/data-reviewer.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ For deeper investigation:
5454
2. Select the PR session from the list
5555
3. Explore the changes interactively
5656

57+
!!! info "Yellow banner at the top of the session?"
58+
Production has moved on since this PR was uploaded. The PR diff is still anchored to the original snapshot — by design, so it accurately reflects what this PR changed. Click **Refresh base** only when you want to re-anchor the comparison to current production. See [Refresh Base](staleness-banner.md).
59+
5760
**What you can do:**
5861

5962
- View [lineage diff](../what-you-can-explore/lineage-diff.md) to see affected models
@@ -124,5 +127,6 @@ Confirm you can review PRs:
124127

125128
- [Data Developer Workflow](data-developer.md) - How developers validate changes
126129
- [Data Review Summary](../what-you-can-explore/summary.md) - Understanding the agent summary
130+
- [Refresh Base](staleness-banner.md) - What the staleness banner means and when to refresh
127131
- [Checklist](../collaboration/checklist.md) - Track validation checks across PRs
128132
- [Share Validation Results](../collaboration/share.md) - Share findings with your team
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Refresh Base
3+
description: >-
4+
Recce Cloud freezes a snapshot of the shared production base into each PR
5+
session at upload time so the diff stays focused on only what this PR
6+
changed. When production moves on, click Refresh base to re-anchor the
7+
comparison.
8+
---
9+
10+
# Refresh Base
11+
12+
Recce Cloud captures a snapshot of the shared production base into each PR session at upload time. Comparisons in that session run against the frozen snapshot, so the diff stays focused on **only what this PR changed** — even when other PRs merge to `main` afterwards.
13+
14+
When production moves on, a yellow banner appears at the top of the session offering a one-click **Refresh base** action:
15+
16+
![Staleness banner at the top of a Recce Cloud session, prompting the reviewer to refresh the base](../assets/images/using-recce/staleness-banner.png){: .shadow}
17+
18+
Click **Refresh base** only when you want to re-anchor the comparison to current production. Dismissing the banner with **×** hides it but doesn't refresh the comparison — the diff stays anchored to the old snapshot until you click **Refresh base**.
19+
20+
## Why the Diff Is Frozen
21+
22+
Without a frozen snapshot, every comparison would run against whichever production state is live when you open the UI. If `main` has merged ten times since CI ran, those merges leak into the diff as phantom changes — modified models you never touched, removed models that exist only because production has progressed.
23+
24+
The frozen snapshot keeps the diff anchored to the production state that existed when this PR was first validated, so the only changes you see come from this branch.
25+
26+
!!! info "Example"
27+
Before this feature, a PR that modified one model could surface as **2 modified + 13 removed** because production had drifted between CI and review. With the frozen snapshot, the same PR surfaces as **1 modified, 0 removed** — matching what the developer actually changed.
28+
29+
## What Refresh Base Does
30+
31+
Clicking **Refresh base** re-anchors this PR session to the current shared base:
32+
33+
1. The button shows a spinner while the refresh runs (about 30 seconds for typical projects).
34+
2. The lineage and diff views re-render against the new baseline.
35+
3. A toast confirms the refresh:
36+
37+
> Base refreshed. If you've saved checks in this session, you may want to re-run them against the new base.
38+
39+
If the refresh fails, the banner stays visible and an error toast appears.
40+
41+
!!! tip "Re-run saved checks after a refresh"
42+
Saved checks still reference the previous baseline. Re-run them so the recorded results reflect the new comparison.
43+
44+
## When to Refresh
45+
46+
| Situation | Recommended action |
47+
|-----------|---------------------|
48+
| You only care about what this PR changed | Leave the banner; the frozen snapshot is already correct |
49+
| You want to validate the PR against current production (e.g., right before merging) | Click **Refresh base** |
50+
| The developer pushed new commits after the banner appeared | CI re-uploads automatically and captures a fresh snapshot — no manual refresh needed |
51+
52+
For most reviews, the frozen snapshot is the right default — it answers *"what does this PR change?"* without interference from unrelated merges.
53+
54+
## Requirements
55+
56+
Your project needs a shared base configured (`recce-cloud upload --type prod` running on `main`). The banner and **Refresh base** action are only available when a shared base exists.
57+
58+
## Related Reading
59+
60+
- [Environment Best Practices](../setup-guides/environment-best-practices.md): How the shared base is built and kept current.
61+
- [Data Reviewer Workflow](data-reviewer.md): The full review flow this banner appears in.
62+
- [Data Developer Workflow](data-developer.md): How PR uploads capture the snapshot in CI.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ nav:
7171
- using-recce/admin-setup.md
7272
- using-recce/data-developer.md
7373
- using-recce/data-reviewer.md
74+
- Refresh Base: using-recce/staleness-banner.md
7475
- using-recce/cli-commands.md
7576
- Workflow in OSS: using-recce/oss-workflow.md
7677
- What You Can Explore:

0 commit comments

Comments
 (0)