Skip to content

Commit 7931440

Browse files
authored
Merge pull request #635 from bfenetworks/release/v0.12.0
Release/v0.12.0
2 parents 701edf1 + dbf6e11 commit 7931440

File tree

116 files changed

+2149
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+2149
-228
lines changed

.github/workflows/ci.yml

Lines changed: 66 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,69 @@
1-
name: Go
2-
on: [push]
3-
jobs:
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
push:
9+
branches: [ develop ]
10+
pull_request:
11+
branches: [ develop ]
412

5-
build:
6-
name: Build
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "ci"
16+
ci:
17+
# The type of runner that the job will run on
718
runs-on: ubuntu-latest
19+
20+
# Steps represent a sequence of tasks that will be executed as part of the job
821
steps:
9-
- name: Set up Go
10-
uses: actions/setup-go@v2
11-
with:
12-
stable: 'true'
13-
go-version: 1.13
14-
id: go
15-
16-
- name: Check out code into the Go module directory
17-
uses: actions/checkout@v2
18-
19-
- name: Lint
20-
run: |
21-
echo "golang lint, suggest to use golangci-lint"
22-
23-
- name: Build
24-
run: |
25-
echo "start to build and test bfe"
26-
go version
27-
make
28-
echo "finish"
29-
30-
- name: coverage
31-
run: |
32-
make coverage
33-
bash <(curl -s https://codecov.io/bash)
22+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23+
- name: Checkout repository
24+
uses: actions/checkout@v2
25+
with:
26+
# Must fetch at least the immediate parents so that if this is
27+
# a pull request then we can checkout the head of the pull request.
28+
# Only include this option if you are running this workflow on pull requests.
29+
fetch-depth: 2
30+
31+
# If this run was triggered by a pull request event then checkout
32+
# the head of the pull request instead of the merge commit.
33+
# Only include this step if you are running this workflow on pull requests.
34+
- run: git checkout HEAD^2
35+
if: ${{ github.event_name == 'pull_request' }}
36+
37+
# Build
38+
- name: Build
39+
shell: bash
40+
run: |
41+
make
42+
43+
# Coverage
44+
- name: Coverage
45+
shell: bash
46+
run: |
47+
make coverage
48+
bash <(curl -s https://codecov.io/bash)
49+
50+
# Setup Python and start a mock server for Test
51+
- name: setup Python
52+
uses: actions/setup-python@v2
53+
with:
54+
python-version: '2.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
55+
- run: python -m SimpleHTTPServer 8181&
56+
57+
# Modify Conf and Run
58+
- name: Run
59+
shell: bash
60+
run: |
61+
sed -i s/10.199.189.26/127.0.0.1/g output/conf/cluster_conf/cluster_table.data
62+
cd output/bin/ && ./bfe -c ../conf -l ../log &
63+
64+
# A simple test to ensure bfe runs ok
65+
- name: Test
66+
shell: bash
67+
run: |
68+
status_code=`curl -l -s -o /dev/null -w %{http_code} http://localhost:8080 -H"Host:example.org"`
69+
if [ "$status_code" != "200" ]; then exit 1; fi

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ All notable changes to this project will be documented in this file.
1010
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1111
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1212

13+
## [v0.12.0] - 2020-09-03
14+
15+
### Added
16+
- Support gRPC over HTTP/2
17+
- Support communication with FastCGI server
18+
- Reduce objects number by release some objects that are not used as soon as possible
19+
- Replace ffjson with json-iterator
20+
- net/textproto: turn an ancient DoS BUG annotation into a comment
21+
- Optimize processing of new connections under PROXY mode
22+
- Support integration testing in CI
23+
1324

1425
## [v0.11.0] - 2020-07-24
1526

@@ -191,6 +202,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
191202
- Flexible plugin framework to extend functionality. Based on the framework, developer can add new features rapidly
192203
- Detailed built-in metrics available for service status monitor
193204

205+
[v0.12.0]: https://github.com/bfenetworks/bfe/compare/v0.11.0...v0.12.0
194206
[v0.11.0]: https://github.com/bfenetworks/bfe/compare/v0.10.0...v0.11.0
195207
[v0.10.0]: https://github.com/bfenetworks/bfe/compare/v0.9.0...v0.10.0
196208
[v0.9.0]: https://github.com/bfenetworks/bfe/compare/v0.8.0...v0.9.0

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
| Jin Tong | cumirror |
2020
| Jiyang Zhang | scriptkids |
2121
| Kaiyu Zheng | kaiyuzheng |
22+
| Lidong Chang | changlidong68 |
2223
| Lihua Chen | clh651188968 |
2324
| Limei Xiao | limeix |
2425
| Lei Zhang | deancn |

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ COPY conf /bfe/output/conf/
1111
EXPOSE 8080 8443 8421
1212

1313
WORKDIR /bfe/output/bin
14-
CMD ["./bfe", "-c", "../conf/"]
14+
ENTRYPOINT ["./bfe"]
15+
CMD ["-c", "../conf/", "-l", "../log"]

GOVERNANCE.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,22 @@ The BFE community adheres to the following principles:
99
- Merit: Ideas and contributions are accepted according to their technical merit and alignment with project objectives, scope, and design principles.
1010

1111

12+
## Project Lead
13+
14+
The BFE project has a project lead.
15+
16+
A project lead in BFE is a single person that has a final say in any decision concerning the BFE project.
17+
18+
The term of the project lead is one year, with no term limit restriction.
19+
20+
The project lead is elected by BFE maintainers according to an individual's technical merit to BFE project.
21+
22+
The current project lead is identified in the [MAINTAINERS](MAINTAINERS.md) file`.
23+
24+
1225
## Process for becoming a maintainer
1326

14-
* Express interest to the project leader that you are interested in becoming a
27+
* Express interest to the [project lead](MAINTAINERS.md) that you are interested in becoming a
1528
maintainer. Becoming a maintainer generally means that you are going to be spending substantial
1629
time (>20%) on BFE for the foreseeable future. You are expected to have domain expertise and be extremely
1730
proficient in golang.
@@ -51,3 +64,54 @@ should volunteer to be moved to emeritus status.
5164
* In extreme cases this can also occur by a vote of the maintainers per the voting process. The voting
5265
process is a simple majority in which each senior maintainer receives two votes and each normal maintainer
5366
receives one vote.
67+
68+
69+
## Changes in Project Lead
70+
71+
Changes in project lead is initiated by opening a github PR.
72+
73+
Anyone from BFE community can vote on the PR with either +1 or -1.
74+
75+
Only the following votes are binding:
76+
1) Any maintainer that has been listed in the [MAINTAINERS](MAINTAINERS.md) file before the PR is opened.
77+
2) Any maintainer from an organization may cast the vote for that organization. However, no organization
78+
should have more binding votes than 1/5 of the total number of maintainers defined in 1).
79+
80+
The PR should only be opened no earlier than 6 weeks before the end of the project lead's term.
81+
The PR should be kept open for no less than 4 weeks. The PR can only be merged after the end of the
82+
last project lead's term, with more +1 than -1 in the binding votes.
83+
84+
When there are conflicting PRs about changes in project lead, the PR with the most binding +1 votes is merged.
85+
86+
The project lead can volunteer to step down.
87+
88+
89+
## Changes in Project Governance
90+
All substantive updates in Governance require a supermajority maintainers vote.
91+
92+
93+
## Decision making process
94+
95+
Decisions are build on consensus between maintainers.
96+
Proposals and ideas can either be submitted for agreement via a github issue or PR,
97+
or by sending an email to `cncf-bfe-maintainers@lists.cncf.io`.
98+
99+
In general, we prefer that technical issues and maintainer membership are amicably worked out between the persons involved.
100+
If a dispute cannot be decided independently, get a third-party maintainer (e.g. a mutual contact with some background
101+
on the issue, but not involved in the conflict) to intercede.
102+
If a dispute still cannot be decided, the project lead has the final say to decide an issue.
103+
104+
Decision making process should be transparent to adhere to the principles of BFE project.
105+
106+
All proposals, ideas, and decisions by maintainers or the project lead
107+
should either be part of a github issue or PR, or be sent to `cncf-bfe-maintainers@lists.cncf.io`.
108+
109+
110+
## Code of Conduct
111+
112+
The [BFE Code of Conduct](CODE_OF_CONDUCT.md) is aligned with the CNCF Code of Conduct.
113+
114+
115+
## Credits
116+
117+
Sections of this documents have been borrowed from [Fluentd](https://github.com/fluent/fluentd/blob/master/GOVERNANCE.md) and [CoreDNS](https://github.com/coredns/coredns/blob/master/GOVERNANCE.md) projects.

MAINTAINERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This file lists who are the maintainers of the BFE project. The responsibilities for maintainers are listed in the [GOVERNANCE.md](GOVERNANCE.md) file.
44

5-
## Project Leader
5+
## Project Lead
66
| Name | GitHub ID | Affiliation |
77
| ---- | --------- | ----------- |
88
| [Miao Zhang](mailto:zhangmiao02@baidu.com) | [mileszhang2016](https://github.com/mileszhang2016) | Baidu |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
BFE is a modern layer 7 load balancer from baidu.
1414

1515
## Advantages
16-
- Multiple protocols supported, including HTTP, HTTPS, SPDY, HTTP2, WebSocket, TLS, etc.
16+
- Multiple protocols supported, including HTTP, HTTPS, SPDY, HTTP2, WebSocket, TLS, FastCGI, etc.
1717
- Content based routing, support user-defined routing rule in advanced domain-specific language.
1818
- Support multiple load balancing policies.
1919
- Flexible plugin framework to extend functionality. Based on the framework, developer can add new features rapidly.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.11.0
1+
0.12.0

bfe_balance/bal_gslb/bal_gslb_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package bal_gslb
1616

1717
import (
18-
"encoding/json"
1918
"io/ioutil"
2019
"net"
2120
"testing"
@@ -27,6 +26,7 @@ import (
2726
"github.com/bfenetworks/bfe/bfe_config/bfe_cluster_conf/cluster_table_conf"
2827
"github.com/bfenetworks/bfe/bfe_config/bfe_cluster_conf/gslb_conf"
2928
"github.com/bfenetworks/bfe/bfe_http"
29+
"github.com/bfenetworks/bfe/bfe_util/json"
3030
)
3131

3232
func loadJson(path string, v interface{}) error {

bfe_balance/bal_slb/bal_rr_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package bal_slb
1616

1717
import (
18-
"encoding/json"
1918
"fmt"
2019
"math/rand"
2120
"reflect"
@@ -25,6 +24,7 @@ import (
2524
import (
2625
"github.com/bfenetworks/bfe/bfe_balance/backend"
2726
"github.com/bfenetworks/bfe/bfe_config/bfe_cluster_conf/cluster_table_conf"
27+
"github.com/bfenetworks/bfe/bfe_util/json"
2828
)
2929

3030
func populateBackend(name, addr string, port int, avail bool) *backend.BfeBackend {

0 commit comments

Comments
 (0)