Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
8fd8356
Update README.md
wolfy-j May 12, 2020
d0910d5
WIP: fix phpstan based on new goridge interface
May 13, 2020
3e53b16
WIP: simplify phpstan script declaration
May 13, 2020
b68da15
update RootCA
May 16, 2020
a760d1b
Update issue templates
May 17, 2020
b338a0c
Update feature request templates
May 17, 2020
90fd0a1
Merge #324
bors[bot] May 18, 2020
5600d80
Merge #325
bors[bot] May 18, 2020
22ac24f
fix NPE
May 18, 2020
5b6269f
- sample config
wolfy-j May 19, 2020
c3c7165
Merge remote-tracking branch 'origin/master'
wolfy-j May 19, 2020
53e6bc1
Bump goridge dependency
May 19, 2020
defc3bc
go.mod update goridge
May 19, 2020
f940ad4
Merge pull request #322 from spiral/fix_phpstan
May 19, 2020
950b1ec
update docker image
May 20, 2020
c51104b
fix test failings
May 20, 2020
d42f3e8
release 1.8.1
May 20, 2020
9d76912
Merge #327
bors[bot] May 20, 2020
6a111d0
Merge #323
bors[bot] May 23, 2020
c4a47cc
update h2c_test, add backoff
May 23, 2020
c1f27bc
re-release 1.8.1
May 23, 2020
ed40a2c
Merge pull request #330 from spiral/release_1.8.1
May 25, 2020
af2b441
update goridge dependency
May 25, 2020
c264d9f
Update README.md
wolfy-j May 31, 2020
0906955
Update issue templates
Jun 2, 2020
0bf922f
Update README.md
Jun 8, 2020
29cb445
release 1.8.2
Jul 6, 2020
6f98497
Merge pull request #342 from spiral/release_1.8.2
Jul 6, 2020
ca58fa4
Update config.go
siad007 Jul 19, 2020
cab2b5f
Merge #343
bors[bot] Jul 19, 2020
8d67df0
Update config.go
siad007 Aug 2, 2020
a917346
Update service.go
siad007 Aug 2, 2020
090feef
Update config_test.go
siad007 Aug 2, 2020
2f1958b
fix HSTS header
antonydevanchi Aug 25, 2020
e706748
Merge #351
bors[bot] Aug 26, 2020
5eb26a9
PCI DSS compliant update
Aug 26, 2020
484be3d
remove path separators in watcher_test
Aug 26, 2020
7a09aaf
Merge remote-tracking branch 'remotes/origin/master' into pci_dss_upg…
Aug 26, 2020
b03a35c
Update README
Aug 26, 2020
863de7a
Update README
Aug 26, 2020
88b3943
Merge #353
bors[bot] Aug 27, 2020
e736440
Merge branch 'master' into patch-1
Aug 27, 2020
66848c5
Add static header test, update .rr.yaml
Aug 27, 2020
9103939
Merge #345
bors[bot] Aug 27, 2020
a7f8371
Issue with broken pipe properly handled
Aug 27, 2020
50d12dc
handle aborted connection on windows
Aug 27, 2020
f6e5e0e
Update error handler
Aug 27, 2020
10f0c74
update error message
Aug 27, 2020
1911de9
add errors description
Aug 27, 2020
a636683
attempt to fix npe in mutex.
Aug 27, 2020
fea88ad
Merge #355
bors[bot] Aug 28, 2020
960c0a4
Merge #356
bors[bot] Aug 28, 2020
cff3ba1
Add namespaces check to the ExecuteFromUser
Sep 1, 2020
db42004
Update comments in ExecuteFromUser
Sep 1, 2020
f7dc6ba
Merge #357
bors[bot] Sep 1, 2020
163c72d
release 1.8.3
Sep 2, 2020
5d499ec
Grammar fix
Sep 2, 2020
b7aac81
Grammar fix
Sep 2, 2020
0af5028
Merge #358
bors[bot] Sep 2, 2020
bc8a3ff
Simplify watcher test, fix lgtm warinings and errors
Sep 21, 2020
b02aa40
Add few TODOs to cleanup later
Sep 21, 2020
95f7dab
Merge #360
bors[bot] Sep 21, 2020
a7dbcd5
Bump golang version in GHA
Sep 22, 2020
e39711c
correct bors build
Sep 22, 2020
5f4d2a1
Merge #361
bors[bot] Sep 22, 2020
9c08cf3
Create codeql-analysis.yml
Oct 2, 2020
4141959
Merge pull request #365 from spiral/security_code_scanning
Oct 2, 2020
0727803
Release 1.8.4
Oct 21, 2020
561003b
Merge #372
bors[bot] Oct 21, 2020
e131041
Merge branch 'branch-v1.8.4' into update-to-version-1.8.4
Bibob7 May 7, 2021
9c1dc3b
Update doc
Bibob7 May 7, 2021
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
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: B-bug, F-need-verification
assignees: 48d90782

