Repository navigation
fix(hlx6): Poll api.aem.live for changes - #205
bosschaert wants to merge 9 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve Helix backend overrides and polling while incorporating main's POST, single-token auth, and awaited invalidation fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cancel stale pending saves and restore anchors on external changes. Handle HEAD failures and deletion explicitly, and ignore overlapping or obsolete polling responses. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prevent late initialization from restarting polling after disconnect and abort pending HEAD requests when the document is destroyed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Centralize forced IS_HELIX selection and URL rewriting in a local-testing helper while preserving routing and logging behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Normalize weak tags, establish verified read baselines, prevent wildcard Helix writes, and invalidate sessions on version conflicts while preserving da-admin behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ReviewReviewed at 17aed61. Lint is clean and High1. An external change can still be overwritten after the invalidation reconnect. Possible fixes: close the sockets with a dedicated close code so da-live drops its local Y.Doc before reconnecting. As a server-side safety net, persist an invalidation marker so the next session doesn't save while it still holds pre-invalidation state (e.g. when the Medium2. Polling keeps the Durable Object awake. The 5 s 3. Polling auth doesn't recover. The HEAD always uses the first connection's token (#L655), and 401/403 (#L673) are logged and retried with the same token. Once that token expires, change detection stops for the rest of that connection's lifetime, logging a warning every 5 s. Fall back to the other connections' tokens, or close the stale connection (e.g. with the existing 4401 code) so the client reconnects with a fresh token. 4. A refused save is acked as successful. The new "no verified ETag" refusal (#L558) is caught inside Low5. 6. The da-admin ETag tracking (#L614-L619) says it feeds the HEAD check, but polling is only scheduled for Helix docs. The same applies to the da-admin auth branch in 7. Nits
Dependency on adobe/helix-api-service#469The POST response must return the same ETag that a later HEAD returns (ignoring Reviewed with GitHub Copilot |
Description
This PR only contain changes related to the api.aem.live backend, nothing changes for the admin.da.live backend as this functionality already works there.
If changes have been made to a document outside of DA, ensure to pick them up. This is done by polling for such changes every 5 seconds.
Note, this PR should only be merged after https://github.com/adobe/helix-api-service/pull/469 has been merged and deployed.
Related Issue
Fixes #177
Fixes #https://github.com/adobe/helix-api-service/issues/453
How Has This Been Tested?
Types of changes
Checklist: