Revert "feat: cache purge API (object cache + native Workers Caching)" - #2281
Conversation
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 70c9dd6 | Jul 29 2026, 10:01 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | 70c9dd6 | Jul 29 2026, 10:02 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 70c9dd6 | Jul 29 2026, 10:02 PM |
Scope checkThis PR changes 1,452 lines across 37 files. Large PRs are harder to review and more likely to be closed without review. If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs. See CONTRIBUTING.md for contribution guidelines. |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/registry-verification
@emdash-cms/sandbox-workerd
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
There was a problem hiding this comment.
Reverting #2275 is the right call if the feature needs to be backed out, and the diff looks like a thorough attempt to roll it back. I checked for leftover references to the cache-purge capability, routes, handlers, virtual module, and Block Kit disabled/title fields and found none, so the public surface appears cleanly scrubbed.
Two things stand out:
- No replacement changeset. The original
.changeset/object-cache-purge-api.mdis correctly deleted, but this PR still removes public API from published packages (emdash,@emdash-cms/admin,@emdash-cms/blocks,@emdash-cms/cloudflare,@emdash-cms/plugin-types,@emdash-cms/plugin-cli,@emdash-cms/sandbox-workerd). CONTRIBUTING requires a changeset for behavior changes to published packages, even when the behavior is "reverts the previous addition". - workerd wrapper loses canonical
users:readgating. The revert removes the|| manifest.capabilities.includes("users:read")disjunction that #2275 had added topackages/workerd/src/sandbox/wrapper.ts. Only the deprecatedread:usersalias still gatesctx.usersin workerd; a plugin that declares the canonicalusers:readcapability won't get user access. The Cloudflare wrapper already normalizes capabilities and checks the canonical name, so workerd should match it.
I did not run the test suite or typecheck; everything above is from static reading and cross-searching.
| const site = options.site ?? { name: "", url: "", locale: "en" }; | ||
| const hasReadUsers = | ||
| manifest.capabilities.includes("read:users") || manifest.capabilities.includes("users:read"); | ||
| const hasReadUsers = manifest.capabilities.includes("read:users"); |
There was a problem hiding this comment.
[suggestion] The workerd wrapper gates ctx.users on the deprecated read:users capability alias only. The canonical capability is users:read (see CAPABILITY_RENAMES and normalizeCapabilities), so sandboxed plugins that declare the current name will silently lose user access in workerd. Note that the prior branch had || manifest.capabilities.includes("users:read") here; restoring that disjunction at least preserves base-branch behavior while the broader workerd capability-alias inconsistency is addressed.
| const hasReadUsers = manifest.capabilities.includes("read:users"); | |
| const hasReadUsers = manifest.capabilities.includes("read:users") || manifest.capabilities.includes("users:read"); |
A cleaner fix is to import normalizeCapabilities and normalize manifest.capabilities before generating the wrapper, matching the Cloudflare wrapper.
| @@ -1,10 +0,0 @@ | |||
| --- | |||
There was a problem hiding this comment.
[needs fixing] Removing the original changeset is correct, but this leaves no changeset describing the revert. The revert still changes the public API/surface of several published packages, so CONTRIBUTING requires a new changeset that explains the removal to users upgrading (e.g., a .changeset/revert-cache-purge-api.md noting that the admin cache-purge endpoints, plugin cache:purge capability, and related Block Kit button options have been removed).
Overlapping PRsThis PR modifies files that are also changed by other open PRs:
This may cause merge conflicts or duplicated work. A maintainer will coordinate. |
khoinguyenpham04
left a comment
There was a problem hiding this comment.
Verified as an exact revert of #2275. Full CI and PR compliance pass. No replacement changeset is needed because the reverted API was never released; the unrelated users:read change should be handled in a separate tested PR.
What does this PR do?
Reverts #2275, which was merged before maintainer approval. This removes the unreleased cache-purge APIs and restores
mainto its previous behavior.This is an exact revert of
e88655417db5753a32d65d5bf5202af145d6ede0. The unrelatedusers:readchange bundled into #2275 is also reverted and can be submitted separately with a reproducing test.Reverts #2275.
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.Tests are not applicable because this removes an unreleased feature and its tests. There are no new user-visible strings. No replacement changeset is needed because #2275 was not released; its pending changeset is removed so unchanged published packages are not bumped. This is not a new feature, so no Discussion is required.
AI-generated code disclosure
No new code was generated; the change is an exact Git-generated revert.
Screenshots / test output
The full CI suite passes on
70c9dd660031c3bfd005864bb69172bf3522a62a, including typecheck, lint, unit tests, browser tests, and Node and Cloudflare end-to-end tests. There are no visual changes to demonstrate.