Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stabilization(RC): rc stabilization #530

Merged
merged 17 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Linters

on:
push:
pull_request:
branches:
# Branches from forks have the form 'user:branch-name' so we only run
# this job on pull_request events for branches that look like fork
# branches. Without this we would end up running this job twice for non
# forked PRs, once for the push and then once for opening the PR.
- "**:**"

jobs:
golangci-lint:
name: Golang-CI (lint)
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Run linter
uses: golangci/golangci-lint-action@v2 # Action page: <https://github.com/golangci/golangci-lint-action>
with:
version: v1.35 # without patch version
only-new-issues: false # show only new issues if it's a pull request
16 changes: 2 additions & 14 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux
name: Tests

on:
push:
Expand All @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
fail-fast: true
matrix:
php: [ "7.4", "8.0" ]
go: [ "1.14", "1.15" ]
Expand Down Expand Up @@ -99,15 +99,3 @@ jobs:
file: ./coverage-ci/summary.txt
fail_ci_if_error: false

golangci-lint:
name: Golang-CI (lint)
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Run linter
uses: golangci/golangci-lint-action@v2 # Action page: <https://github.com/golangci/golangci-lint-action>
with:
version: v1.35 # without patch version
only-new-issues: false # show only new issues if it's a pull request
88 changes: 0 additions & 88 deletions .github/workflows/macos.yml

This file was deleted.

21 changes: 14 additions & 7 deletions .rr.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
######################################################################################
# THIS IS SAMPLE OF THE CONFIGURATION #
# IT'S NOT A DEFAULT CONFIGURATION, IT'S JUST A REFERENCE TO ALL OPTIONS AND PLUGINS #
######################################################################################
rpc:
listen: tcp://127.0.0.1:6001

server:
command: "php tests/psr-worker-bench.php"
user: ""
group: ""
env:
"RR_HTTP": "true"
"RR_RPC": "tcp://127.0.0.1:6001"
relay: "pipes"
relay_timeout: 20s

Expand All @@ -20,14 +21,16 @@ temporal:
address: localhost:7233
activities:
num_workers: 4
codec: json
codec: proto
debug_level: 2

http:
# host and port separated by semicolon
address: 127.0.0.1:44933
max_request_size: 1024
# middlewares for the http plugin, order matters
middleware: [ "gzip", "headers" ]
# uploads
uploads:
forbid: [ ".php", ".exe", ".bat" ]
trusted_subnets:
Expand All @@ -40,6 +43,7 @@ http:
"fc00::/7",
"fe80::/10",
]
# headers
headers:
cors:
allowed_origin: "*"
Expand All @@ -52,6 +56,7 @@ http:
input: "custom-header"
response:
output: "output-header"
# http static
static:
dir: "tests"
forbid: [ "" ]
Expand All @@ -63,12 +68,13 @@ http:
pool:
# default - num of logical CPUs
num_workers: 6
# default 0
# default 0 - no limit
max_jobs: 0
# default 1 minute
allocate_timeout: 60s
# default 1 minute
destroy_timeout: 60s
# supervisor used to control http workers
supervisor:
# watch_tick defines how often to check the state of the workers (seconds)
watch_tick: 1s
Expand All @@ -94,13 +100,14 @@ http:
h2c: false
max_concurrent_streams: 128

# plugin which can be used in other Golang plugins
# this is not an PHP plugin
redis:
# UniversalClient is an abstract client which - based on the provided options -
# can connect to either clusters, or sentinel-backed failover instances
# or simple single-instance servers. This can be useful for testing
# cluster-specific applications locally.
# if the number of addrs is 1 and master_name is empty, a single-node redis Client will be returned

# if the number of addrs is two or more, a ClusterClient will be returned
addrs:
- "localhost:6379"
Expand Down Expand Up @@ -135,7 +142,7 @@ boltdb:
# keys ttl check interval
TTL: 60 # seconds

# memcached driver
# memcached driver
memcached:
addr:
- "localhost:11211"
Expand Down
35 changes: 31 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ uninstall: ## Uninstall locally installed RR
rm -f /usr/local/bin/rr

test_coverage:
docker-compose -f tests/docker-compose.yaml up -d
docker-compose -f tests/docker-compose.yaml up -d --remove-orphans
rm -rf coverage
mkdir coverage
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage/pipe.out -covermode=atomic ./pkg/transport/pipe
Expand Down Expand Up @@ -93,9 +93,6 @@ test_1.14: ## Run application tests
go1.14.14 test -v -race -tags=debug ./pkg/pool
go1.14.14 test -v -race -tags=debug ./pkg/worker
go1.14.14 test -v -race -tags=debug ./pkg/worker_watcher
go1.14.14 test -v -race -tags=debug ./tests/plugins/temporal
go1.14.14 test -v -race -tags=debug ./plugins/temporal/protocol
go1.14.14 test -v -race -tags=debug ./plugins/temporal/workflow
go1.14.14 test -v -race -tags=debug ./tests/plugins/http
go1.14.14 test -v -race -tags=debug ./plugins/http/config
go1.14.14 test -v -race -tags=debug ./tests/plugins/informer
Expand All @@ -119,4 +116,34 @@ test_1.14: ## Run application tests
go1.14.14 test -v -race -tags=debug ./tests/plugins/kv/memcached
docker-compose -f tests/docker-compose.yaml down

