Wykres commitów

423 Commity (0484570fbe8be4462dd99a2a746409cc2bf4cd44)

Autor SHA1 Wiadomość Data
Ryan Barrett 0484570fbe
Protocol.receive: switch from Object.get_or_create blind put
shouldn't overwrite because we already check that we haven't seen the id before

for #1360
2025-01-20 15:26:23 -08:00
Ryan Barrett 5603e46a48
Protocol.receive: on create/update without full object, fetch it
re https://github.com/akirk/friends/issues/436
2025-01-20 15:12:38 -08:00
Ryan Barrett 3bcde43697
not storing CRUD activities any more: populate Object.notify/feed
for #1360

getting closer...
2025-01-20 13:45:12 -08:00
Ryan Barrett d863add480
first pass at not storing CRUD activities any more
for #1360

good! but not done yet, need to fix populating Object.notify/feed, handling user vs profile ids
2025-01-20 13:45:12 -08:00
Ryan Barrett 1238735213
Protocol.for_id: ignore our #bridgy-fed-... fragments 2025-01-18 12:38:51 -08:00
Ryan Barrett f090d6d182
switch send tasks from stored objects to query params, at least for CRUD activities
for #1149
2025-01-17 15:33:55 -08:00
Ryan Barrett 21a0fb2cb4
Protocol.load: suppress debug logging 2025-01-17 15:28:39 -08:00
Ryan Barrett 8796b9edcd
Object.get_or_create: merge repeated fields instead of overwriting 2025-01-16 14:26:01 -08:00
Ryan Barrett c9d0be04c6
bump memcache memoize version for Protocol.for_id
when we started caching it in memcache in 2a9f24aee3, we also cached Nones for valid web domains that just didn't happen to give us mf2. 2363a488fd hopefully fixes that, but we also need to ignore the existing Nones in cache.
2025-01-15 09:02:12 -08:00
Ryan Barrett 2363a488fd
store blank Objects with source_protocol=web for valid web URLs with no mf2
this hopefully stops us from re-fetching them repeatedly in Protocol.for_id or Web.load/fetch

for #1149
2025-01-14 21:27:39 -08:00
Ryan Barrett 2a9f24aee3
cache Protocol.for_id in memcache
for #1149
2025-01-14 16:32:04 -08:00
Ryan Barrett 3a884a2c4e
Protocol.receive: on a delete for an object we don't have, don't write the object
for #1149
2025-01-13 20:52:00 -08:00
Ryan Barrett 32a60c980c
updates for ndb context caching everything: Object.new/changed logic, tests
for #1149, 18aa302da
2025-01-13 16:19:32 -08:00
Ryan Barrett ae315a4257
add new Protocol.DEFAULT_SERVE_USER_PAGES config attr
for #1043
2025-01-10 11:36:22 -08:00
Ryan Barrett e8b201dc33
extract memcache logic out into new memcache.py file 2025-01-09 17:10:05 -08:00
Ryan Barrett 1aca15ee1e
drop User.direct
subsumed by User.enabled_protocols. for #973
2025-01-06 20:06:23 -08:00
Ryan Barrett 2dde62cd40
Protocol.receive: try removing noop check for activities we've already seen
if this breaks, blame Gina 😎
2025-01-05 19:35:02 -08:00
Ryan Barrett 63c0e25deb
drop per-target delivery tracking
sad, it's useful, but it's too expensive. for #1501, #1149
2024-12-14 20:53:47 -08:00
Ryan Barrett da302c2376
Protocol.receive and ATProto.send: detect CRUD of object without id
fixes https://console.cloud.google.com/errors/detail/CO_yiJ_PrYSuvQE;locations=global;time=P30D?project=bridgy-federated&inv=1&invt=AbjgeA
2024-12-07 15:52:06 -08:00
Ryan Barrett 79cad7015e
fix send task delay logging
for #1596
2024-12-04 15:07:24 -08:00
Ryan Barrett 3c3dadb524
minor log tweaks, TODO 2024-12-04 14:38:35 -08:00
Ryan Barrett fbb82d2e26
AS2: change Application actor types to Person for users, Service for bots
for #1482
2024-12-03 21:16:11 -08:00
Ryan Barrett 65feae0f9b
more logging tweaks for tasks
only log task creations and runs if traceparent header isn't set

for #1149
2024-12-03 11:03:36 -08:00
Ryan Barrett 778e1c706d
prune down more logging
for #1149
2024-12-02 22:48:56 -08:00
Ryan Barrett 94a0c2618e
prune down misc logging
for #1149
2024-12-02 22:20:12 -08:00
Ryan Barrett 80d510f9bb
stop logging "Task ..." in atproto-commit, atproto-poll-chat tasks
goes with snarfed/webutil@c1b5685166

