-
Notifications
You must be signed in to change notification settings - Fork 5
Fix nas config and logConfig #135
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
base: master
Are you sure you want to change the base?
Conversation
7125074 to
abbd147
Compare
abbd147 to
b4c3f0d
Compare
| enableInstanceMetrics: true | ||
| enableRequestMetrics: true | ||
| logBeginRule: DefaultRegex | ||
| enableInstanceMetrics: ${customFields.enableInstanceMetrics} |
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.
这个感觉有点问题啊,不应该是跟 376-380 行一样的逻辑吗
| const { project, logstore } = await sls.deploy(); | ||
| const logAutoConfig = parseAutoConfig(this.local.logConfig as string); | ||
| const logParams = logAutoConfig?.params || {}; | ||
| const existingLogConfig = |
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.
这里已经是 sls Auto 的逻辑了, 为什么还有 existingLogConfig?
| handler: index.handler | ||
| memorySize: 128 | ||
| timeout: 60 | ||
| nasConfig: auto|mountDir=/custom/nas/mount/path|serverAddr=/custom/nas/mount/path |
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.
| const customMountDir = params.mountDir | ||
| ? validateAndNormalizePath(params.mountDir, 'mountDir') | ||
| : `/mnt/${functionName}`; | ||
| const customServerAddr = params.serverAddr ? params.serverAddr : `${functionName}`; |
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.
这个 params.serverAddr 名字叫 params.nasDir 更容易理解点, 而且和 fc 的 serverAddr 没有冲突
| let serverAddr = `${mountTargetDomain}:/${functionName}`; | ||
| const nasAutoConfig = parseAutoConfig(this.local.nasConfig as string); | ||
| const params = nasAutoConfig?.params || {}; | ||
| const customMountDir = params.mountDir |
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.
customMountDir 改成 fcDir 吧,更容易理解点
| const nasAutoConfig = parseAutoConfig(this.local.nasConfig as string); | ||
| const params = nasAutoConfig?.params || {}; | ||
| const customMountDir = params.mountDir | ||
| ? validateAndNormalizePath(params.mountDir, 'mountDir') |
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.


No description provided.