Skip to content

Commit

Permalink
Move document-lint from circleci to github-actions (#3345)
Browse files Browse the repository at this point in the history
Move document-lint from circleci to github-actions.
Adjust document according to markdownlint-cli rules.
  • Loading branch information
robberphex authored Feb 21, 2024
1 parent 03fe33e commit ae6ebb4
Show file tree
Hide file tree
Showing 42 changed files with 85 additions and 104 deletions.
41 changes: 0 additions & 41 deletions .circleci/config.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/document-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: document-lint

on:
push:
branches:
- '*'
pull_request:
branches:
- master
- "1.8"
- "2.0"

jobs:
document-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- run: npm install -g markdownlint-cli

- name: use markdownlint-cli to lint markdown file
run: |
find ./ -name "*.md" | grep -v vendor | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | \
xargs markdownlint --disable MD010 MD013 MD024 MD029 MD033 MD036 --
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at sentinel@linux.alibaba.com. All
reported by contacting the project team at <sentinel@linux.alibaba.com>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ All code should be well reviewed by one or more committers. Some principles:

#### Mailing list

If you have any questions or advice, please contact sentinel@linux.alibaba.com.
If you have any questions or advice, please contact <sentinel@linux.alibaba.com>.

#### Gitter

Our Gitter room: [https://gitter.im/alibaba/Sentinel](https://gitter.im/alibaba/Sentinel).
Our Gitter room: [https://gitter.im/alibaba/Sentinel](https://gitter.im/alibaba/Sentinel).
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<img src="https://user-images.githubusercontent.com/9434884/43697219-3cb4ef3a-9975-11e8-9a9c-73f4f537442d.png" alt="Sentinel Logo" width="50%">

# Sentinel: The Sentinel of Your Microservices

<img src="https://user-images.githubusercontent.com/9434884/43697219-3cb4ef3a-9975-11e8-9a9c-73f4f537442d.png" alt="Sentinel Logo" width="50%">

[![Sentinel CI](https://github.com/alibaba/Sentinel/actions/workflows/ci.yml/badge.svg)](https://github.com/alibaba/Sentinel/actions/workflows/ci.yml)
[![Codecov](https://codecov.io/gh/alibaba/Sentinel/branch/master/graph/badge.svg)](https://codecov.io/gh/alibaba/Sentinel)
[![Maven Central](https://img.shields.io/maven-central/v/com.alibaba.csp/sentinel-core.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:com.alibaba.csp%20AND%20a:sentinel-core)
Expand Down Expand Up @@ -111,7 +111,7 @@ For more information, please refer to [How To Use](https://sentinelguard.io/en-u

After running the demo for a while, you can see the following records in `~/logs/csp/${appName}-metrics.log.{date}` (When using the default `DateFileLogHandler`).

```
```plaintext
|--timestamp-|------date time----|-resource-|p |block|s |e|rt |occupied
1529998904000|2018-06-26 15:41:44|HelloWorld|20|0 |20|0|0 |0
1529998905000|2018-06-26 15:41:45|HelloWorld|20|5579 |20|0|728 |0
Expand Down
10 changes: 5 additions & 5 deletions doc/awesome-sentinel.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ You can also add to [sentinel-group/sentinel-awesome](https://github.com/sentine
## Contents

- [Presentations](#presentations)
- [Tutorials](#tutorials)
- [Demos](#demos)
- [Tutorials](#tutorialssamples)
- [Demos](../demos)
- [Extensions / Integrations](#extensions--integrations)
- [Blog Posts](#blog-posts)

Expand All @@ -31,9 +31,9 @@ You can also add to [sentinel-group/sentinel-awesome](https://github.com/sentine

## Polyglot Support

- <img src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel Go](https://github.com/alibaba/sentinel-golang)
- <img src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel C++](https://github.com/alibaba/sentinel-cpp)
- <img src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel Rust](https://github.com/sentinel-group/sentinel-rust)
- <img alt="Sentinel Go" src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel Go](https://github.com/alibaba/sentinel-golang)
- <img alt="Sentinel C++" src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel C++](https://github.com/alibaba/sentinel-cpp)
- <img alt="Sentinel Rust" src="https://raw.githubusercontent.com/sentinel-group/sentinel-awesome/master/sentinel_favicon.ico" title="Sentinel official" height="16px"> [Sentinel Rust](https://github.com/sentinel-group/sentinel-rust)

## Extensions / Integrations

Expand Down
2 changes: 1 addition & 1 deletion sentinel-adapter/sentinel-apache-dubbo-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ flow control, degrade or system load protection. You can implement your own `Dub
and then register to `DubboAdapterGlobalConfig`.
If no fallback is configured, Sentinel will wrap the `BlockException` as the fallback result.

Besides, we can also leverage [Dubbo mock mechanism](http://dubbo.apache.org/en-us/docs/user/demos/local-mock.html) to provide fallback implementation of degraded Dubbo services.
Besides, we can also leverage [Dubbo mock mechanism](http://dubbo.apache.org/en-us/docs/user/demos/local-mock.html) to provide fallback implementation of degraded Dubbo services.
2 changes: 1 addition & 1 deletion sentinel-adapter/sentinel-apache-dubbo3-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ and then register to `DubboAdapterGlobalConfig`.

If no fallback is configured, Sentinel will wrap the `BlockException` with a `RuntimeException` as the fallback result.

Besides, we can also leverage [Dubbo mock mechanism](https://dubbo.apache.org/zh/docs3-v2/java-sdk/advanced-features-and-usage/service/service-downgrade/) to provide fallback implementation of degraded Dubbo services.
Besides, we can also leverage [Dubbo mock mechanism](https://dubbo.apache.org/zh/docs3-v2/java-sdk/advanced-features-and-usage/service/service-downgrade/) to provide fallback implementation of degraded Dubbo services.
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ public class DefaultApacheHttpClientFallback implements ApacheHttpClientFallback
throw new SentinelRpcException(e);
}
}
```
```
2 changes: 1 addition & 1 deletion sentinel-adapter/sentinel-dubbo-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ flow control, degrade or system load protection. You can implement your own `Dub
and then register to `DubboAdapterGlobalConfig`.
If no fallback is configured, Sentinel will wrap the `BlockException` as the fallback result.

Besides, we can also leverage [Dubbo mock mechanism](http://dubbo.apache.org/en-us/docs/user/demos/local-mock.html) to provide fallback implementation of degraded Dubbo services.
Besides, we can also leverage [Dubbo mock mechanism](http://dubbo.apache.org/en-us/docs/user/demos/local-mock.html) to provide fallback implementation of degraded Dubbo services.
4 changes: 2 additions & 2 deletions sentinel-adapter/sentinel-jax-rs-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ As describe in `6.7.1 exceptions` of [jaxrs-2_1-final-spec](https://download.ora

For jax-rs client, we provide `SentinelJaxRsClientTemplate` you can use it like this:

```
```java
Response response = SentinelJaxRsClientTemplate.execute(resourceName, new Supplier<Response>() {
@Override
public Response get() {
Expand All @@ -67,7 +67,7 @@ Response response = SentinelJaxRsClientTemplate.execute(resourceName, new Suppli

or executeAsync like this:

```
```java
Future<Response> future = SentinelJaxRsClientTemplate.executeAsync(resourceName, new Supplier<Future<Response>>() {
@Override
public Future<Response> get() {
Expand Down
2 changes: 1 addition & 1 deletion sentinel-adapter/sentinel-okhttp-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ public class DefaultOkHttpFallback implements OkHttpFallback {
return new Response(myErrorBuilder);
}
}
```
```
4 changes: 2 additions & 2 deletions sentinel-adapter/sentinel-quarkus-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To use sentinel-annotation-quarkus-adapter, you can simply add the following dep

When Quarkus application started, you can see the enabled feature like:

```
```plaintext
INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, resteasy, sentinel-annotation, sentinel-jax-rs]
```

Expand All @@ -51,7 +51,7 @@ If you're using `sentinel-jax-rs-quarkus-adapter`, you'll need to set `quarkus.n

When Quarkus application started, you can see the enabled feature like:

```
```plaintext
INFO [io.quarkus] (main) Installed features: [cdi, resteasy, sentinel-annotation, sentinel-jax-rs, sentinel-native-image]
```

Expand Down
2 changes: 1 addition & 1 deletion sentinel-adapter/sentinel-reactor-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Example:
someService.doSomething() // return type: Mono<T> or Flux<T>
.transform(new SentinelReactorTransformer<>(resourceName)) // transform here
.subscribe();
```
```
2 changes: 1 addition & 1 deletion sentinel-adapter/sentinel-sofa-rpc-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ Sentinel SOFARPC Adapter supports global fallback configuration.
The global fallback will handle exceptions and give replacement result when blocked by
flow control, degrade or system load protection. You can implement your own `SofaRpcFallback` interface
and then register to `SofaRpcFallbackRegistry`. If no fallback is configured, Sentinel will wrap the `BlockException`
then directly throw it out.
then directly throw it out.
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ The gateway adapter will regard all `routeId` (defined in Spring properties) and

You can register various customized callback in `GatewayCallbackManager`:

- `setBlockHandler`: register a customized `BlockRequestHandler` to handle the blocked request. The default implementation is `DefaultBlockRequestHandler`, which returns default message like `Blocked by Sentinel: FlowException`.
- `setBlockHandler`: register a customized `BlockRequestHandler` to handle the blocked request. The default implementation is `DefaultBlockRequestHandler`, which returns default message like `Blocked by Sentinel: FlowException`.
2 changes: 1 addition & 1 deletion sentinel-adapter/sentinel-spring-webflux-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ You can register various customized callback in `WebFluxCallbackManager`:
- `setUrlCleaner`: used for normalization of URL. The function type is `(ServerWebExchange, String) → String`, which means `(webExchange, originalUrl) → finalUrl`, if the finalUrl is `"""` or `null`, the URLs will be excluded (since Sentinel 1.7.0)..
- `setRequestOriginParser`: used to resolve the origin from the HTTP request. The function type is `ServerWebExchange → String`.

You can also refer to the demo: [sentinel-demo-spring-webflux](https://github.com/alibaba/Sentinel/tree/master/sentinel-demo/sentinel-demo-spring-webflux).
You can also refer to the demo: [sentinel-demo-spring-webflux](https://github.com/alibaba/Sentinel/tree/master/sentinel-demo/sentinel-demo-spring-webflux).
2 changes: 1 addition & 1 deletion sentinel-adapter/sentinel-spring-webmvc-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ config.setBlockExceptionHandler((request, response, e) -> {
| name | description | type | default value |
|------|------------|------|-------|
| totalResourceName | The resource name in `SentinelTotalInterceptor` | `String` | `spring-mvc-total-url-request` |
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` |
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` |
4 changes: 2 additions & 2 deletions sentinel-adapter/sentinel-zuul-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ As Zuul run as per thread per connection block model, we add filters around rout
- `SentinelZuulPostFilter`: When the response has no exception caught, the post filter will complete the entries.
- `SentinelZuulErrorFilter`: When an exception is caught, the filter will trace the exception and complete the entries.

<img width="792" src="https://user-images.githubusercontent.com/9305625/47277113-6b5da780-d5ef-11e8-8a0a-93a6b09b0887.png">
<img width="792" src="image/sentinel-zuul.png" alt="sentinel zuul">

The order of filters can be changed via the constructor.

Expand Down Expand Up @@ -144,4 +144,4 @@ public class MyRequestOriginParser implements RequestOriginParser {
return request.getRemoteAddr();
}
}
```
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sentinel-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ This is the default implementation of Sentinel cluster flow control.

- `sentinel-cluster-common-default`: common module for cluster transport and functions
- `sentinel-cluster-client-default`: default cluster client module using Netty as underlying transport library
- `sentinel-cluster-server-default`: default cluster server module
- `sentinel-cluster-server-default`: default cluster server module
2 changes: 1 addition & 1 deletion sentinel-cluster/sentinel-cluster-client-default/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Sentinel Cluster Client (Default)
# Sentinel Cluster Client (Default)
2 changes: 1 addition & 1 deletion sentinel-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ java -Dserver.port=8080 \

## 6. 构建Docker镜像

```
```bash
docker build --build-arg SENTINEL_VERSION=1.8.7 -t ${REGISTRY}/sentinel-dashboard:v1.8.7 .
```

Expand Down
4 changes: 2 additions & 2 deletions sentinel-dashboard/Sentinel_Dashboard_Feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Sentinel 控制台是流量控制、熔断降级规则统一配置和管理的入口,它为用户提供了机器自发现、簇点链路自发现、监控、规则配置等功能。在 Sentinel 控制台上,我们可以配置规则并实时查看流量控制效果。使用 Sentinel 控制台的流程如下:

```
```plaintext
客户端接入 -> 机器自发现 -> 查看簇点链路 -> 配置流控规则 -> 查看流控效果
```

Expand Down Expand Up @@ -85,4 +85,4 @@ sentinel_dashboard_app_hideAppNoMachineMillis=60000
更多:

- [Sentinel 控制台启动和客户端接入](./README.md)
- [控制台 Wiki](https://github.com/alibaba/Sentinel/wiki/%E6%8E%A7%E5%88%B6%E5%8F%B0)
- [控制台 Wiki](https://github.com/alibaba/Sentinel/wiki/%E6%8E%A7%E5%88%B6%E5%8F%B0)
8 changes: 4 additions & 4 deletions sentinel-dashboard/src/main/webapp/resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@

## Install Packages

```
```shell
npm install
```

## Start Development

```
```shell
npm start
```

## Build for production

```
```shell
npm run build
```

## Credit

- [sb-admin-angular](https://github.com/start-angular/sb-admin-angular)
- [sb-admin-angular](https://github.com/start-angular/sb-admin-angular)
8 changes: 4 additions & 4 deletions sentinel-dashboard/src/main/webapp/resources/README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@

## 安装依赖

```
```shell
npm i
```

## 开始本地开发

```
```shell
npm start
```

## 构建前端资源

```
```shell
npm run build
```

## Credit

- [sb-admin-angular](https://github.com/start-angular/sb-admin-angular)
- [sb-admin-angular](https://github.com/start-angular/sb-admin-angular)
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
This demo demonstrates how to configure data source for cluster rules and configuration
in **embedded mode**. You can start multiple `ClusterDemoApplication` instances and do cluster assignment in Sentinel dashboard or via dynamic data source.

See [DemoClusterInitFunc](https://github.com/alibaba/Sentinel/blob/master/sentinel-demo/sentinel-demo-cluster/sentinel-demo-cluster-embedded/src/main/java/com/alibaba/csp/sentinel/demo/cluster/init/DemoClusterInitFunc.java) for a sample of dynamic configuration.
See [DemoClusterInitFunc](https://github.com/alibaba/Sentinel/blob/master/sentinel-demo/sentinel-demo-cluster/sentinel-demo-cluster-embedded/src/main/java/com/alibaba/csp/sentinel/demo/cluster/init/DemoClusterInitFunc.java) for a sample of dynamic configuration.
6 changes: 3 additions & 3 deletions sentinel-demo/sentinel-demo-dubbo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ Service Provider 用于向外界提供服务,处理各个消费者的调用请

Demo 1 演示了此限流场景,我们看一下这种模式的限流产生的效果。假设我们已经定义了某个服务接口 `com.alibaba.csp.sentinel.demo.dubbo.FooService`,其中有一个方法 `sayHello(java.lang.String)`,Provider 端该方法设定 QPS 阈值为 10。在 Consumer 端在 1s 之内连续发起 15 次调用,可以通过日志文件看到 Provider 端被限流。拦截日志统一记录在 `~/logs/csp/sentinel-block.log` 中:

```
```plaintext
2018-07-24 17:13:43|1|com.alibaba.csp.sentinel.demo.dubbo.FooService:sayHello(java.lang.String),FlowException,default,|5,0
```

在 Provider 对应的 metrics 日志中也有记录:

```
```plaintext
1532423623000|2018-07-24 17:13:43|com.alibaba.csp.sentinel.demo.dubbo.FooService|15|0|15|0|3
1532423623000|2018-07-24 17:13:43|com.alibaba.csp.sentinel.demo.dubbo.FooService:sayHello(java.lang.String)|10|5|10|0|0
```
Expand All @@ -50,7 +50,7 @@ Demo 1 演示了此限流场景,我们看一下这种模式的限流产生的
在限流日志中会也会记录调用方的名称,如:

```
```plaintext
2018-07-25 16:26:48|1|com.alibaba.csp.sentinel.demo.dubbo.FooService:sayHello(java.lang.String),FlowException,default,demo-consumer|5,0
```

Expand Down
3 changes: 1 addition & 2 deletions sentinel-demo/sentinel-demo-quarkus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you want to learn more about Quarkus, please visit its website: [quarkus.io](

You can run your application in dev mode that enables live coding using:

```
```bash
./mvnw quarkus:dev
```

Expand All @@ -29,4 +29,3 @@ Or, if you don't have GraalVM installed, you can run the native executable build
You can then execute your native executable with: `./target/sentinel-demo-quarkus-1.0-SNAPSHOT-runner`

If you want to learn more about building native executables, please consult [building-native-image](https://quarkus.io/guides/building-native-image)

2 changes: 1 addition & 1 deletion sentinel-demo/sentinel-demo-rocketmq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Sentinel provides a feature for this kind of scenario: [Rate Limiter](https://gi

For example, we configure the rule with uniform rate limiting mode and QPS count is 5, which indicates messages are consumed at fixed interval (200 ms) and pending messages will queue. We also set the maximum queuing timeout is 5s, then all requests estimated to exceed the timeout will be rejected immediately.

![Uniform rate](https://github.com/alibaba/Sentinel/wiki/image/uniform-speed-queue.png)
![Uniform rate](https://github.com/alibaba/Sentinel/wiki/image/uniform-speed-queue.png)
Loading

0 comments on commit ae6ebb4

Please sign in to comment.