---

---
name: Bug Report
about: Issue in HTTP module <replace>
labels: A-network <replace>
---
<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```go
<code>
```

I expected to see this happen: *explanation*

Instead, this happened: *explanation*

The version of RR used: *explanation*

Errortrace, Backtrace or Panictrace
```
<backtrace>
```

</p>
</details>
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE REQUEST]"
labels: C-feature-request
assignees: 48d90782, wolfy-j

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
6 changes: 3 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4]
go: [1.13, 1.14]
go: [1.14, 1.15]
os: [ubuntu-latest]
env:
GO111MODULE: on
Expand Down Expand Up @@ -57,8 +57,8 @@ jobs:
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-suggest # --prefer-source

# - name: Analyze PHP sources
# run: composer analyze
- name: Analyze PHP sources
run: composer analyze

- name: Install Go dependencies
run: go mod download
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 15 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['go']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
11 changes: 11 additions & 0 deletions .rr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ http:
# ssl private key
key: server.key

# rootCA certificate
rootCa: root.crt

# HTTP service provides FastCGI as frontend
fcgi:
# FastCGI connection DSN. Supported TCP and Unix sockets.
Expand Down Expand Up @@ -159,6 +162,14 @@ static:
# list of extensions for forbid for serving.
forbid: [".php", ".htaccess"]

# Automatically add headers to every request.
request:
"Example-Request-Header": "Value"

# Automatically add headers to every response.
response:
"X-Powered-By": "RoadRunner"

# health service configuration
health:
# http host to serve health requests.
Expand Down
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
CHANGELOG
=========

v1.8.4 (21.10.2020)
-------------------
- Update Goridge go dep to 2.4.6

v1.8.3 (02.09.2020)
-------------------
- Fix superfluous response.WriteHeader issue.
- Proper handle of `broken pipe` error on Linux and Windows.
- PCI DSS compliant upgrade (thanks @antonydevanchi).
- Fix HSTS header (thanks @antonydevanchi).
- Add Request and Response headers to static files (thanks @siad007).
- Add user_namespaces check when running RR worker from a particular user.

v1.8.2 (06.06.2020)
-------------------
- Bugfix release

