Skip to content

Commit

Permalink
improve: Fixed int64 overflow problems on JavaScript
Browse files Browse the repository at this point in the history
Add integration config for the local e2e test cases
  • Loading branch information
fengmk2 committed Nov 15, 2021
1 parent 20774a6 commit 5c0db95
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,7 @@ build-linux-wasm-layotto:
docker build --rm -t ${BUILD_IMAGE} build/contrib/builder/image/faas
docker run --rm -v $(shell pwd):/go/src/${PROJECT_NAME} -w /go/src/${PROJECT_NAME} ${BUILD_IMAGE} go build -tags wasmer -o layotto /go/src/${PROJECT_NAME}/cmd/layotto

license-checker:
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

.PHONY: build
211 changes: 211 additions & 0 deletions configs/config_integration_redis_etcd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
{
"servers": [
{
"default_log_path": "stdout",
"default_log_level": "DEBUG",
"routers": [
{
"router_config_name": "http_router",
"virtual_hosts": [
{
"name": "http_host",
"domains": [
"*"
],
"routers": [
{
"match": {
"headers": [
{
"name": "id",
"value": "HelloService:1.0"
}
]
},
"route": {
"cluster_name": "http_server"
}
}
]
}
]
},
{
"router_config_name": "actuator_dont_need_router"
}
],
"listeners": [
{
"name": "grpc",
"address": "127.0.0.1:34904",
"bind_port": true,
"filter_chains": [
{
"filters": [
{
"type": "grpc",
"config": {
"server_name": "runtime",
"grpc_config": {
"rpcs": {
"mosn": {
"config": {
"channel": [
{
"size": 16,
"protocol": "http",
"listener": "egress_runtime_http"
}
]
}
}
},
"hellos": {
"helloworld": {
"hello": "greeting"
}
},
"bindings": {
"http": {
"metadata": {
"url": "https://registry.npmmirror.com/layotto/0.0.0"
}
}
},
"config_stores": {
"etcd": {
"address": [
"127.0.0.1:2379"
],
"timeout": "10"
}
},
"state": {
"redis": {
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
}
},
"sequencer": {
"etcd": {
"metadata": {
"endpoints": "localhost:2379",
"segmentCacheEnable": "false",
"segmentStep": "1",
"username": "",
"password": "",
"dialTimeout": "5"
}
},
"redis": {
"metadata": {
"redisHost": "127.0.0.1:6380",
"redisPassword": ""
}
}
},
"lock": {
"etcd": {
"metadata": {
"endpoints": "localhost:2379",
"username": "",
"password": "",
"keyPrefixPath": "/lock",
"dialTimeout": "5"
}
},
"redis": {
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
}
},
"pub_subs": {
"redis": {
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
}
},
"app": {
"app_id": "app1",
"grpc_callback_port": 9999
}
}
}
}
]
}
]
},
{
"name": "actuator",
"address": "127.0.0.1:34999",
"bind_port": true,
"filter_chains": [
{
"filters": [
{
"type": "proxy",
"config": {
"downstream_protocol": "Http1",
"upstream_protocol": "Http1",
"router_config_name": "actuator_dont_need_router"
}
}
]
}
],
"stream_filters": [
{
"type": "actuator_filter"
}
]
},
{
"name": "egress_runtime_http",
"type": "egress",
"address": "0.0.0.0:12221",
"bind_port": true,
"network": "tcp",
"filter_chains": [
{
"filters": [
{
"type": "proxy",
"config": {
"downstream_protocol": "Http1",
"name": "proxy_config",
"router_config_name": "http_router",
"upstream_protocol": "Http1"
}
}
]
}
]
}
]
}
],
"cluster_manager": {
"tls_context": {},
"clusters": [
{
"name": "http_server",
"type": "SIMPLE",
"lb_type": "LB_RANDOM",
"hosts": [
{
"address": "127.0.0.1:8889",
"hostname": "downstream_machine1",
"weight": 1
}
]
}
]
}
}
3 changes: 2 additions & 1 deletion spec/proto/runtime/v1/runtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ message SequencerOptions {

message GetNextIdResponse{
// The next unique id
int64 next_id = 1;
// Fixed int64 overflow problems on JavaScript https://github.com/improbable-eng/ts-protoc-gen#gotchas
int64 next_id = 1 [jstype = JS_STRING];
}

message TryLockRequest {
Expand Down

0 comments on commit 5c0db95

Please sign in to comment.