Skip to content

Commit

Permalink
[PURIFY][BUILD] Removes isOSS falg from startup script (#248)
Browse files Browse the repository at this point in the history
Signed-off-by: Mihir Soni <[email protected]>
  • Loading branch information
mihirsoni authored Apr 5, 2021
1 parent 3e60e6a commit 3aa0944
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 36 deletions.
1 change: 0 additions & 1 deletion packages/osd-config/src/__mocks__/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export function getEnvOptions(options: DeepPartial<EnvOptions> = {}): EnvOptions
disableOptimizer: true,
cache: true,
dist: false,
oss: false,
runExamples: false,
...(options.cliArgs || {}),
},
Expand Down
6 changes: 0 additions & 6 deletions packages/osd-config/src/__snapshots__/env.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/osd-config/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export interface CliArgs {
watch: boolean;
repl: boolean;
basePath: boolean;
oss: boolean;
/** @deprecated use disableOptimizer to know if the @osd/optimizer is disabled in development */
optimize?: boolean;
runExamples: boolean;
Expand Down
1 change: 0 additions & 1 deletion src/cli/cluster/cluster_manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { Worker } from './worker';

const CLI_ARGS: SomeCliArgs = {
disableOptimizer: true,
oss: false,
quiet: false,
repl: false,
runExamples: false,
Expand Down
10 changes: 1 addition & 9 deletions src/cli/cluster/cluster_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,7 @@ process.env.osdWorkerType = 'managr';

export type SomeCliArgs = Pick<
CliArgs,
| 'quiet'
| 'silent'
| 'repl'
| 'disableOptimizer'
| 'watch'
| 'oss'
| 'runExamples'
| 'cache'
| 'dist'
'quiet' | 'silent' | 'repl' | 'disableOptimizer' | 'watch' | 'runExamples' | 'cache' | 'dist'
>;

const firstAllTrue = (...sources: Array<Rx.Observable<boolean>>) =>
Expand Down
3 changes: 1 addition & 2 deletions src/cli/cluster/run_osd_optimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { runOptimizer, OptimizerConfig, logOptimizerState } from '@osd/optimizer
import { CliArgs } from '../../core/server/config';
import { LegacyConfig } from '../../core/server/legacy';

type SomeCliArgs = Pick<CliArgs, 'watch' | 'cache' | 'dist' | 'oss' | 'runExamples'>;
type SomeCliArgs = Pick<CliArgs, 'watch' | 'cache' | 'dist' | 'runExamples'>;

export function runOsdOptimizer(opts: SomeCliArgs, config: LegacyConfig) {
const optimizerConfig = OptimizerConfig.create({
Expand All @@ -40,7 +40,6 @@ export function runOsdOptimizer(opts: SomeCliArgs, config: LegacyConfig) {
includeCoreBundle: true,
cache: !!opts.cache,
dist: !!opts.dist,
oss: !!opts.oss,
examples: !!opts.runExamples,
pluginPaths: config.get('plugins.paths'),
});
Expand Down
4 changes: 0 additions & 4 deletions src/cli/serve/integration_tests/reload_logging_config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ describe('Server logging configuration', function () {

child = Child.spawn(process.execPath, [
opensearchDashboardsPath,
'--oss',
'--config',
configFilePath,
'--verbose',
Expand Down Expand Up @@ -163,7 +162,6 @@ describe('Server logging configuration', function () {

child = Child.spawn(process.execPath, [
opensearchDashboardsPath,
'--oss',
'--config',
legacyConfig,
'--logging.dest',
Expand Down Expand Up @@ -191,7 +189,6 @@ describe('Server logging configuration', function () {

child = Child.spawn(process.execPath, [
opensearchDashboardsPath,
'--oss',
'--config',
configFilePath,
]);
Expand Down Expand Up @@ -242,7 +239,6 @@ describe('Server logging configuration', function () {

child = Child.spawn(process.execPath, [
opensearchDashboardsPath,
'--oss',
'--config',
configFilePath,
]);
Expand Down
15 changes: 4 additions & 11 deletions src/cli/serve/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ function applyConfigOverrides(rawConfig, opts, extraCliOptions) {
const has = _.partial(_.has, rawConfig);
const merge = _.partial(_.merge, rawConfig);

if (opts.oss) {
delete rawConfig.xpack;
}

if (opts.dev) {
set('env', 'development');

Expand Down Expand Up @@ -179,12 +175,10 @@ export default function (program) {
}

if (!IS_OPENSEARCH_DASHBOARDS_DISTRIBUTABLE) {
command
.option('--oss', 'Start OpenSearch Dashboards without X-Pack')
.option(
'--run-examples',
'Adds plugin paths for all the OpenSearch Dashboards example plugins and runs with no base path'
);
command.option(
'--run-examples',
'Adds plugin paths for all the OpenSearch Dashboards example plugins and runs with no base path'
);
}

if (CAN_CLUSTER) {
Expand Down Expand Up @@ -236,7 +230,6 @@ export default function (program) {
basePath: opts.runExamples ? false : !!opts.basePath,
optimize: !!opts.optimize,
disableOptimizer: !opts.optimizer,
oss: !!opts.oss,
cache: !!opts.cache,
dist: !!opts.dist,
},
Expand Down
1 change: 0 additions & 1 deletion src/core/test_helpers/osd_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export function createRootWithSettings(
repl: false,
basePath: false,
runExamples: false,
oss: true,
disableOptimizer: true,
cache: true,
dist: false,
Expand Down

0 comments on commit 3aa0944

Please sign in to comment.