for #1149
2024-12-02 18:19:52 -08:00
Ryan Barrett 20dc814c80
add 2m delay to receive tasks for deletes
for #1361
2024-11-28 21:39:30 -08:00
Ryan Barrett cf80138e22
Protocol.translate_ids: translate object.object
for #1492
2024-11-28 09:37:51 -08:00
Ryan Barrett 0e2c268363
receive: try harder to detect blocked/filtered users earlier
...eg before starting to bridge them when they follow a bot user. for #1403
2024-11-07 19:41:35 -08:00
Ryan Barrett b4ac98c84e
move common.add, remove to webutil.util
in snarfed/webutil@46ef97e4fe
2024-10-31 09:41:28 -07:00
Ryan Barrett 4abb52b1d1
add username DM command, new Protocol.set_username method, implement in ATProto
for #826
2024-10-27 10:50:27 -07:00
Ryan Barrett fc9813e65c
receive task delay logging bug fix, handle time zones
fixes https://console.cloud.google.com/errors/detail/CP3d5sb0-KPBEA;time=P30D;locations=global?project=bridgy-federated
2024-10-23 21:43:28 -07:00
Ryan Barrett fa8149165b
receive task: fix delay logging
for #1378
2024-10-23 21:11:21 -07:00
Ryan Barrett aaf49e0f37
ATProto: switch from #tombstone to #account active=False for deleting accounts
...including reactivating with #account active=True. it works!

for #1130, #1119
2024-10-22 13:49:18 -07:00
Ryan Barrett f53179d339
send task: drop obsolete orig_obj HTTP param
see bba9cb2d16
2024-10-11 12:02:05 -07:00
Ryan Barrett bba9cb2d16
send and send task: switch orig_obj param from urlsafe-key to string id
...so that we can defer loading it to each protocol's send(). only ActivityPub actually needs it right now. should get rid of it eventually! see #1257
2024-10-11 11:34:31 -07:00
Ryan Barrett d28e762a17
receive and send tasks: drop obsolete obj param, always use obj_id
added in a452f288fe
2024-10-11 09:03:44 -07:00
Ryan Barrett a452f288fe
send and receive tasks: switch from url-safe Object key to string id
will affect all send tasks, but only update-profile receive tasks, the rest already switched to passing Object properties in the HTTP request directly
2024-10-11 08:53:21 -07:00
Ryan Barrett c648fb25ca
tests: remove more Fake routing special cases in Protocol.targets, handle_follow
for #1180
2024-10-10 17:19:02 -07:00
Ryan Barrett 3753ded847
Protocol.targets bug fix: don't guess at reposts' inner obj; actually look it up
for https://github.com/snarfed/bridgy-fed/issues/1357
2024-10-10 14:29:40 -07:00
Ryan Barrett 4a4d965502
Protocol.translate_ids: use URIs for mention tag url field
for #1366
2024-10-08 16:27:59 -07:00
Ryan Barrett a5cbc9b581
tests: remove routing special case for Fake and OtherFake in Protocol.receive
for #1180
2024-10-08 15:03:43 -07:00
Ryan Barrett 5b75fa43d5
noop: tests: rename ExplicitEnableFake => ExplicitFake, eefake => efake 2024-10-08 15:03:43 -07:00
Ryan Barrett d37f83b11b
use raise_=False in more Protocol.load calls 2024-10-04 12:59:57 -07:00
Ryan Barrett 11fff7d3b1
Protocol.targets: handle failed fetches and continue on
for #885
2024-10-04 12:44:11 -07:00
Ryan Barrett 2a13b83084
ATProto: reload DID doc along with profile when necessary
for #1334
2024-10-03 17:06:46 -07:00
Ryan Barrett 788b37279a
pass Object data in receive task HTTP payload instead of through datastore
trying to cut down datastore load and costs. this switches receive tasks from storing and fetching Objects from the datastore to passing their properties - notably as2, our_as1, bsky, etc - in the HTTP request body, as serialized JSON inside form-encoded params.

for #1354, #1149
2024-10-01 21:44:12 -07:00
Ryan Barrett c843c98c3e
Protocol.handle_follow: allow following opted out/blocked users
we still won't bridge or otherwise handle those users' activities though

fixes https://console.cloud.google.com/errors/detail/CM7b86Se9r_qfQ;time=PT1H;locations=global?project=bridgy-federated
2024-09-24 06:59:49 -07:00
Ryan Barrett fdb92dcff9
Protocol.receive: catch HTTP/connection errors, return 304
fixes:
https://console.cloud.google.com/errors/detail/CIb-6vLIioHJaw;time=P1D;locations=global?project=bridgy-federated
https://console.cloud.google.com/errors/detail/CPnSx-yemJ-hlAE;time=P1D;locations=global?project=bridgy-federated
https://console.cloud.google.com/errors/detail/CN278MyjhZbtOQ;time=P1D;locations=global?project=bridgy-federated
etc
2024-09-19 10:44:34 -07:00
Ryan Barrett 724978a25f
noop: receive, send tasks: tweak delay log
for #1308
2024-09-18 20:46:21 -07:00