Ryan Barrett
ab748997eb
drop Object.clear(), narrow when we unset our_as1
...
mostly a noop
2025-01-27 14:48:07 -08:00
Ryan Barrett
bbdf38ec23
ids.translate_*_id, models.resolve_ids: narrow when we query by copy id
...
for #1149
2025-01-24 15:49:23 -08:00
Ryan Barrett
0e63a1515a
preserve more activities from datastore expiration
2025-01-22 21:37:31 -08:00
Ryan Barrett
b877a9f3b1
don't expire flag Objects
2025-01-22 11:05:28 -08:00
Ryan Barrett
3f31449832
don't expire follow activity Objects
2025-01-21 21:14:56 -08:00
Ryan Barrett
35bd39298c
garbage collect more Objects, everything except actors, and everything deleted
...
for #1703 , #1149
2025-01-21 14:45:14 -08:00
Ryan Barrett
f91aa967e5
Object.get_or_create: only write back to datastore if we modify any properties
...
for #1149
2025-01-20 16:03:52 -08:00
Ryan Barrett
e56f22f92a
Object.get_or_create: drop support for new/changed kwargs, we don't use them any more
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
53051f9466
User/Object.add: only update memcache for copies if the copy being added is new
2025-01-18 12:53:12 -08:00
Ryan Barrett
f03057502a
start all synthetic id fragments with #bridgy-fed-...
2025-01-18 12:16:47 -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
8796b9edcd
Object.get_or_create: merge repeated fields instead of overwriting
2025-01-16 14:26:01 -08:00
Ryan Barrett
a1e5d4419d
User.get_or_create: create AP keys more aggressively, check that we have all parts
...
fixes https://console.cloud.google.com/errors/detail/CKXLrIb56cr0zQE;locations=global;time=P30D?project=bridgy-federated
2025-01-14 09:04:27 -08:00
Ryan Barrett
1a985ad77b
move Object auth check and authed_as kwarg from get_or_create to get_by_id
2025-01-13 18:42:32 -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
a756edbc11
bug fix for User.get_by_id, handle when use_instead points to non-existent entity
...
fixes https://console.cloud.google.com/errors/detail/CJOKicXMqa_Sdg;locations=global;time=P30D?project=bridgy-federated&
2025-01-13 12:44:17 -08:00
Ryan Barrett
d32109b281
remove datastore transactions from User/Object/Follow.get_or_create
...
...because transactions don't read or write memcache. :/ Fortunately we don't really depend on atomicity for much, last writer wins is pretty much always fine.
for #1149
2025-01-13 12:44:17 -08:00
Ryan Barrett
cd28e4d68b
stop serving user pages and counting followers for protocol bot users
...
for #1561 , #1678
2025-01-12 08:32:18 -08:00
Ryan Barrett
e771d89b25
switch ndb model expiration from type allowlist to blocklist
...
should result in expiring more objects, only keep profiles and posts
2025-01-10 18:32:03 -08:00
Ryan Barrett
9682b599cf
User.get_by_id: handle when use_instead points to opted out user
2025-01-10 09:33:35 -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
9e2479ef79
web UI: followers/ing page bug fix, handle missing handle
...
fixes https://console.cloud.google.com/errors/detail/CIvZ14eI8r2zhgE;locations=global;time=P30D?project=bridgy-federated&inv=1&invt=AbmE_w
2025-01-05 20:08:36 -08:00
Ryan Barrett
fe6da84fc3
web UI: add unicode-bidi: isolate spans around external content
...
fixes RTL/LTR override chars extending into UI and other text. thanks @electricduck, @tantek! for #1666
2025-01-05 09:19:20 -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
6388aab7d6
cache User.count_followers in memcache
...
for #1149
2024-12-13 15:25:04 -08:00
Ryan Barrett
5d6d68b5e7
cache models.get_original_user/object_key queries in memcache
...
adds new generic common.memcache_memoize decorator for caching any function's output in memcache. for #1149
2024-12-11 20:17:36 -08:00
Ryan Barrett
3c3dadb524
minor log tweaks, TODO
2024-12-04 14:38:35 -08:00
Ryan Barrett
f94e697b55
/web-site: always reload profile
...
for #1458 , #1564
2024-11-28 07:56:02 -08:00
Ryan Barrett
538065792e
User.get_or_create: don't propagate if the user is blocked
...
ie for web sites that don't have RSS or Atom feed or webmentions
for #1458
2024-11-27 09:04:38 -08:00
Ryan Barrett
f57951d5d8
require web users to have an Atom or RSS feed or webmentions
...
for #1458
2024-11-24 21:03:51 -08:00
Ryan Barrett
5e49656099
ATProto.handle_to_id: reuse DatastoreClient.resolve_handle
2024-11-07 20:52:03 -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
c0f8945989
ATProto.set_username: fetch new DID doc; User.handle_as: use handle in DID doc
...
for #826
2024-10-28 18:23:21 -07:00
Ryan Barrett
572b42d664
Object.get_or_create: auth check: normalize profile ids
...
handles eg www vs naked domain in web home page URLs
2024-10-28 15:49:16 -07:00
Ryan Barrett
059c7ed46a
User.enable_protocol: always call Protocol.create_for
...
...even if there's already a copy, since it might need to be reactivated
for #1130
2024-10-22 14:30:49 -07:00
Ryan Barrett
8b36e6527d
datastore transactions: remove on ATProto.create_for, narrow in models.enable
...
we were doing heavy work like generating RSA keys and external network requests for creating DIDs inside datastore txes, which led to bad contention. details in https://github.com/snarfed/bridgy-fed/issues/1376
2024-10-11 21:09:47 -07:00
Ryan Barrett
93c034de3b
noop: tweak a few log messages
2024-10-11 15:24:25 -07:00
Ryan Barrett
feb4d4c554
tests: remove Fake special case in Follower._pre_put_hook
...
for #1180
2024-10-10 20:21:45 -07:00
Ryan Barrett
27afce3b4f
tests: remove Fake/OtherFake special case in User.is_enabled
...
for #1180
2024-10-10 20:16:07 -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
2a13b83084
ATProto: reload DID doc along with profile when necessary
...
for #1334
2024-10-03 17:06:46 -07:00
Ryan Barrett
4255719939
activitypub.actor: put native user id in alsoKnownAs
...
for https://github.com/snarfed/bridgy-fed/issues/1331
2024-10-02 15:01:07 -07:00
Ryan Barrett
0f268a8fd6
User.get_or_create: if we fail creating a copy, disable that protocol
...
fixes https://console.cloud.google.com/errors/detail/CMHloZaRmPXQZQ;locations=global;time=P30D?project=bridgy-federated
2024-09-29 08:02:19 -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
0f805e0885
refactor Web.poll_feed_task, add better error handling
...
pull out an internal poll method, wrap it in a mostly-catch-all exception handler, make sure we more reliably create the next task even if fetching or parsing fails
fixes:
https://console.cloud.google.com/errors/detail/CICLhIKMm6nSHw;locations=global;time=P30D?project=bridgy-federated
https://console.cloud.google.com/errors/detail/CJCrlNfNn6n3FQ;locations=global;time=P30D?project=bridgy-federated
https://console.cloud.google.com/errors/detail/CPnSx-yemJ-hlAE;locations=global;time=P30D?project=bridgy-federated
etc
2024-09-20 12:12:28 -07:00
Ryan Barrett
5330dca6e2
refactor models.get_original* queries to cache more and query less
...
for #1149
2024-09-19 20:58:34 -07:00
Ryan Barrett
4df76d0db7
when we get a delete, or a web user opts out, delete their copies in other protocols
...
for #1304
2024-09-16 18:27:04 -07:00