Session Id moved to server config

Summary:
Session Id should be shared between client and server, but it was defined deep in the client (redux store).

The proposed solution presented below is to move the session id to the server configuration. By doing this, it becomes available to both server and client VERY early in the application life-cycle for both Electron and non-Electron builds.

Reviewed By: LukeDefeo

Differential Revision: D48520367

fbshipit-source-id: ca959b27ab18b1a2e4cd2fac1d28545664f1b514
This commit is contained in:
Lorenzo Blasa
2023-08-22 05:16:20 -07:00
committed by Facebook GitHub Bot
parent 82e9277e64
commit 17cfa0e571
6 changed files with 9 additions and 4 deletions

View File

@@ -39,13 +39,13 @@ import {
Logger,
parseEnvironmentVariables,
setLoggerInstance,
uuid,
wrapRequire,
} from 'flipper-common';
import constants from './fb-stubs/constants';
import {initializeElectron} from './electron/initializeElectron';
import path from 'path';
import fs from 'fs-extra';
import os from 'os';
import {ElectronIpcClientRenderer} from './electronIpc';
import {KeytarModule} from 'flipper-server-core/src/utils/keytar';
import {initCompanionEnv} from 'flipper-server-companion';
@@ -167,6 +167,7 @@ async function getFlipperServer(
const getEmbeddedServer = async () => {
const server = new FlipperServerImpl(
{
sessionId: uuid(),
environmentInfo,
env: parseEnvironmentVariables(env),
gatekeepers: gatekeepers,