Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MM-14740] Consolidate configuration to support integration of MSI/GPO #959

Merged
merged 14 commits into from
Apr 11, 2019

Conversation

deanwhillier
Copy link
Contributor

Before submitting, please confirm you've

Please provide the following information:

Summary
This PR consolidates configuration handling (loading, combining default/build configs, updating, saving) in preparation for integrating Windows GPO data (function stub included). The new configuration object is instantiated in the main thread and any primary views loaded in the renderer thread. Each instance is setup with the ability to notify the other instance of changes in order to maintain synchronization between loaded config data in the main and renderer processes. This multi instance setup to needed to support existing tests and their access to config data.

@deanwhillier deanwhillier added the 2: Dev Review Requires review by a core committer label Apr 10, 2019
@deanwhillier deanwhillier added this to the v4.3.0 milestone Apr 10, 2019
@deanwhillier deanwhillier requested review from wget and enahum April 10, 2019 04:43
@deanwhillier
Copy link
Contributor Author

deanwhillier commented Apr 10, 2019

Hmm, tests run fine locally ...

  58 passing (3m)
  14 pending

@enahum
Copy link
Contributor

enahum commented Apr 10, 2019

TypeError: Cannot read property 'should' of undefined
      at Context.should (test/specs/browser/settings_test.js:223:33)
      at processTicksAndRejections (internal/process/next_tick.js:81:5)

src/browser/components/SettingsPage.jsx Outdated Show resolved Hide resolved
src/browser/components/SettingsPage.jsx Show resolved Hide resolved
src/browser/index.jsx Show resolved Hide resolved
src/common/config/index.js Outdated Show resolved Hide resolved
src/common/config/index.js Outdated Show resolved Hide resolved
@deanwhillier
Copy link
Contributor Author

Regarding tests, that failing test works fine locally and I'm not entirely sure why it wouldn't work here. I'm going to try something though ...

Can’t seem to get this test to work, even though what is being tested works fine in the actual app.
click of ‘light’ option wasn’t triggering an update as it is selected by default, so flipped the order to first select ‘dark’ and then ‘light’
@deanwhillier
Copy link
Contributor Author

deanwhillier commented Apr 10, 2019

Okay, so test is fixed. The test was initially trying to 'click' on the light theme option, but that option is selected by default so I reversed the test so that it first 'clicks' on dark and then light. Test passes now. This didn't manifest before because the old way of handling the config wrote all config options every time, which meant that light was already set in the test config.json file.

@wget
Copy link
Collaborator

wget commented Apr 11, 2019

@wget wget merged commit 4137d0e into master Apr 11, 2019
@enahum
Copy link
Contributor

enahum commented Apr 11, 2019

Awesome!! Lets add the MSI stuff

@enahum enahum deleted the config-consolidation branch April 11, 2019 11:59
@hanzei hanzei added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels May 14, 2019
JtheBAB pushed a commit to JtheBAB/desktop that referenced this pull request Jan 17, 2020
mattermost#959)

* config logic consolidation

* filter out duplicate servers

* build default teams and GPO teams are not editable

* tweaks

* tweak config architecture to support tests

- config needs to load in each process (main and renderer) and then synchronize with each other
- finished saving ui functionality

* add esdoc comments to new config module

* remove old config-related files

* revert eslint comment

* don’t filter teams, duplicates are allowed

* some code review tweaks

* Remove unecessary deepCopy

* tweak for tests

* Skip test for now

Can’t seem to get this test to work, even though what is being tested works fine in the actual app.

* fix for failing test

click of ‘light’ option wasn’t triggering an update as it is selected by default, so flipped the order to first select ‘dark’ and then ‘light’
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants