0:48 AM
jakehart
2:25 AM
woah joined the channel
2:29 AM
tilgovi joined the channel
3:05 AM
dwhly
jakehart: awesome
3:37 AM
MrWoohoo has quit
5:02 AM
jakehart: yt?
6:19 AM
csillag1 has quit
6:56 AM
Mitar joined the channel
8:38 AM
MrWoohoo joined the channel
9:37 AM
Symon is now known as Symon|away
10:03 AM
Sebastien-L joined the channel
10:12 AM
GitHub43 joined the channel
10:12 AM
NOTICE: [h] nickstenning pushed 1 new commit to master: https://github.com/hypothesis/h/commit/28bb0446fa0b9f9c1d1f1a329e69c255c6147c93
10:12 AM
NOTICE: h/master 28bb044 Nick Stenning: Merge pull request #1974 from hypothesis/1973-year-singular...
10:12 AM
GitHub43 has left the channel
10:12 AM
GitHub157 joined the channel
10:12 AM
NOTICE: [h] nickstenning deleted 1973-year-singular at 936c1ad: https://github.com/hypothesis/h/commit/936c1ad
10:12 AM
GitHub157 has left the channel
10:52 AM
Symon|away is now known as Symon
13:06 PM
yury`m has quit
13:07 PM
yury`m joined the channel
13:13 PM
nickstenn
perhaps I'm being special, but I don't think notifications are working on master
13:23 PM
ujvari: are you about?
13:23 PM
ujvari
nickstenn: yes
13:24 PM
nickstenn
notifications are behaving really oddly, and I think I've finally worked out what's going on
13:24 PM
ujvari
Oh?
13:24 PM
nickstenn
If I sign up to an application at "localhost", then I can log into the same application at "127.0.0.1"
13:25 PM
but because the notifications package does crazy shit with acct URIs rather than just JOINing with the user table, the subscriptions aren't found
13:25 PM
I'm not sure this is strictly a problem with the notifications package
13:25 PM
but it's one place where the problem manifests itself
13:26 PM
ujvari
So,... it was a long term decision to decouple subscriptions and user table
13:26 PM
but yes, I hate this @domain problem
13:26 PM
Cumbersome and terrible all the way down
13:26 PM
nickstenn
if we *had* managed to decouple accounts from notifications then I might be in favour
13:27 PM
but we haven't
13:28 PM
ujvari
hmm, yes, the gateway, sadly yes
13:29 PM
nickstenn
they're just fundamentally not decouplable -- the notification package needs to know a user's email address
13:30 PM
ujvari
yes. Just one question. And it doesn't cause problem with the annotations?
13:30 PM
so you wouldn't get: acct:user@127.0.0.1 and
13:30 PM
nickstenn
yes, it does
13:30 PM
ujvari
acct:user@localhost ?
13:30 PM
ah okay
13:30 PM
I was always telling
13:30 PM
to get a domain from the backend
13:30 PM
and use always that
13:32 PM
so what are you planning to do? How can I help?
13:32 PM
nickstenn
i'm not really sure at the moment
13:32 PM
I'm not even sure I fully understand what's going on
13:33 PM
ujvari
Okay, I can help on that. Which part you don't understand?
13:33 PM
s/on/with
13:34 PM
nickstenn
I'm running FEATURE_NOTIFICATION=True ./run
13:34 PM
And I create two user accounts
13:34 PM
with user A, I create an annotation
13:34 PM
with user B I reply to user A's annotation
13:34 PM
I expect to see an email printed to the console
13:34 PM
but I don't
13:35 PM
ujvari
are we still logging the mail sent?
13:35 PM
nickstenn
the AnnotationEvent subscriber in h.notification.reply_template (?) doesn't even seem to get invoked
13:35 PM
user A has a checked checkbox in their notification settings
13:35 PM
(as does user B, which I suppose isn't relevant)
13:35 PM
ujvari
give me a few minutes, I want to try it out
13:39 PM
Wow... I think we no longer have the AnnotationEvent?
13:39 PM
Is it possible
13:39 PM
?
13:39 PM
nickstenn
no
13:39 PM
h/events.py
13:39 PM
and it's triggered in h/api.py
13:39 PM
just grep for it
13:39 PM
ujvari
hmm
13:39 PM
okay
13:39 PM
checking
13:39 PM
nickstenn
something jolly fishy is going on, though
13:40 PM
ujvari
yes, I suspect we do not trigger the event
13:40 PM
(still checking)
13:41 PM
Okay, it gets triggered
13:41 PM
in the api
13:43 PM
Now that is strange, the streamer.py gets the event but the reply_template.py doesn't
13:44 PM
nickstenn
yep
13:45 PM
ujvari
hmm
13:48 PM
nickstenn
seems to have broken in 29c1500
13:48 PM
ujvari
hmm
13:49 PM
so an import conf issue.. hmm
13:50 PM
I'll quote your favorite sentence: We need at least one test case to check if notifications are still working
13:51 PM
nickstenn
but this appears at the moment to be something fucked with pyramid
13:51 PM
i mean, maybe it's not
13:51 PM
but I can't see what the problem is
13:52 PM
ujvari
Yes, me neither at this moment
13:52 PM
nickstenn
ohhhhhh
13:52 PM
ohhhh, shit
13:52 PM
ujvari
?
13:52 PM
nickstenn
i bet you I know what the problem is
13:53 PM
request !== request
13:53 PM
api is a separate wsgi app
13:53 PM
ujvari
I beg your pardon?
13:53 PM
...ooooh
13:53 PM
nickstenn
with a separate registry
13:53 PM
ujvari
...
13:53 PM
oooh..
13:53 PM
nickstenn
oh man
13:53 PM
that's...
13:53 PM
ujvari
oooh joooy
13:53 PM
nickstenn
that's going to be a nightmare to fix
13:53 PM
ujvari
Agreed
13:54 PM
nickstenn
hang on, though
13:54 PM
why does the streamer work?
13:55 PM
ujvari
hmm.. good question
13:59 PM
nickstenning: stupid question
13:59 PM
in your development.ini
14:00 PM
have you set the feature to true?
14:00 PM
it is set to false by default
14:00 PM
nickstenn
[13:34:13] <+nickstenn>I'm running FEATURE_NOTIFICATION=True ./run
14:00 PM
ujvari
yes, then next
14:00 PM
if you check
14:00 PM
create_api() in the app.py
14:00 PM
then the notification feature is not added to there
14:01 PM
nickstenn
ohhhh
14:01 PM
i think you might be right
14:01 PM
in fact I think you must be right
14:01 PM
good work
14:01 PM
the issue is exactly what we said it was
14:01 PM
and it's that the subscribers aren't registered in the API application
14:01 PM
jesus
14:01 PM
what a nightmare
14:02 PM
ujvari
oh yes
14:08 PM
nickstenn
oh ffs, I don't even understand what the point of separating the fucking API is
14:08 PM
in order to make this work we need to include the notifications subscriber
14:08 PM
which needs access to the database
14:08 PM
which means we need to include the accounts package
14:08 PM
I just don't get why we're pretending these are all beautifully decoupled when they're not
14:08 PM
vannevar joined the channel
14:10 PM
ujvari
Hmm, I think this something we left behind, originally there were more refacts to be expected to make the separation clean (Now I remember) but they never came, sadly.
14:11 PM
nickstenn
s/refactorings/changes/, but whatever
14:11 PM
it's just broken
14:11 PM
ugh
14:16 PM
ujvari
What should be done? Notifs are broken on prod with this
14:20 PM
nickstenn
I'm working on it
14:21 PM
ujvari
Ok, do you know a fast way for decoupling?
14:30 PM
GitHub185 joined the channel
14:30 PM
NOTICE: [h] BigBlueHat force-pushed fix-og-title from ac43791 to d576c14: https://github.com/hypothesis/h/commits/fix-og-title
14:30 PM
NOTICE: h/fix-og-title d576c14 BigBlueHat: Make Document plugin always return strings
14:30 PM
GitHub185 has left the channel
14:40 PM
travis-ci joined the channel
14:40 PM
travis-ci
hypothesis/h#4969 (fix-og-title - d576c14 : BigBlueHat): The build was fixed.
14:40 PM
14:40 PM
14:40 PM
travis-ci has left the channel
15:43 PM
GitHub139 joined the channel
15:43 PM
NOTICE: [h] nickstenning created fix-notifications (+4 new commits): https://github.com/hypothesis/h/compare/158520313ba2^...e5c29b0a5647
15:43 PM
NOTICE: h/fix-notifications 1585203 Nick Stenning: Remove unused grandparent reply fetching
15:43 PM
NOTICE: h/fix-notifications a290c04 Nick Stenning: Move all application config into create_app