diff --git a/packages/core/src/awsService/appBuilder/explorer/nodes/appNode.ts b/packages/core/src/awsService/appBuilder/explorer/nodes/appNode.ts index 497e5aa22ad..5f8c6b4a81e 100644 --- a/packages/core/src/awsService/appBuilder/explorer/nodes/appNode.ts +++ b/packages/core/src/awsService/appBuilder/explorer/nodes/appNode.ts @@ -17,7 +17,6 @@ import { getSamCliContext } from '../../../../shared/sam/cli/samCliContext' import { SamCliListResourcesParameters } from '../../../../shared/sam/cli/samCliListResources' import { getDeployedResources, StackResource } from '../../../../lambda/commands/listSamResources' import * as path from 'path' -import fs from '../../../../shared/fs/fs' import { generateStackNode } from './deployedStack' export class AppNode implements TreeNode { @@ -61,19 +60,9 @@ export class AppNode implements TreeNode { // indicate that App exists, but it is empty if (resources.length === 0) { - if (await fs.exists(this.location.samTemplateUri)) { - return [ - createPlaceholderItem( - localize( - 'AWS.appBuilder.explorerNode.app.noResource', - '[No resource found in IaC template]' - ) - ), - ] - } return [ createPlaceholderItem( - localize('AWS.appBuilder.explorerNode.app.noTemplate', '[No IaC templates found in Workspaces]') + localize('AWS.appBuilder.explorerNode.app.noResource', '[No resource found in SAM template]') ), ] } @@ -84,7 +73,7 @@ export class AppNode implements TreeNode { createPlaceholderItem( localize( 'AWS.appBuilder.explorerNode.app.noResourceTree', - '[Unable to load Resource tree for this App. Update IaC template]' + '[Unable to load Resource tree for this App. Update SAM template]' ) ), ] diff --git a/packages/core/src/awsService/appBuilder/explorer/nodes/rootNode.ts b/packages/core/src/awsService/appBuilder/explorer/nodes/rootNode.ts index ce0406fd874..941ad8ec0f0 100644 --- a/packages/core/src/awsService/appBuilder/explorer/nodes/rootNode.ts +++ b/packages/core/src/awsService/appBuilder/explorer/nodes/rootNode.ts @@ -26,7 +26,7 @@ export async function getAppNodes(): Promise { if (appsFound.length === 0) { return [ createPlaceholderItem( - localize('AWS.appBuilder.explorerNode.noApps', '[No IaC templates found in Workspaces]') + localize('AWS.appBuilder.explorerNode.noApps', '[No SAM templates found in Workspaces]') ), ] } diff --git a/packages/core/src/test/shared/applicationBuilder/explorer/nodes/appNode.test.ts b/packages/core/src/test/shared/applicationBuilder/explorer/nodes/appNode.test.ts index 1ebed1f9069..80d83a8303c 100644 --- a/packages/core/src/test/shared/applicationBuilder/explorer/nodes/appNode.test.ts +++ b/packages/core/src/test/shared/applicationBuilder/explorer/nodes/appNode.test.ts @@ -90,7 +90,7 @@ describe('AppNode', () => { const resourceNode = resources[0] as TreeNode assert.strictEqual(resourceNode.id, 'placeholder') - assert.strictEqual(resourceNode.resource, '[No IaC templates found in Workspaces]') + assert.strictEqual(resourceNode.resource, '[No resource found in SAM template]') assert(getAppStub.calledOnce) assert(getStackNameStub.calledOnce) assert(generateStackNodeStub.notCalled) @@ -157,7 +157,7 @@ describe('AppNode', () => { assert.strictEqual(resourceNode.id, 'placeholder') assert.strictEqual( resourceNode.resource, - '[Unable to load Resource tree for this App. Update IaC template]' + '[Unable to load Resource tree for this App. Update SAM template]' ) assert(getAppStub.calledOnce) assert(getStackNameStub.notCalled) diff --git a/packages/core/src/test/shared/applicationBuilder/explorer/nodes/rootNode.test.ts b/packages/core/src/test/shared/applicationBuilder/explorer/nodes/rootNode.test.ts index a6551bd3507..f5711832ad6 100644 --- a/packages/core/src/test/shared/applicationBuilder/explorer/nodes/rootNode.test.ts +++ b/packages/core/src/test/shared/applicationBuilder/explorer/nodes/rootNode.test.ts @@ -34,7 +34,7 @@ describe('getAppNodes', async () => { const appNodes = await getAppNodes() assert.strictEqual(appNodes.length, 1) assert.strictEqual(appNodes[0].id, 'placeholder') - assert.strictEqual(appNodes[0].resource, '[No IaC templates found in Workspaces]') + assert.strictEqual(appNodes[0].resource, '[No SAM templates found in Workspaces]') }) it('should return all SAM projects as AppNode', async () => { diff --git a/packages/toolkit/.changes/next-release/Bug Fix-3f75e95c-f940-42e3-b0e2-b6a3b9143a58.json b/packages/toolkit/.changes/next-release/Bug Fix-3f75e95c-f940-42e3-b0e2-b6a3b9143a58.json new file mode 100644 index 00000000000..dd25c6eb821 --- /dev/null +++ b/packages/toolkit/.changes/next-release/Bug Fix-3f75e95c-f940-42e3-b0e2-b6a3b9143a58.json @@ -0,0 +1,4 @@ +{ + "type": "Bug Fix", + "description": "SAM debugging: misleading 'IaC' message/placeholder" +}