Bug 563634 - Migrate preference remote_connection_timeout from UI preferences to Core preferences
Summary: Migrate preference remote_connection_timeout from UI preferences to Core pref...
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 5.10   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-27 09:31 EDT by Thomas Wolf CLA
Modified: 2020-09-28 11:08 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wolf CLA 2020-05-27 09:31:01 EDT
This preference setting should be stored in the EGit Core preferences, not in the UI preferences. Migration must not break existing setups.

Having the preference in the core preferences would allow the ProjectReferenceImporter to use it. Currently it uses a hard-coded time-out of 60 seconds.
Comment 1 Michael Keppler CLA 2020-05-28 03:46:17 EDT
Your suggestion is clean, but has a certain risk of other people referencing the old settings value in oomph setups and the like. Couldn't we instead ask the PreferenceService from the importer to read the value from the UI plugin preference store? Assuming a normal egit installation that should always work well, even though it's an access violating the architectural dependencies.
Comment 2 Thomas Wolf CLA 2020-05-28 03:53:41 EDT
Yuck.

First, AFAIK preferences and where and how they are stored are not API. Anyone accessing our preferences via the IPreferencesService is welcome to do so, but he must not make any assumptions that the preference names would be stable.

Second, I had thought of copying the preference from the UI prefs to the Core prefs (if it doesn't exist in core already) and then removing it from the UI prefs in the UI Activator. So if an Oomph setup sets the pref in UI, it won't be in core, and the Activator will copy it. If a later Oomph setup check re-adds the pref in UI, that's redundant and won't ever be read, but since the it's been copied to the core prefs already, it doesn't hurt either.

Should be transparent for Oomph users, shouldn't it?
Comment 3 Thomas Wolf CLA 2020-05-31 11:46:59 EDT
The preference key must change to "core_remote_connection_timeout" when it's migrated.
Comment 4 Eclipse Genie CLA 2020-07-04 13:28:47 EDT
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/165838
Comment 6 Matthias Sohn CLA 2020-09-28 11:03:07 EDT
https://git.eclipse.org/r/c/egit/egit/+/165838 was merged as well
Comment 7 Eclipse Genie CLA 2020-09-28 11:08:58 EDT
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit-github/+/169981