Fetch Logpush dataset pages from middlecache - #33248
Open
soheiokamoto wants to merge 1 commit into
Open
Conversation
Contributor
Review
👉 Fix in your agent 👈Fix the following review findings in PR #33248 (https://github.com/cloudflare/cloudflare-docs/pull/33248).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.
The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.
---
## Code Review
### Warnings (1)
#### CR-8688c6617e16 · Stale-scope handling asymmetry
- **File:** `bin/fetch-logpush-datasets.ts` line 118
- **Issue:** The deletion pass (lines 118-124) only prunes stale `.md` pages inside scopes that exist in the fetched archive. A dataset scope that exists in `DATASETS_DIR` but is absent from the archive is never touched and no warning is emitted, so pages for a dataset removed from the archive silently stay published. The reverse case (scope in archive without a destination dir) is explicitly logged and skipped, so the asymmetry appears unintentional.
- **Fix:** After preparing scopes, iterate the destination scope directories and warn (or fail in non-soft mode) when a destination scope is not covered by the archive, so removed datasets don't leave stale published pages.
### Suggestions (1)
#### CR-00bd743d4e20 · Staging files inside content tree
- **File:** `bin/fetch-logpush-datasets.ts` line 91
- **Issue:** Staged pages are written as `.logpush-<uuid>.tmp` directly inside `src/content/docs/...` (the destination dir). If the process is killed (SIGKILL/OOM) during the prepare phase, the `finally` cleanup never runs and these `.tmp` files remain in `src/content`, which violates the repo's allowed-file-types rule and breaks CI until the script runs again to clean them up (lines 78-82 only run on the next invocation).
- **Fix:** Consider staging under `.tmp/` (same filesystem as the repo, so the final rename stays atomic) and cleaning stale staging files there, so a killed run can't leave non-content files in `src/content/`.
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (1)
Suggestions (1)
ConventionsNo convention issues found. Style Guide ReviewNo style-guide issues found. Acknowledged by author (7)
CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
soheiokamoto
force-pushed
the
sohei/DS-17240-fetch-logpush-docs
branch
from
September 5, 2026 00:07
7a8435c to
84de696
Compare
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://sohei-ds-17240-fetch-logpush-docs.previews.developers.cloudflare.com (commit 2cd1fa7)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
Contributor
|
Preview URL: https://2cd1fa7d.preview.developers.cloudflare.com |
soheiokamoto
force-pushed
the
sohei/DS-17240-fetch-logpush-docs
branch
from
September 5, 2026 00:29
84de696 to
b02f2bd
Compare
Contributor
Author
|
Review triage before the next push:
|
Fetch validated Logpush dataset pages from middlecache during docs builds while retaining checked-in pages as a safe fallback. - Bound and verify archive downloads before replacing pages - Sync only generated scopes that have existing Cloudflare Docs destination directories - Preserve checked-in pages when the archive is unavailable or invalid - Refresh the archive on every development and build run - Require a separate manual changelog when a dataset change needs a customer-facing announcement
soheiokamoto
force-pushed
the
sohei/DS-17240-fetch-logpush-docs
branch
from
September 5, 2026 02:29
b02f2bd to
2cd1fa7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fetch validated Logpush dataset pages from middlecache during docs builds while retaining checked-in pages as a safe fallback.
Screenshots (optional)
Not applicable.
Documentation checklist