Skip to content

Commit

Permalink
docs: add explanation-for-github-workflow and problems-to-solve (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
seeflood authored Oct 25, 2021
1 parent 97f6c64 commit 3d3ffb6
Show file tree
Hide file tree
Showing 10 changed files with 171 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
- [Sequencer](en/component_specs/sequencer/common.md)
- [Etcd](en/component_specs/sequencer/etcd.md)
- [Redis](en/component_specs/sequencer/redis.md)
- [Zookeeper](en/component_specs/sequencer/zookeeper.md)
- Design documents
- [Actuator design doc](en/design/actuator/actuator-design-doc.md)
- [Configuration API with Apollo](en/design/configuration/configuration-api-with-apollo.md)
Expand All @@ -66,4 +67,6 @@
- You wanna modify proto files or API definition?
- [Development specification when adding API](en/development/developing-api.md)
- [How to generate API document based on the proto files](en/api_reference/how_to_generate_api_doc.md)
- [Explanation for github workflow](en/development/explanation-for-github-workflow.md)
- [Layotto contributor guide](en/development/CONTRIBUTING.md)

66 changes: 66 additions & 0 deletions docs/en/development/explanation-for-github-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
This document explain each component of Layotto's github workflow.

Note: configuration files of Layotto github workflow are [here](https://github.com/mosn/layotto/tree/main/.github/workflows)

## 1. Cron jobs
### stale bot
![img_1.png](../../img/development/workflow/img_1.png)

We use [Close Stale Issues](https://github.com/marketplace/actions/close-stale-issues) .

An issue or PR will be automatically marked as stale if it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, security, good first issue or help wanted) or other activity occurs.

**If a community task issue was closed by this bot,then the task can be assigned to others.**

Merged in https://github.com/mosn/layotto/pull/246

## 2. CI/CD
![img.png](../../img/development/workflow/img.png)
### 2.1. Chore
#### <1> cla bot

check if the contributor has signed cla

#### TODO: Automatically generate new API reference when proto files are modified

Currently [we have to do it manually](https://mosn.io/layotto/#/en/api_reference/how_to_generate_api_doc) .

The generated document is [here](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/api_reference_v1.md)

![img_2.png](../../img/development/workflow/img_2.png)

### 2.2. Test
#### <5> Run unit tests
#### <5> Check if you have done `go fmt`
#### <2><3> Make sure ut coverage ratio won't decrease

See https://docs.codecov.com/docs/commit-status#branches

#### TODO: Integration tests


### 2.3. Lint
#### <4> License checker
We use https://github.com/marketplace/actions/license-eye

Merged in https://github.com/mosn/layotto/pull/247

##### How to add license headers for all files automatically?
In Layotto directory:

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

It will add license headers for code files recursively.

See https://github.com/marketplace/actions/license-eye#docker-image for details

#### TODO: PR title lint
~~#### TODO: PR body lint?~~
#### TODO: Code style lint
For example,find out `go xxx()` without `recover`
We can use go lint and refer to MOSN's configuration

#### ~~- Commit message lint~~ (reverted)
see https://github.com/mosn/layotto/issues/243
2 changes: 1 addition & 1 deletion docs/en/start/faas/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Layotto supports loading and running functions in the form of wasm, and supports calling each other between functions and accessing infrastructure, such as Redis.

Detailed design documents can refer to:[FaaS design](../../design/faas/faas-poc-design.md)
Detailed design documents can refer to:[FaaS design](en/design/faas/faas-poc-design.md)

### 2. Dependent software

Expand Down
Binary file added docs/img/development/workflow/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/development/workflow/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/development/workflow/img_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/zh/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
- [Sequencer](zh/component_specs/sequencer/common.md)
- [Etcd](zh/component_specs/sequencer/etcd.md)
- [Redis](zh/component_specs/sequencer/redis.md)
- [Zookeeper](zh/component_specs/sequencer/zookeeper.md)
- 设计文档
- [Actuator设计文档](zh/design/actuator/actuator-design-doc.md)
- [gRPC框架设计文档](zh/design/actuator/grpc-design-doc.md)
Expand All @@ -73,6 +74,8 @@
- [新增API时的开发规范](zh/development/developing-api.md)
- [如何基于proto文件生成接口文档](zh/api_reference/how_to_generate_api_doc.md)
- [Layotto贡献者指南](zh/development/CONTRIBUTING.md)
- [解释一下Layotto的github workflow](zh/development/explanation-for-github-workflow.md)
- [待解决的问题](zh/development/problems-to-solve.md)
- 社区
- [SOFAStack & MOSN 社区角色说明](zh/community/governance.md)
- [Layotto社区晋升规则](zh/community/promote.md)
Expand Down
66 changes: 66 additions & 0 deletions docs/zh/development/explanation-for-github-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
This document explain each component of Layotto's github workflow.

Note: configuration files of Layotto github workflow are [here](https://github.com/mosn/layotto/tree/main/.github/workflows)

## 1. Cron jobs
### stale bot
![img_1.png](../../img/development/workflow/img_1.png)

We use [Close Stale Issues](https://github.com/marketplace/actions/close-stale-issues) .

An issue or PR will be automatically marked as stale if it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, security, good first issue or help wanted) or other activity occurs.

**If a community task issue was closed by this bot,then the task can be assigned to others.**

Merged in https://github.com/mosn/layotto/pull/246

## 2. CI/CD
![img.png](../../img/development/workflow/img.png)
### 2.1. Chore
#### <1> cla bot

check if the contributor has signed cla

#### TODO: Automatically generate new API reference when proto files are modified

Currently [we have to do it manually](https://mosn.io/layotto/#/en/api_reference/how_to_generate_api_doc) .

The generated document is [here](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/api_reference_v1.md)

![img_2.png](../../img/development/workflow/img_2.png)

### 2.2. Test
#### <5> Run unit tests
#### <5> Check if you have done `go fmt`
#### <2><3> Make sure ut coverage ratio won't decrease

See https://docs.codecov.com/docs/commit-status#branches

#### TODO: Integration tests


### 2.3. Lint
#### <4> License checker
We use https://github.com/marketplace/actions/license-eye

Merged in https://github.com/mosn/layotto/pull/247

##### How to add license headers for all files automatically?
In Layotto directory:

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

It will add license headers for code files recursively.

See https://github.com/marketplace/actions/license-eye#docker-image for details

#### TODO: PR title lint
~~#### TODO: PR body lint?~~
#### TODO: Code style lint
For example,find out `go xxx()` without `recover`
We can use go lint and refer to MOSN's configuration

#### ~~- Commit message lint~~ (reverted)
see https://github.com/mosn/layotto/issues/243
31 changes: 31 additions & 0 deletions docs/zh/development/problems-to-solve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Multi-Runtime 2022:待解决的问题
## 1. API标准建设
根据落地用户的生产需求继续建设API标准、提交给Dapr社区共建。比如:
- 分布式锁API
- 配置API
- 延迟消息API

## 2. 生态共建
如何让已经落地Service Mesh的用户平滑迁移到Multi-Runtime?目前在做的一件事是Layotto on Envoy支持;

能否让Runtime API更好的融入K8S生态?目前在做的事是Layotto集成进k8s生态;


## 3. 服务早期生产用户
开源要做通用的、解决生产问题的功能。观察早期生产用户,目前面临以下问题:
### 3.1. 扩展性
让整个项目可扩展,比如某个公司想用layotto但是又想扩展一些自己的功能,要么能自己起一个项目、import开源layotto后通过钩子做一些扩展,要么能通过动态连接库之类的办法去扩展layotto二进制文件。目前这两种办法,dapr和layotto都没法做到,想扩展只能fork出来改代码
### 3.2. 稳定性风险
import开源Layotto之后,panic风险巨大,因为依赖了Dapr所有组件,这些组件用的库五花八门,可能panic,可能依赖冲突。能否通过按需编译、隔离性设计来减少panic风险?

目前开源项目的测试投入相对于公司里的测试流程来说少太多了,怎么建设开源测试体系;

### 3.3. 可观测性
> 以前没service mesh的时候,有问题我能自己查;后来有了service mesh,遇到问题我只能找别人来查了
> ——某测试同学
在生产环境落地Service Mesh会导致排查问题变难,而 Multi-Runtime 下沉的功能多了,排查起来更难。
要建设 Multi-Runtime 可观测性,避免让生产用户查问题难上加难。

## 4. 新研发模式
sidecar 支持 serverless 落地;
2 changes: 1 addition & 1 deletion docs/zh/start/faas/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Layotto支持加载并运行以 wasm 为载体的 Function,并支持Function之间互相调用以及访问基础设施,如Redis。

详细的设计文档可以参考:[FaaS design](../../design/faas/faas-poc-design.md)
详细的设计文档可以参考:[FaaS design](zh/design/faas/faas-poc-design.md)

### 二、准备工作

Expand Down

0 comments on commit 3d3ffb6

Please sign in to comment.