exlibris-fed / exlibris

MIT License
4 stars 0 forks source link

More federation work (#6) #136

Closed Sigafoos closed 3 years ago

Sigafoos commented 3 years ago

This is 80% or so of the way there to federate reads. The issue is that you more or less have to get it completely working to get it partially working. I decided to stop when I realize I would be changing how we create reads: I think we should save the actual insertion of the Read objects into the database for in the AP flow. This way there is only one way for a Read to be entered, regardless of it's local or federated.

I've left in the debugging log lines for now to help understand what's happening where. Before 6 is closed I'd like for those to be removed.

Sigafoos commented 3 years ago

Excluding the dump of the objects, this is what happens when you read:

(/Users/danconley/prepos/exlibris/infrastructure/reads/reads.go:39)
[2020-07-12 16:15:22]  could not convert argument of field UserID from uuid.UUID to string

(/Users/danconley/prepos/exlibris/infrastructure/reads/reads.go:39)
[2020-07-12 16:15:22]  could not convert argument of field UserID from uuid.UUID to string

(/Users/danconley/prepos/exlibris/infrastructure/reads/reads.go:39)
[2020-07-12 16:15:22]  could not convert argument of field UserID from uuid.UUID to string

(/Users/danconley/prepos/exlibris/infrastructure/reads/reads.go:39)
[2020-07-12 16:15:22]  could not convert argument of field UserID from uuid.UUID to string; could not convert argument of field UserID from uuid.UUID to string

(/Users/danconley/prepos/exlibris/infrastructure/reads/reads.go:39)
[2020-07-12 16:15:22]  could not convert argument of field UserID from uuid.UUID to string; could not convert argument of field UserID from uuid.UUID to string

(/Users/danconley/prepos/exlibris/infrastructure/reads/reads.go:39)
[2020-072020/07/12 16:15:22 *** URL *** http://localhost:8080/@dconley/read/6e960d9f-76e4-463a-9dfa-8c91ca4445f8
-12 16:15:22]  could not convert argument of field UserID from uuid.UUID to string; could not convert argument of field UserID from uuid.UUID to string
2020/07/12 16:15:23 locking
2020/07/12 16:15:23 context: map[https://www.w3.org/ns/activitystreams:]
2020/07/12 16:15:23 locking
2020/07/12 16:15:23 getting outbox: http://localhost:8080/user/dconley/outbox
2020/07/12 16:15:23 set outbox in db
2020/07/12 16:15:23 doin it for user dconley (1defef62-003e-41db-ac68-3f313a2b0778)

(/Users/danconley/prepos/exlibris/infrastructure/outbox/outbox.go:32)
[2020-07-12 16:15:23]  could not convert argument of field UserID from uuid.UUID to string

(/Users/danconley/prepos/exlibris/infrastructure/outbox/outbox.go:32)
[2020-07-12 16:15:23]2020/07/12 16:15:23 error sending to outbox for read ed5a8637-36fb-4540-8bda-03e3fe28d036: could not con  could not convert argument of field UserID from uuid.UUID to string
vert argument of field UserID from uuid.UUID to string; could not convert argument of field UserID from uuid.UUID to string

(/Users/danconley/prepos/exlibris/infrastructure/outbox/outbox.go:32)
[2020-07-12 16:15:23]  could not convert argument of field UserID from uuid.UUID to string
::1 - - [12/Jul/2020:16:15:22 -0400] "POST /api/book/OL14911626W/read HTTP/1.1" 201 0