-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Cross-signing [1/4] -- hidden devices #5759
Cross-signing [1/4] -- hidden devices #5759
Conversation
This is a prerequisite for cross-signing, as it allows us to create other things that live within the device namespace, so they can be used for signatures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. can you give it a changelog file (probably a .misc
for now) so that the CI passes, and fix the merge conflict?
Might also be worth adding something to the docstrings of the storage functions to clarify that they exclude hidden
devices?
synapse/storage/devices.py
Outdated
) | ||
sql = """ | ||
DELETE FROM devices | ||
WHERE user_id = ? AND device_id = ? AND NOT COALESCE(hidden, ?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having looked at how this works out, I'm really sorry but I think I'm going to revise my original comments here; it's just too awkward. I think the 30s or so it's going to take to add a NOT NULL column to the table will be worth it for not jumping through these hoops and having to manage a tristate.
Really sorry for vacillating on this.
@@ -0,0 +1,18 @@ | |||
/* Copyright 2019 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you give this delta file a different name?
Codecov Report
@@ Coverage Diff @@
## develop #5759 +/- ##
===========================================
- Coverage 63.44% 63.42% -0.02%
===========================================
Files 331 331
Lines 36515 36520 +5
Branches 6035 6038 +3
===========================================
- Hits 23167 23164 -3
- Misses 11704 11710 +6
- Partials 1644 1646 +2 |
095524e
to
c1f0a56
Compare
(by going back to not using SQL directly)
This is a prerequisite for cross-signing, as it allows us to create other things
that live within the device namespace, so they can be used for signatures.
(This is split off from #4970)