From 416358f540ebbe4f966e2b0c54f3b01f7bcaa860 Mon Sep 17 00:00:00 2001 From: Tanuj Mittal Date: Wed, 14 Jul 2021 18:12:14 -0700 Subject: [PATCH] Cleanup Schema Analyzer feature flag (#938) --- configs/mpac.json | 3 +-- src/Common/Constants.ts | 1 - src/ConfigContext.ts | 2 -- src/Explorer/Explorer.tsx | 5 ----- src/Platform/Hosted/extractFeatures.ts | 2 -- src/hooks/useKnockoutExplorer.ts | 3 --- 6 files changed, 1 insertion(+), 15 deletions(-) diff --git a/configs/mpac.json b/configs/mpac.json index d8e5604d2..7c270c6d5 100644 --- a/configs/mpac.json +++ b/configs/mpac.json @@ -1,4 +1,3 @@ { - "JUNO_ENDPOINT": "https://tools-staging.cosmos.azure.com", - "enableSchemaAnalyzer": true + "JUNO_ENDPOINT": "https://tools-staging.cosmos.azure.com" } \ No newline at end of file diff --git a/src/Common/Constants.ts b/src/Common/Constants.ts index da1871ffe..fc97d559d 100644 --- a/src/Common/Constants.ts +++ b/src/Common/Constants.ts @@ -94,7 +94,6 @@ export class Flights { public static readonly MongoIndexEditor = "mongoindexeditor"; public static readonly MongoIndexing = "mongoindexing"; public static readonly AutoscaleTest = "autoscaletest"; - public static readonly SchemaAnalyzer = "schemaanalyzer"; public static readonly PartitionKeyTest = "partitionkeytest"; } diff --git a/src/ConfigContext.ts b/src/ConfigContext.ts index e83a4e9ec..289e650cb 100644 --- a/src/ConfigContext.ts +++ b/src/ConfigContext.ts @@ -27,7 +27,6 @@ export interface ConfigContext { hostedExplorerURL: string; armAPIVersion?: string; allowedJunoOrigins: string[]; - enableSchemaAnalyzer: boolean; msalRedirectURI?: string; } @@ -63,7 +62,6 @@ let configContext: Readonly = { "https://tools-staging.cosmos.azure.com", "https://localhost", ], - enableSchemaAnalyzer: false, }; export function resetConfigContext(): void { diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index 3af74d473..7a8d2465b 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -11,7 +11,6 @@ import { isPublicInternetAccessAllowed } from "../Common/DatabaseAccountUtility" import { getErrorMessage, getErrorStack, handleError } from "../Common/ErrorHandlingUtils"; import * as Logger from "../Common/Logger"; import { QueriesClient } from "../Common/QueriesClient"; -import { configContext } from "../ConfigContext"; import * as DataModels from "../Contracts/DataModels"; import * as ViewModels from "../Contracts/ViewModels"; import { GitHubOAuthService } from "../GitHub/GitHubOAuthService"; @@ -214,10 +213,6 @@ export default class Explorer { }); } - if (configContext.enableSchemaAnalyzer) { - userContext.features.enableSchemaAnalyzer = true; - } - this.refreshExplorer(); } diff --git a/src/Platform/Hosted/extractFeatures.ts b/src/Platform/Hosted/extractFeatures.ts index da2c6d917..25c483c24 100644 --- a/src/Platform/Hosted/extractFeatures.ts +++ b/src/Platform/Hosted/extractFeatures.ts @@ -8,7 +8,6 @@ export type Features = { readonly enableReactPane: boolean; readonly enableRightPanelV2: boolean; readonly enableSchema: boolean; - enableSchemaAnalyzer: boolean; autoscaleDefault: boolean; partitionKeyDefault: boolean; readonly enableSDKoperations: boolean; @@ -54,7 +53,6 @@ export function extractFeatures(given = new URLSearchParams(window.location.sear enableReactPane: "true" === get("enablereactpane"), enableRightPanelV2: "true" === get("enablerightpanelv2"), enableSchema: "true" === get("enableschema"), - enableSchemaAnalyzer: "true" === get("enableschemaanalyzer"), enableSDKoperations: "true" === get("enablesdkoperations"), enableSpark: "true" === get("enablespark"), enableTtl: "true" === get("enablettl"), diff --git a/src/hooks/useKnockoutExplorer.ts b/src/hooks/useKnockoutExplorer.ts index 87deee4e2..86200808c 100644 --- a/src/hooks/useKnockoutExplorer.ts +++ b/src/hooks/useKnockoutExplorer.ts @@ -328,9 +328,6 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) { if (inputs.flights.indexOf(Flights.AutoscaleTest) !== -1) { userContext.features.autoscaleDefault; } - if (inputs.flights.indexOf(Flights.SchemaAnalyzer) !== -1) { - userContext.features.enableSchemaAnalyzer = true; - } if (inputs.flights.indexOf(Flights.PartitionKeyTest) !== -1) { userContext.features.partitionKeyDefault = true; }