-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(lambda): Building Quick Pick structure and Entrypoints #6592
feat(lambda): Building Quick Pick structure and Entrypoints #6592
Conversation
|
0dadc3c
to
bb4eeef
Compare
I didn't see the runtime version search (like python3.9). And could you add a scrnshot on the template preview functionality? |
packages/core/src/awsService/appBuilder/wizards/serverlessLandWizard.ts
Outdated
Show resolved
Hide resolved
packages/core/src/awsService/appBuilder/wizards/serverlessLandWizard.ts
Outdated
Show resolved
Hide resolved
Can you add tests as well? |
const projectRoot = path.resolve(__dirname, '../../../../../') | ||
const metadataPath = path.join(projectRoot, 'src', 'awsService', 'appBuilder', 'models', 'metadata.json') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work when the extension is compiled and loaded through a VSIX or through the official marketplace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still part of the latest version. Did you try it with the built extension? I think we can change it later, but we need to make sure we test the right case. (I feel there should be another proper way of reading the file instead of just going up directories starting on __dirname
, but maybe I'm wrong and this is the way)
packages/core/src/awsService/appBuilder/wizards/serverlessLandWizard.ts
Outdated
Show resolved
Hide resolved
packages/core/src/awsService/appBuilder/wizards/serverlessLandWizard.ts
Outdated
Show resolved
Hide resolved
packages/core/src/awsService/appBuilder/wizards/serverlessLandWizard.ts
Outdated
Show resolved
Hide resolved
@roger-zhangg, there will be no specific runtime version search for this project. As the serverless land does not provide options to select from runtime version. |
a9985e4
to
7ce29c3
Compare
@seshubaws, I'll do it later once the basic implementation is completed. |
7ce29c3
to
9e2ebad
Compare
public override async run(): Promise<CreateServerlessLandWizardForm | undefined> { | ||
try { | ||
// Load metadata from JSON file | ||
const projectRoot = path.resolve(__dirname, '../../../../../') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the best way to get the root? I'd rather have an absolute path rather than this relative way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path.resolve()
function does return an absolute file path.
Previously, when executing the below line of code, an additional /dist
directory was being prepended to the path before the src
directory, resulting in a metadata not found error.
const metadataPath = path.resolve(__dirname, './serverlessland-metadata.json')
packages/core/src/awsService/appBuilder/serverlessLand/serverlessLandWizard.ts
Outdated
Show resolved
Hide resolved
packages/core/src/awsService/appBuilder/serverlessLand/serverlessLandWizard.ts
Outdated
Show resolved
Hide resolved
getLogger().error( | ||
localize( | ||
'AWS.serverlessland.initWizard.general.error', | ||
'Error creating new SAM Application. {0}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine we'll change this message later to not say "SAM"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll handle error and metrics together for the whole project separately
packages/core/src/awsService/appBuilder/serverlessLand/serverlessLandMain.ts
Outdated
Show resolved
Hide resolved
const projectRoot = path.resolve(__dirname, '../../../../../') | ||
const metadataPath = path.join(projectRoot, 'src', 'awsService', 'appBuilder', 'models', 'metadata.json') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still part of the latest version. Did you try it with the built extension? I think we can change it later, but we need to make sure we test the right case. (I feel there should be another proper way of reading the file instead of just going up directories starting on __dirname
, but maybe I'm wrong and this is the way)
packages/core/src/awsService/appBuilder/serverlessLand/serverlessLandWizard.ts
Outdated
Show resolved
Hide resolved
packages/core/src/awsService/appBuilder/serverlessLand/metadataManager.ts
Show resolved
Hide resolved
packages/core/src/awsService/appBuilder/serverlessLand/metadataManager.ts
Outdated
Show resolved
Hide resolved
public override async run(): Promise<CreateServerlessLandWizardForm | undefined> { | ||
try { | ||
// Load metadata from JSON file | ||
const projectRoot = path.resolve(__dirname, '../../../../../') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to double check, is the metadata.json getting copied to the correct location when you build it? Usually you would need modify copyFiles to move it IIRC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is something I'm currently working on. Will correct that in next PR.
packages/core/src/awsService/appBuilder/serverlessLand/wizard.ts
Outdated
Show resolved
Hide resolved
packages/core/src/awsService/appBuilder/serverlessLand/wizard.ts
Outdated
Show resolved
Hide resolved
packages/core/src/awsService/appBuilder/serverlessLand/wizard.ts
Outdated
Show resolved
Hide resolved
68c864f
into
aws:feature/serverlessland
Problem
Adding entry points and Quick Pick structure for Serverless Land integration project. The attached images demonstrate the functionality. The
metadata.json
file is currently a sample, but it will be modified to include the exact list of patterns.Solution
EntryPoints
From AWS Application Builder

From Command Palette

From Lambda in AWS Explorer

From the link in Getting Started Walkthrough

Quick Pick
Pattern selection

Runtime selection

IaC selection

Project location selection

Project Name

feature/x
branches will not be squash-merged at release time.