Skip to content

Commit be209c4

Browse files
committed
feat: fc3 as defult fc runtime
Signed-off-by: seven <zilisheng1996@gmail.com>
1 parent c453097 commit be209c4

File tree

5 files changed

+80
-103
lines changed

5 files changed

+80
-103
lines changed

package-lock.json

Lines changed: 55 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@geek-fun/serverlessinsight",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "Full life cycle cross providers serverless application management for your fast-growing business.",
55
"homepage": "https://serverlessinsight.geekfun.club",
66
"main": "dist/src/index.js",
@@ -50,10 +50,10 @@
5050
],
5151
"dependencies": {
5252
"@alicloud/openapi-client": "^0.4.12",
53-
"@alicloud/ros-cdk-apigateway": "^1.3.0",
54-
"@alicloud/ros-cdk-core": "^1.3.0",
55-
"@alicloud/ros-cdk-fc3": "^1.3.0",
56-
"@alicloud/ros-cdk-ram": "^1.3.0",
53+
"@alicloud/ros-cdk-apigateway": "^1.4.0",
54+
"@alicloud/ros-cdk-core": "^1.4.0",
55+
"@alicloud/ros-cdk-fc3": "^1.4.0",
56+
"@alicloud/ros-cdk-ram": "^1.4.0",
5757
"@alicloud/ros20190910": "^3.5.0",
5858
"ajv": "^8.17.1",
5959
"chalk": "^5.3.0",

src/stack/iacStack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export class IacStack extends ros.Stack {
139139
fcRegionId: context.region,
140140
functionName: trigger.backend,
141141
roleArn: gatewayAccessRole.attrArn,
142-
// fcVersion: '3.0',
142+
fcVersion: '3.0',
143143
},
144144
},
145145
resultSample: 'ServerlessInsight resultSample',

tests/fixtures/deployFixture.ts

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const oneFcOneGatewayRos = {
7878
FunctionComputeConfig: {
7979
FunctionName: 'demo_fn_gateway',
8080
RoleArn: { 'Fn::GetAtt': ['my-demo-service_role', 'Arn'] },
81-
ServiceName: 'my-demo-service-service',
81+
FcVersion: '3.0',
8282
},
8383
ServiceProtocol: 'FunctionCompute',
8484
},
@@ -95,17 +95,9 @@ export const oneFcOneGatewayRos = {
9595
Handler: 'index.handler',
9696
MemorySize: 128,
9797
Runtime: 'nodejs18',
98-
ServiceName: 'my-demo-service-service',
9998
Timeout: 10,
10099
},
101-
Type: 'ALIYUN::FC::Function',
102-
},
103-
'my-demo-service-service': {
104-
Properties: {
105-
ServiceName: 'my-demo-service-service',
106-
Tags: [{ Key: 'owner', Value: 'geek-fun' }],
107-
},
108-
Type: 'ALIYUN::FC::Service',
100+
Type: 'ALIYUN::FC3::Function',
109101
},
110102
'my-demo-service_apigroup': {
111103
Properties: {
@@ -199,17 +191,9 @@ export const oneFcRos = {
199191
Handler: 'index.handler',
200192
MemorySize: 128,
201193
Runtime: 'nodejs18',
202-
ServiceName: 'my-demo-service-service',
203194
Timeout: 10,
204195
},
205-
Type: 'ALIYUN::FC::Function',
206-
},
207-
'my-demo-service-service': {
208-
Properties: {
209-
ServiceName: 'my-demo-service-service',
210-
Tags: [{ Key: 'owner', Value: 'geek-fun' }],
211-
},
212-
Type: 'ALIYUN::FC::Service',
196+
Type: 'ALIYUN::FC3::Function',
213197
},
214198
},
215199
};

tests/fixtures/serverless-insight.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ functions:
3030
TEST_VAR: ${vars.testv}
3131
TEST_VAR_EXTRA: abcds-${vars.testv}-andyou
3232

33-
databases:
34-
insight_poc_db:
35-
name: insight-poc-db
36-
type: RDS
37-
region: ${vars.region}
38-
instance_class: rds.mysql.t5.xlarge
39-
storage_size: 20
40-
username: root
41-
password: 123456
42-
database: insight_poc_db
43-
33+
#databases:
34+
# insight_poc_db:
35+
# name: insight-poc-db
36+
# type: RDS
37+
# region: ${vars.region}
38+
# instance_class: rds.mysql.t5.xlarge
39+
# storage_size: 20
40+
# username: root
41+
# password: 123456
42+
# database: insight_poc_db
43+
#
4444
events:
4545
gateway_event:
4646
type: API_GATEWAY
@@ -49,8 +49,8 @@ events:
4949
- method: GET
5050
path: /api/hello
5151
backend: insight-poc-fn
52-
custom_domain:
53-
domain_name: test.com
54-
certificate_name: test
55-
certificate_private_key: test
56-
certificate_body: test
52+
# custom_domain:
53+
# domain_name: test.com
54+
# certificate_name: test
55+
# certificate_private_key: test
56+
# certificate_body: test

0 commit comments

Comments
 (0)