Your one-stop-cake-shop for everything Freshly Baked has to offer

fix(pm): fix some Tranquil/Anisota compatibility #203

closed opened by a.starrysky.fyi targeting main from private/minion/push-mtkunykkyyqq

I've observed the following issues with Anisota:

  1. It appears to proxy chat to the wrong endpoint (did:web:api.bsky.app instead of did:web:api.bsky.chat) - this causes messages not to load with Tranquil PDS
  2. It appears to be missing the $type field on records it tries to create. This leads to Tranquil rejecting them as invalid records...
  3. It appears to proxy some endpoints that it shouldn't. This leads to bluesky stating that some XRPC routes are unsupported

I've applied the following fixes:

  1. I've applied an nginx location which forces all PDS routes starting in /xrpc/chat.bsky. to proxy to did:web:api.bsky.chat. It's a bad hack but I suspect it'll never actually do the wrong thing
  2. I've made a patch to Tranquil (https://tangled.org/tranquil.farm/tranquil-pds/pulls/21) to automatically elide $type when it's missing. The code is not particularly good IMHO but it does work...
  3. I've made a patch to Tranquil (https://tangled.org/tranquil.farm/tranquil-pds/pulls/20) to ban proxying on some more routes. @nel.pet has mentioned that this probably breaks social-app in some cases (see that PR's comments), but it's fine as a stopgap for us now
  4. I've updated the Tranquil pin to apply patches from #2 and #3

I currently believe that neither of the Tranquil fixes are upstreamable. This means that, unless we want to turn them into actual patches = [] and maintain them out of tree forever, we will need to drop them eventually. The True Fix is to help the Anisota developers debug and fix these issues, which we are in the process of doing...

Labels

None yet.

requested-reviewers

None yet.

approved

None yet.

tested-working

None yet.

rejected

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:uuyqs6y3pwtbteet4swt5i5y/sh.tangled.repo.pull/3mem3kn4grt22
+16 -4
Diff #2
+4 -4
npins/sources.json
··· 631 631 "type": "Git", 632 632 "repository": { 633 633 "type": "Git", 634 - "url": "https://tangled.org/tranquil.farm/tranquil-pds" 634 + "url": "https://tangled.org/a.starrysky.fyi/tranquil-pds" 635 635 }, 636 - "branch": "feat/nix-module", 636 + "branch": "private/minion/anisota-workaround", 637 637 "submodules": false, 638 - "revision": "e6b4698735918c5c6ee2572ef7d4fd29f791f219", 638 + "revision": "31e4807912c40435a7f515f65b1b50b3fc222528", 639 639 "url": null, 640 - "hash": "sha256-7r113ZJ0Y7inOHPlfRldItrh2DMC/RuxyeDw3ZMSJfE=" 640 + "hash": "sha256-FHnGKC4oqAR569+P9HXgOWGNwy8WeDkc2bjAe1SLY1A=" 641 641 }, 642 642 "treefmt-nix": { 643 643 "type": "Git",
+12
packetmix/systems/teal/pds.nix
··· 78 78 services.nginx.virtualHosts."at.freshly.space" = { 79 79 acmeRoot = null; 80 80 81 + locations."^~ /xrpc/chat.bsky." = { 82 + proxyPass = "http://127.0.0.1:1039"; 83 + proxyWebsockets = true; 84 + extraConfig = '' 85 + proxy_read_timeout 86400; 86 + proxy_send_timeout 86400; 87 + proxy_buffering off; 88 + proxy_request_buffering off; 89 + proxy_set_header 'atproto-proxy' 'did:web:api.bsky.chat#bsky_chat'; 90 + ''; 91 + }; 92 + 81 93 serverAliases = lib.mkForce [ 82 94 "*.at.freshlybakedca.ke" 83 95 "*.at.freshly.space"

History

3 rounds 1 comment
sign up or login to add to the discussion
1 commit
expand
fix(pm): fix some Tranquil/Anisota compatibility
expand 1 comment

We're solving these problems in other ways - i.e. talking to anisota devs & using a browser extension to rewrite some bits in the meantime

closed without merging
1 commit
expand
fix(pm): fix some Tranquil/Anisota compatibility
expand 0 comments
1 commit
expand
fix(pm): fix some Tranquil/Anisota compatibility
expand 0 comments