v1.8.1 (23.05.2020)
-------------------
- Update goridge version to 2.4.4
- Fix code warnings from phpstan
- Improve RPC
- Create templates for the Bug reporting and Feature requests
- Move docker images from golang-alpine to regular golang images
- Add support for the CloudFlare CF-Connecting-IP and True-Client-IP headers (thanks @vsychov)
- Add support for the Root CA via the `rootCa` .rr.yaml option
- See the full milestone here: [link](https://github.com/spiral/roadrunner/milestone/11?closed=1)

v1.8.0 (05.05.2020)
-------------------
- Update goridge version to 2.4.0
- Update PHP version to the 7.2 (currently minimum supported)
- See the full milestone here: [link](https://github.com/spiral/roadrunner/issues?q=is%3Aclosed+milestone%3A1.8.0)
- See the full milestone here: [link](https://github.com/spiral/roadrunner/milestone/10?closed=1)

v1.7.1 (22.04.2020)
-------------------
Expand Down
29 changes: 25 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
# Image page: <https://hub.docker.com/_/golang>
FROM golang:1.14.1-alpine3.11
FROM golang:1.14.3 as builder

WORKDIR /workspace
COPY . /src

ENTRYPOINT["bash", "build.sh"]
WORKDIR /src

RUN set -x \
&& apt-get update -y \
&& apt-get install -y bash git \
&& go version \
&& bash ./build.sh \
&& test -f ./.rr.yaml

FROM alpine:latest

LABEL \
org.opencontainers.image.title="roadrunner" \
org.opencontainers.image.description="High-performance PHP application server, load-balancer and process manager" \
org.opencontainers.image.url="https://github.com/spiral/roadrunner" \
org.opencontainers.image.source="https://github.com/spiral/roadrunner" \
org.opencontainers.image.vendor="SpiralScout" \
org.opencontainers.image.licenses="MIT"

COPY --from=builder /src/rr /usr/bin/rr
COPY --from=builder /src/.rr.yaml /etc/rr.yaml

ENTRYPOINT ["/usr/bin/rr"]
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<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>
<a href="https://lgtm.com/projects/g/spiral/roadrunner/alerts/"><img alt="Total alerts" src="https://img.shields.io/lgtm/alerts/g/spiral/roadrunner.svg?logo=lgtm&logoWidth=18"/></a>
<a href="https://discord.gg/TFeEmCs"><img src="https://img.shields.io/badge/discord-chat-magenta.svg"></a>
</p>

Expand All @@ -24,6 +25,7 @@ RoadRunner includes PSR-7/PSR-17 compatible HTTP and HTTP/2 server and can be us
Features:
--------
- Production-ready
- PCI DSS compliant
- PSR-7 HTTP server (file uploads, error handling, static files, hot reload, middlewares, event listeners)
- HTTPS and HTTP/2 support (including HTTP/2 Push, H2C)
- Fully customizable server, FastCGI support
Expand All @@ -44,7 +46,8 @@ Features:
- Payload context and body
- Protocol, worker and job level error management (including PHP errors)
- Very fast (~250k rpc calls per second on Ryzen 1700X using 16 threads)
- Integrations with Symfony, Laravel, Slim, CakePHP, Zend Expressive, Spiral
- Integrations with Symfony, [Laravel](https://github.com/spiral/roadrunner-laravel), Slim, CakePHP, Zend Expressive
- Application server for [Spiral](https://github.com/spiral/framework)
- Automatic reloading on file changes
- Works on Windows (Unix sockets (AF_UNIX) supported on Windows 10)

Expand Down
6 changes: 3 additions & 3 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
status = [
'Build (PHP 7.2, Go 1.13, OS ubuntu-latest)',
'Build (PHP 7.2, Go 1.15, OS ubuntu-latest)',
'Build (PHP 7.2, Go 1.14, OS ubuntu-latest)',
'Build (PHP 7.3, Go 1.13, OS ubuntu-latest)',
'Build (PHP 7.3, Go 1.15, OS ubuntu-latest)',
'Build (PHP 7.3, Go 1.14, OS ubuntu-latest)',
'Build (PHP 7.4, Go 1.13, OS ubuntu-latest)',
'Build (PHP 7.4, Go 1.15, OS ubuntu-latest)',
'Build (PHP 7.4, Go 1.14, OS ubuntu-latest)',
'runner / golangci-lint',
'Build docker image',]
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cd $(dirname "${BASH_SOURCE[0]}")
OD="$(pwd)"

# Pushes application version into the build information.
RR_VERSION=1.8.0
RR_VERSION=1.8.4

# Hardcode some values to the core package
LDFLAGS="$LDFLAGS -X github.com/spiral/roadrunner/cmd/rr/cmd.Version=${RR_VERSION}"
Expand Down
4 changes: 2 additions & 2 deletions cmd/util/stderr.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
)

// LogEvent outputs rr event into given logger and return false if event was not handled.
// StdErrOutput outputs rr event into given logger and return false if event was not handled.
func StdErrOutput(event int, ctx interface{}) bool {
// outputs
switch event {
Expand All @@ -21,6 +21,6 @@ func StdErrOutput(event int, ctx interface{}) bool {

return true
}

return false
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"php": "^7.2",
"ext-json": "*",
"ext-curl": "*",
"spiral/goridge": "^2.4",
"spiral/goridge": "^2.4.2",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0",
"symfony/console": "^2.5.0 || ^3.0.0 || ^4.0.0 || ^5.0.0",
Expand All @@ -30,7 +30,7 @@
"phpstan/phpstan": "~0.12"
},
"scripts": {
"analyze": "@php ./vendor_php/bin/phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi"
"analyze": "phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi"
},
"autoload": {
"psr-4": {
Expand Down
27 changes: 12 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/spiral/roadrunner

go 1.14
go 1.15

require (
github.com/NYTimes/gziphandler v1.1.1
Expand All @@ -9,23 +9,20 @@ require (
github.com/cenkalti/backoff/v4 v4.0.0
github.com/dustin/go-humanize v1.0.0
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/json-iterator/go v1.1.9
github.com/mattn/go-colorable v0.1.6 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
github.com/json-iterator/go v1.1.10
github.com/mattn/go-colorable v0.1.7 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
github.com/olekukonko/tablewriter v0.0.4
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.5.0
github.com/shirou/gopsutil v2.20.1+incompatible
github.com/sirupsen/logrus v1.4.2
github.com/spf13/cobra v0.0.6
github.com/spf13/viper v1.6.2
github.com/spiral/goridge/v2 v2.3.0
github.com/stretchr/testify v1.4.0
github.com/prometheus/client_golang v1.7.1
github.com/shirou/gopsutil v2.20.7+incompatible
github.com/sirupsen/logrus v1.6.0
github.com/spf13/cobra v1.0.0
github.com/spf13/viper v1.7.1
github.com/spiral/goridge/v2 v2.4.6
github.com/stretchr/testify v1.6.1
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a
github.com/yookoala/gofast v0.4.0
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
github.com/cpuguy83/go-md2man v1.0.10 // indirect
github.com/spiral/goridge v2.1.4+incompatible // indirect
github.com/spiral/php-grpc v1.2.0
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1
)
Loading