From 3dcfbd40ef8526f5a7825bfb39cb3c442ed8460f Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 20 Oct 2020 15:23:18 -0700 Subject: [PATCH] Revert "APIGW: disable all APIGW features" #127 APIGW was disabled temporarily on main branch for scheduling reasons, but must be enabled for Cloud9. Reverts commit 6b4f1f081be3d39029c9c02aba2b6138ea8e3c71. --- src/apigateway/activation.ts | 5 ----- src/awsexplorer/regionNode.ts | 5 +---- .../shared/codelens/samTemplateCodeLensProvider.test.ts | 4 ---- src/shared/cloudformation/templateSymbolResolver.ts | 4 ---- src/shared/featureToggle.ts | 2 -- 5 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/apigateway/activation.ts b/src/apigateway/activation.ts index 3d3968b5472..45007751414 100644 --- a/src/apigateway/activation.ts +++ b/src/apigateway/activation.ts @@ -8,7 +8,6 @@ import { RestApiNode } from './explorer/apiNodes' import { invokeRemoteRestApi } from './commands/invokeRemoteRestApi' import { copyUrlCommand } from './commands/copyUrl' import { ExtContext } from '../shared/extensions' -import * as featureToggle from '../shared/featureToggle' /** * Activate API Gateway functionality for the extension. @@ -17,10 +16,6 @@ export async function activate(activateArguments: { extContext: ExtContext outputChannel: vscode.OutputChannel }): Promise { - if (featureToggle.disableApigw) { - return - } - const extensionContext = activateArguments.extContext.extensionContext const regionProvider = activateArguments.extContext.regionProvider extensionContext.subscriptions.push( diff --git a/src/awsexplorer/regionNode.ts b/src/awsexplorer/regionNode.ts index 425a6ab9561..a0a8ab9482c 100644 --- a/src/awsexplorer/regionNode.ts +++ b/src/awsexplorer/regionNode.ts @@ -18,7 +18,6 @@ import { AWSTreeNodeBase } from '../shared/treeview/nodes/awsTreeNodeBase' import { StepFunctionsNode } from '../stepFunctions/explorer/stepFunctionsNodes' import { DEFAULT_PARTITION } from '../shared/regions/regionUtilities' import { SsmDocumentNode } from '../ssmDocument/explorer/ssmDocumentNode' -import * as featureToggle from '../shared/featureToggle' /** * An AWS Explorer node representing a region. @@ -49,9 +48,7 @@ export class RegionNode extends AWSTreeNodeBase { // This interface exists so we can add additional nodes to the array (otherwise Typescript types the array to what's already in the array at creation) const partitionId = regionProvider.getPartitionId(this.regionCode) ?? DEFAULT_PARTITION const serviceCandidates = [ - ...(featureToggle.disableApigw - ? [] - : [{ serviceId: 'apigateway', createFn: () => new ApiGatewayNode(partitionId, this.regionCode) }]), + { serviceId: 'apigateway', createFn: () => new ApiGatewayNode(partitionId, this.regionCode) }, { serviceId: 'cloudformation', createFn: () => new CloudFormationNode(this.regionCode) }, { serviceId: 'lambda', createFn: () => new LambdaNode(this.regionCode) }, ...(isCloud9() ? [] : [{ serviceId: 'logs', createFn: () => new CloudWatchLogsNode(this.regionCode) }]), diff --git a/src/integrationTest/shared/codelens/samTemplateCodeLensProvider.test.ts b/src/integrationTest/shared/codelens/samTemplateCodeLensProvider.test.ts index f5f2499fe6b..c58140621b1 100644 --- a/src/integrationTest/shared/codelens/samTemplateCodeLensProvider.test.ts +++ b/src/integrationTest/shared/codelens/samTemplateCodeLensProvider.test.ts @@ -11,7 +11,6 @@ import { SamTemplateCodeLensProvider } from '../../../shared/codelens/samTemplat import { LaunchConfiguration } from '../../../shared/debug/launchConfiguration' import { API_TARGET_TYPE, TEMPLATE_TARGET_TYPE } from '../../../shared/sam/debugger/awsSamDebugConfiguration' import * as workspaceUtils from '../../../shared/utilities/workspaceUtils' -import * as featureToggle from '../../../shared/featureToggle' describe('SamTemplateCodeLensProvider', async () => { let codeLensProvider: SamTemplateCodeLensProvider = new SamTemplateCodeLensProvider() @@ -29,9 +28,6 @@ describe('SamTemplateCodeLensProvider', async () => { }) it('provides a CodeLens for a file with a new resource', async () => { - if (featureToggle.disableApigw) { - return - } const codeLenses = await codeLensProvider.provideCodeLenses( document, instance(mockCancellationToken), diff --git a/src/shared/cloudformation/templateSymbolResolver.ts b/src/shared/cloudformation/templateSymbolResolver.ts index 05b3f88df85..bafa0acf27a 100644 --- a/src/shared/cloudformation/templateSymbolResolver.ts +++ b/src/shared/cloudformation/templateSymbolResolver.ts @@ -7,7 +7,6 @@ import { safeLoad } from 'js-yaml' import * as vscode from 'vscode' import { CloudFormation } from './cloudformation' import { waitUntil } from '../utilities/timeoutUtils' -import * as featureToggle from '../featureToggle' /** * SAM template Lambda resource or API Gateway resource. @@ -47,9 +46,6 @@ export class TemplateSymbolResolver { if (kind === 'function') { return funSymbols.map(r => ({ name: r.name, range: r.range, kind: kind })) } - if (featureToggle.disableApigw) { - return [] - } // Api symbols: // // For each Function symbol, find its Api descendants, keeping diff --git a/src/shared/featureToggle.ts b/src/shared/featureToggle.ts index e9d9d0b0338..8638979c9e6 100644 --- a/src/shared/featureToggle.ts +++ b/src/shared/featureToggle.ts @@ -16,8 +16,6 @@ import { SettingsConfiguration, DefaultSettingsConfiguration } from './settingsC */ export enum ActiveFeatureKeys {} -export const disableApigw = true - /** * This class handles feature access for unreleased or gated features. * Example: adding a feature called `NewFeature1`: