Skip to content

Conversation

@kptdobe
Copy link
Contributor

@kptdobe kptdobe commented Sep 25, 2025

Workers binding is pretty cool because it makes code simple and is easy to use.
But... DurableObject is not fully stable on the CloudFlare side (see the recommended error handling with 3 retries... https://developers.cloudflare.com/durable-objects/best-practices/error-handling/).
Also, each object (da-collab worker, da-admin worker, the DurableObject) has its own lifecycle in memory and we can observe random internal errors when using those workers.

To not rely on those bindings, a simple solution is to make a simple fetch on the da-admin endpoint.

This is also a got first step to a da-admin migration on a different infra.

@github-actions
Copy link

github-actions bot commented Sep 25, 2025

LCOV of commit 8bf6547 during Install, lint, and test #228

Summary coverage rate:
  lines......: 100.0% (1736 of 1736 lines)
  functions..: 98.3% (59 of 60 functions)
  branches...: no data found

Files changed coverage rate:
                  |Lines       |Functions  |Branches    
  Filename        |Rate     Num|Rate    Num|Rate     Num
  ======================================================
  src/admin.js    | 2.3%     43| 0.0%     1|    -      0
  src/edge.js     | 2.7%    333| 0.0%     9|    -      0
  src/shareddoc.js| 3.1%    617| 0.0%    19|    -      0

@bosschaert
Copy link
Contributor

The changes look good to me.

I see a number of failing unit tests - so I guess this is still work-in-progress 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants