lowkeyrd

Results 19 issues of lowkeyrd

**支持自定义filter** 需求场景: 1. 函数要通过内网访问OSS或者ACR来省去流量开销,需要函数部署在和OSS或者ACR相同的region,此时最理想的方案是parameter只透出一个endpoint,自动解析出函数的region,例如: ```yaml region: {{ endpoint | parseRegion }} ``` 2. 函数需要连接数据库,比如RDS、HBASE,需要函数部署在和数据库实例相同的vswitch、vpc内,现在需要用户人肉填写这些参数非常不便,最理想的方式是通过数据库实例ID 去查询所在的region、vpc、vswitch,例如: ```yaml vars: output: {{ instanceId | parseRDS } ... region: ${vars.output.region} service: vpcConfig: vpcId: ${vars.output.vpcId}...

现在用s初始化一个组件时,脚手架提供了一些基本的能力,但是在开发组件中,还是要关注很多和业务无关的代码的,比如: 1. 基本所有组件都要handlerInput,这个不是公共方法,我需要copy and paste其他组件的实现 2. 调用其他组件时,需要把当前组件的模型属性转换成调用组件的,开发者除了关注调用组件的props外,还要传递cred、project相关信息。可以把cred、project理解成请求公共头,这个在组件生命周期里都是固定的,当依赖很多其他组件时,要自己封装一个组件调用的class,把公共头包进去,可以参考fc、fc-deploy,完全是两种不同的实现,但其实干的都是一件事。我开发的组件是这么封装的: ![image](https://user-images.githubusercontent.com/5763215/146511843-cbb18894-fd73-4624-8218-795541eec4ad.png) 说白了,Serverless Devs现在没有一个Runtime库,没有为组件的生命周期定义一套接口,让组件都继承或者实现Runtime。 Serverless Devs Core是公共的SDK,承担不了Runtime的角色。 Proposal:提供一套Component/Plugin Runtime,定义组件的生命周期和公共行为,让CLI、Component、Plugin都基于Runtime来实现: 1. CLI基于Runtime编排组件 2. Component实现Runtime,扩展自身行为

现在access只能配置account、ak/sk,但是provider config都是要增加region的,我们现在将region设置到prop里,很不友好。将region设置到access中,可以很方便的将测试、生产环境的profile放到不同的access中,对于ci/cd也更加友好

instanceLifecycleConfig 的体验现在有两个问题: 1. initializer的配置在外层,体验比较割裂,需要挪到instanceLifecycleConfig内,追平控制台效果 2. preStop、preFreeze 在未配置handler时不生效,而custom函数是不需要配置handler的。现场如下: ![image](https://user-images.githubusercontent.com/5763215/174574611-c74cfed3-23e0-4a32-82b3-91628f66b9a9.png) ![image](https://user-images.githubusercontent.com/5763215/174574687-5de861a4-b1f5-472c-a4dd-204f6994d286.png) ![image](https://user-images.githubusercontent.com/5763215/174574845-3e7a7ebe-0863-4311-94c5-c32075e97ef2.png) ![image](https://user-images.githubusercontent.com/5763215/174575040-60cd0c5c-9908-4392-a8bb-b6a7fe8c2618.png)

现在自定义镜像应用,publish.yaml没有默认的镜像地址,用户需要自己创建acr仓库,这个对于体验比较难受。我们发布的镜像示例,应该都发布到公有的镜像仓库上,这样才能做到s init一键式部署 https://github.com/devsapp/start-fc/tree/master/custom-container-function

s invoke 终端显示的日志有问题,控制台正常 工具日志: ![image](https://user-images.githubusercontent.com/5763215/166941951-6bacf9d8-ef4d-4b49-b667-83f9d50b3b58.png) 控制台日志: ![image](https://user-images.githubusercontent.com/5763215/166943265-1d92bab9-80ba-4ef0-b341-7141266aa120.png)

![image](https://user-images.githubusercontent.com/5763215/143041806-1f777c79-fe76-4fae-8c20-03b69a8ef58e.png) 如上图,账号欠费时,创建sls失败,但是仅提示创建sls失败,没有任何附加提示信息。sls client肯定是能返回欠费错误的,此时如果把sls的error信息打印出来,用户完全是可以自助解决的

documentation
high priority

现在关于service的误解很多,我们能否把service和function的抽出单独的组件出来? ```yaml services: fc-service: component: devsapp/fc-service props: region: cn-hangzhou name: test-service internetAccess: true logConfig: auto nasConfig: auto role: '' fc-function-1: component: devsapp/fc-function props: region: ${vars.region} serviceName: ${service.fc-service.output.name} #指定当前工程的service handler: index.handler...

现在是不同service单独展示,效果如下,感觉很割裂: ![image](https://user-images.githubusercontent.com/5763215/147816333-349da0a7-7668-4a48-8445-e1e1c0f51e88.png) 希望的效果,类似s info: ![image](https://user-images.githubusercontent.com/5763215/147816375-a9704e4e-8053-467a-bed4-38b99918b529.png)