Upgrade Dependencies + Clean up Groups #350

Merged
dan merged 5 commits from upgrade into master 2021-05-04 20:24:21 +00:00
Owner
No description provided.
dan was assigned by sarah 2021-05-03 21:30:33 +00:00
sarah changed title from Upgrade Dependencies + Disable Inline Invites pending UI Design to Upgrade Dependencies + Clean up Groups 2021-05-03 23:35:10 +00:00
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch/77
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch/79
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/81
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/83
dan requested changes 2021-05-04 19:07:02 +00:00
@ -12,9 +13,11 @@ import (
// may fill that usecase better
func WaitGetPeer(app app2.Application, name string) peer.CwtchPeer {
Owner

this function... seems.. not great, and is only used by app/servermon? do we just want to remove that?

this function... seems.. not great, and is only used by app/servermon? do we just want to remove that?
Author
Owner

See below for my comment on App/Name and Profile.

See below for my comment on App/Name and Profile.
dan marked this conversation as resolved
@ -467,4 +434,3 @@
group := cp.Profile.GetGroup(groupid)
defer cp.mutex.Unlock()
if group == nil {
return errors.New("invalid group id")
Owner

need an unlock before return

need an unlock before return
Author
Owner

There is an unlock 2 lines down...

There is an unlock 2 lines down...
Owner

not inside the if group == nil { return

that error would leave it locked no?

not inside the if group == nil { return that error would leave it locked no?
Author
Owner

Ah good catch!

Ah good catch!
@ -617,1 +576,4 @@
}
if key == attr.GetLocalScope("name") {
return cp.Profile.Name, true
Owner

wait, why this? why not using the attribute map like all others?

do you have a paired override for setAttribute? which also we prolly shouldn't do? I thougt we were just gonna delete Profile.Name

wait, why this? why not using the attribute map like all others? do you have a paired override for setAttribute? which also we prolly shouldn't do? I thougt we were just gonna delete Profile.Name
Author
Owner

this code will use default to set attribute first..this is a fallback for the case where we create a profile (which is prior to InitForEvents) and then immediately try to look it up (like in the integration test)...we don't yet have any way to alert the storage engine to save name as an attribute.

At some point we should reconcile this - probably by removing Name from profile, and any reference in App(Client/Server) - but that is a bigger change that touches a lot more of the integration test and app so I felt this was a good compromise that removes the troublesome APIs while preserving the speciality of Name until we have the time to redo Application to not rely on it.

this code will use default to set attribute first..this is a fallback for the case where we create a profile (which is prior to InitForEvents) and then immediately try to look it up (like in the integration test)...we don't yet have any way to alert the storage engine to save name as an attribute. At some point we should reconcile this - probably by removing Name from profile, and any reference in App(Client/Server) - but that is a bigger change that touches a lot more of the integration test and app so I felt this was a good compromise that removes the troublesome APIs while preserving the speciality of Name until we have the time to redo Application to not rely on it.
Owner

ah i see, I missed its a fall through if we didnt get the attribute which we check first!
yeah the UI has all that code around name getting and falling back to onion but yeah putting it here is prolly wrong. ok thats fine

ah i see, I missed its a fall through if we didnt get the attribute which we check first! yeah the UI has all that code around name getting and falling back to onion but yeah putting it here is prolly wrong. ok thats fine
dan marked this conversation as resolved
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/85
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/87
dan merged commit deea608da6 into master 2021-05-04 20:24:20 +00:00
Sign in to join this conversation.
No description provided.