Update connectivity. Delay tor connection until the end of setup #29

Merged
sarah merged 7 commits from tor-setup into main 2023-06-13 18:43:49 +00:00
Owner
No description provided.
dan was assigned by sarah 2023-05-24 19:28:12 +00:00
sarah added 1 commit 2023-05-24 19:28:13 +00:00
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/autobindings/94
dan reviewed 2023-05-24 20:38:33 +00:00
@ -171,1 +169,3 @@
settingsFile.WriteGlobalSettings(globalSettings)
// start with an Error ACN
globalACN = connectivity.NewProxyACN(&connectivity.ErrorACN{})
// settingsFile.WriteGlobalSettings(globalSettings)
Owner

delete?

delete?
dan marked this conversation as resolved
@ -198,0 +197,4 @@
// NOTE: This can block until finishing, so we wrap it in a
// go routine...
go func() {
newACN, globalSettings := buildACN(application.ReadSettings(), globalTorPath, globalAppDir)
Owner

we've already loaded settings above and this is operating in a seperate thread. i guess the globalSettings will be shaddowed but then the SettingsFile.WriteGlobalSettings(globalSettings) seems like a bad choice, this isnt the authoritative thread? also what would cause the settings to change here in this much smaller scope? should buildACN no longer return settings since I think that was just historical necesity but then we moved settings into app anyways?

we've already loaded settings above and this is operating in a seperate thread. i guess the `globalSettings` will be shaddowed but then the `SettingsFile.WriteGlobalSettings(globalSettings)` seems like a bad choice, this isnt the authoritative thread? also what would cause the settings to change here in this much smaller scope? should buildACN no longer return settings since I think that was just historical necesity but then we moved settings into app anyways?
dan marked this conversation as resolved
@ -198,0 +201,4 @@
settingsFile.WriteGlobalSettings(globalSettings)
globalACN.ReplaceACN(newACN)
application.QueryACNVersion()
// Settings may have changed...
Owner

also application.QueryACNStatus() probably

also `application.QueryACNStatus()` probably
dan marked this conversation as resolved
sarah added 1 commit 2023-05-24 21:05:59 +00:00
continuous-integration/drone/pr Build is pending Details
6f427d282b
Much nicer Tor Handling
sarah added 1 commit 2023-05-24 21:06:24 +00:00
continuous-integration/drone/pr Build is pending Details
2b67e4b9b3
Remove commented out code
dan reviewed 2023-05-25 02:08:10 +00:00
@ -411,0 +417,4 @@
currentSettings.CustomTorrc = settings.CustomTorrc
application.UpdateSettings(currentSettings)
globalACN.ReplaceACN(newAcn)
application.QueryACNVersion()
Owner
		`application.QueryACNStatus()` as well
`application.QueryACNStatus()` as well
Owner

pretty sure we still need application.QueryACNStatus() as well I think?

pretty sure we still need `application.QueryACNStatus()` as well I think?
dan marked this conversation as resolved
dan reviewed 2023-05-25 02:09:43 +00:00
@ -411,0 +423,4 @@
settings = application.ReadSettings()
settingsJson, _ := json.Marshal(settings)
application.GetPrimaryBus().Publish(event.NewEvent(UpdateGlobalSettings, map[event.Field]string{event.Data: string(settingsJson)}))
}
Owner

Can we handle error? can ErrorACN have an alt constructor that takes an error string, so we can create a new one with the error, swap it in, and update status, so user can try hitting reset ACN again possibly?

Can we handle error? can ErrorACN have an alt constructor that takes an error string, so we can create a new one with the error, swap it in, and update status, so user can try hitting reset ACN again possibly?
sarah added 1 commit 2023-06-12 17:17:30 +00:00
continuous-integration/drone/pr Build is running Details
a18d9f0d17
Propagate update to ErrorACN
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/autobindings/97
sarah added 1 commit 2023-06-12 17:25:31 +00:00
continuous-integration/drone/pr Build is running Details
6165b03b75
Initializing ErrorACN with an error
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/autobindings/98
dan reviewed 2023-06-12 22:45:12 +00:00
@ -411,0 +424,4 @@
settings = application.ReadSettings()
settingsJson, _ := json.Marshal(settings)
application.GetPrimaryBus().Publish(event.NewEvent(UpdateGlobalSettings, map[event.Field]string{event.Data: string(settingsJson)}))
}
Owner
else {

	globalACN.ReplaceACN(NewErrorACN(err)
    application.QueryACNStatus()
}```

to propegate real tor error to ui
``` else { globalACN.ReplaceACN(NewErrorACN(err) application.QueryACNStatus() }``` to propegate real tor error to ui
sarah added 1 commit 2023-06-13 17:06:10 +00:00
continuous-integration/drone/pr Build is running Details
4713f25755
propagate ACN status
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/autobindings/99
sarah added 1 commit 2023-06-13 17:50:31 +00:00
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
1efc334258
Update Cwtch to 0.20.8
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/autobindings/101
dan approved these changes 2023-06-13 18:28:32 +00:00
sarah merged commit 1efc334258 into main 2023-06-13 18:43:49 +00:00
Sign in to join this conversation.
No reviewers
dan
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/autobindings#29
No description provided.