test_1.16: ## Run application tests
docker-compose -f tests/docker-compose.yaml up -d
go1.16rc1 test -v -race -tags=debug ./pkg/transport/pipe
go1.16rc1 test -v -race -tags=debug ./pkg/transport/socket
go1.16rc1 test -v -race -tags=debug ./pkg/pool
go1.16rc1 test -v -race -tags=debug ./pkg/worker
go1.16rc1 test -v -race -tags=debug ./pkg/worker_watcher
go1.16rc1 test -v -race -tags=debug ./tests/plugins/http
go1.16rc1 test -v -race -tags=debug ./plugins/http/config
go1.16rc1 test -v -race -tags=debug ./tests/plugins/informer
go1.16rc1 test -v -race -tags=debug ./tests/plugins/reload
go1.16rc1 test -v -race -tags=debug ./tests/plugins/server
go1.16rc1 test -v -race -tags=debug ./tests/plugins/checker
go1.16rc1 test -v -race -tags=debug ./tests/plugins/config
go1.16rc1 test -v -race -tags=debug ./tests/plugins/gzip
go1.16rc1 test -v -race -tags=debug ./tests/plugins/headers
go1.16rc1 test -v -race -tags=debug ./tests/plugins/logger
go1.16rc1 test -v -race -tags=debug ./tests/plugins/metrics
go1.16rc1 test -v -race -tags=debug ./tests/plugins/redis
go1.16rc1 test -v -race -tags=debug ./tests/plugins/resetter
go1.16rc1 test -v -race -tags=debug ./tests/plugins/rpc
go1.16rc1 test -v -race -tags=debug ./tests/plugins/static
go1.16rc1 test -v -race -tags=debug ./plugins/kv/boltdb
go1.16rc1 test -v -race -tags=debug ./plugins/kv/memory
go1.16rc1 test -v -race -tags=debug ./plugins/kv/memcached
go1.16rc1 test -v -race -tags=debug ./tests/plugins/kv/boltdb
go1.16rc1 test -v -race -tags=debug ./tests/plugins/kv/memory
go1.16rc1 test -v -race -tags=debug ./tests/plugins/kv/memcached
docker-compose -f tests/docker-compose.yaml down

test_pipeline: test_1.14 test
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<p align="center">
<a href="https://packagist.org/packages/spiral/roadrunner"><img src="https://poser.pugx.org/spiral/roadrunner/version"></a>
<a href="https://pkg.go.dev/github.com/spiral/roadrunner?tab=doc"><img src="https://godoc.org/github.com/spiral/roadrunner?status.svg"></a>
<a href="https://github.com/spiral/roadrunner/actions"><img src="https://github.com/spiral/roadrunner/workflows/Linux/badge.svg" alt=""></a>
<a href="https://github.com/spiral/roadrunner/actions"><img src="https://github.com/spiral/roadrunner/workflows/macOS/badge.svg" alt=""></a>
<a href="https://github.com/spiral/roadrunner/actions"><img src="https://github.com/spiral/roadrunner/workflows/Tests/badge.svg" alt=""></a>
<a href="https://github.com/spiral/roadrunner/actions"><img src="https://github.com/spiral/roadrunner/workflows/Linters/badge.svg" alt=""></a>
<a href="https://goreportcard.com/report/github.com/spiral/roadrunner"><img src="https://goreportcard.com/badge/github.com/spiral/roadrunner"></a>
<a href="https://scrutinizer-ci.com/g/spiral/roadrunner/?branch=master"><img src="https://scrutinizer-ci.com/g/spiral/roadrunner/badges/quality-score.png"></a>
<a href="https://codecov.io/gh/spiral/roadrunner/"><img src="https://codecov.io/gh/spiral/roadrunner/branch/master/graph/badge.svg"></a>
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ require (
github.com/prometheus/client_golang v1.9.0
github.com/shirou/gopsutil v3.21.1+incompatible
github.com/spf13/viper v1.7.1
github.com/spiral/endure v1.0.0-beta.22
github.com/spiral/endure v1.0.0-beta.23
github.com/spiral/errors v1.0.9
github.com/spiral/goridge/v3 v3.0.0
github.com/spiral/goridge/v3 v3.0.1
github.com/stretchr/testify v1.7.0
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a
github.com/yookoala/gofast v0.5.0
Expand Down
Loading