Skip to content

INFRA-13891 Pull upstream changes #1

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

Open
wants to merge 113 commits into
base: 509-as-429
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
0dea491
Add support for nginx_upstream_check_module module
Aug 16, 2018
0aceada
Use HTTP healthcehck, not stream one. Bad copy/paste
Aug 16, 2018
f7d976f
Update ngx_http_vhost_traffic_status_node.c
susuper Nov 15, 2018
935d442
Prometheus: remove request "total" metrics
robn Feb 18, 2019
2b8ec82
Prometheus: fix nginx_vts_filter_requests_total labels
robn Feb 18, 2019
63b917f
Cast key length to correct type
jongiddy Mar 22, 2019
25cba13
Set histogram buckets on first request
jongiddy Mar 29, 2019
9e814d0
Escape special characters in Prometheus output
jongiddy Apr 11, 2019
6f8e39f
Test: describe how to test and fix failed test case
spacewander Sep 30, 2019
cfc8d49
fix vhost_traffic_status_filter_max_node 16 uris
patsevanton Nov 17, 2019
c0b35e2
prometheus filter direction change to code
Mar 6, 2020
5c58aaa
fix: limit the r->uri search scope to avoid overflow
spacewander Aug 20, 2020
5539b86
docs: fix simple typo, destory -> destroy
timgates42 Nov 22, 2020
381541c
Merge pull request #171 from patsevanton/patch-1
vozlt Jan 18, 2021
d717d50
Merge pull request #193 from timgates42/bugfix_typo_destroy
vozlt Jan 18, 2021
83a889e
Merge pull request #145 from susuper/master
vozlt Jan 18, 2021
49f4bd6
Refactor: changed if statement from merged pull/145
vozlt Jan 18, 2021
11540f3
Merge pull request #188 from spacewander/fix_heap_overflow
vozlt Jan 18, 2021
badf08d
Merge pull request #161 from jongiddy/short-key-length
vozlt Jan 18, 2021
1a6ff88
Merge pull request #163 from jongiddy/histogram-init-update
vozlt Jan 18, 2021
ead62a0
Merge pull request #165 from jongiddy/escape-prometheus
vozlt Jan 18, 2021
277db37
Refactor: changed spacing
vozlt Jan 18, 2021
fef53dc
Merge pull request #182 from chzhuo/master
vozlt Jan 18, 2021
9a3e4ca
Merge pull request #144 from chipitsine/master
vozlt Jan 18, 2021
bc1f0be
Merge branch 'master' into prom-fixes
vozlt Jan 19, 2021
77fc83c
Merge pull request #157 from robn/prom-fixes
vozlt Jan 19, 2021
29b38b2
Merge pull request #169 from spacewander/desc_test_pass
vozlt Jan 19, 2021
143a151
Merge pull request #134 from pfischermx/http-healthcheck-module
vozlt Jan 19, 2021
7c3ecb9
Refactor: changed spacing
vozlt Jan 19, 2021
87d7de9
Bugfix: fixed issues/174 that XSS vulnerability in the html page
vozlt Jan 24, 2021
c16aa0e
Comment: added tested versions
vozlt Jan 24, 2021
549cc4d
Bugfix: fixed issues/137, issues/98 that maxSize in cacheZones is dis…
vozlt Jan 25, 2021
203bc5b
Bugfix: rollback to 549cc4d
vozlt Jan 27, 2021
91bdb14
Comment: added additional information about cacheZones
vozlt Jan 27, 2021
fec0baf
Refactor: changed version
vozlt Jan 28, 2021
3c6cf41
Comment: added moduleVersion
vozlt Feb 10, 2021
aa44e34
optimizes flags png/base64 image
mathieu-aubin Aug 3, 2021
5272c25
Bugfix: fixed issues/204 that syntax error has occured
u5surf Aug 27, 2021
29cc8b4
Docs: Fix README
u5surf Apr 5, 2022
361967c
Update ngx_http_vhost_traffic_status_node.c
BoyanHH Jul 6, 2022
78ad9be
Bugfix: fixed for PR#238
vozlt Sep 3, 2022
a950b23
Bugfix: fixed for PR#238
vozlt Sep 4, 2022
dfd1a59
Merge pull request #208 from mathieu-aubin/flagopt
vozlt Sep 4, 2022
f7b3960
Merge pull request #229 from u5surf/fix_readme
vozlt Sep 4, 2022
192674c
Merge pull request #210 from u5surf/issue-204
vozlt Sep 4, 2022
7e81230
Merge pull request #234 from BoyanHH/master
vozlt Sep 4, 2022
1266e0b
Add github actions (#238)
u5surf Sep 5, 2022
01d3479
chore: Use git-chglog
SuperQ Sep 5, 2022
f6706e7
Merge pull request #239 from vozlt/superq/git-chglog
vozlt Sep 5, 2022
b740132
Release v0.2.0
SuperQ Sep 5, 2022
6dadfc8
Merge pull request #240 from vozlt/cut-v0.2.0
u5surf Sep 5, 2022
5c439d9
test: Add test for display prometheus
u5surf Sep 6, 2022
49b8f5e
test: Add test for prometheus syntax
u5surf Sep 6, 2022
1bae2fd
chore: Change module version. (#241)
u5surf Sep 6, 2022
7ef4e85
Docs: Fixed README
vozlt Sep 6, 2022
e3cc427
Merge pull request #242 from u5surf/test_display_prometheus
u5surf Sep 7, 2022
6fb2eb1
Compatibility: fixed an issues/232 with compile errors in gcc 11.3
vozlt Sep 7, 2022
e4da6dc
test: build without -Wno-stringop-overread (#243)
u5surf Sep 8, 2022
8520fde
Debug: added ngx_log_error() when ngx_http_vhost_traffic_status_node_…
vozlt Sep 14, 2022
c3f8e82
Bugfix: improved the accuracy of total(*) statistics by nginx-module-…
vozlt Sep 16, 2022
3befaf9
Bugfix: use trimmed serverZones name
u5surf Sep 16, 2022
e397b57
Merge pull request #246 from u5surf/issue-212-2
u5surf Sep 16, 2022
99b0389
chore: Add CI badge in README (#245)
u5surf Sep 16, 2022
f4d24d2
Release v0.2.1
SuperQ Sep 16, 2022
0009b3b
Merge pull request #247 from vozlt/cut-v0.2.1
u5surf Sep 16, 2022
319fe4c
bugfix: Add shmtx unlock
u5surf Sep 26, 2022
f731137
Merge pull request #249 from u5surf/shm_unlock
u5surf Sep 26, 2022
1277c01
Bugfix: fixed issues/248 Shared memory (lock|unlock) is set when usin…
vozlt Sep 26, 2022
a646cb1
Chore: add cpanm --notest in CI
u5surf Sep 27, 2022
443d883
Merge pull request #250 from u5surf/reduce_ci_time
u5surf Sep 27, 2022
4bbac92
Bugfix: fixed issues/228 Change the reffered source of upstream_state…
u5surf Oct 18, 2022
46e431b
Merge pull request #252 from u5surf/issue-228
u5surf Oct 18, 2022
0c60d57
Add histogram_bucket test
u5surf Jan 2, 2023
5b3812e
Merge pull request #256 from u5surf/add_buckets_test
u5surf Jan 4, 2023
fcc3c15
Fix escaping filter_key in prometheus output
u5surf Feb 19, 2023
41a7ceb
test: Add upstream check test
u5surf Mar 12, 2023
cfc59fa
Merge pull request #264 from u5surf/add_upstream_check_test
u5surf Mar 12, 2023
54867a8
test: Fix upstream check test properly
u5surf Mar 13, 2023
dd6930c
Merge pull request #265 from u5surf/fix_upstream_test_ci
u5surf Mar 13, 2023
a2961ef
Fix ngx_utf8_decode
u5surf Mar 18, 2023
4b4dd60
Fix conditions of the pointer pa
u5surf Mar 25, 2023
a98a4b8
Merge pull request #260 from u5surf/issue-142
u5surf Mar 26, 2023
30a38c5
Fix vtsn.len type #269
u5surf Apr 16, 2023
bf64dbf
Merge pull request #270 from u5surf/issue-269
u5surf Apr 17, 2023
1877c62
Release v0.2.2
u5surf May 26, 2023
bd33883
Merge pull request #272 from u5surf/cut-v0.2.2
u5surf May 26, 2023
3e5806e
Docs: Fix README
cohalz Jan 19, 2024
724b34d
Merge pull request #291 from cohalz/patch-1
u5surf Jan 20, 2024
80a3f97
ci: support freenginx
u5surf Oct 28, 2024
88a3870
Merge pull request #303 from vozlt/ci-support-freenginx
u5surf Oct 28, 2024
6e3a609
fix encodeURI into template
u5surf Dec 31, 2024
6fe33b3
fix ci
u5surf Dec 31, 2024
b57acea
Merge pull request #305 from u5surf/fix_encode_uri
u5surf Dec 31, 2024
9e2bcb3
Release v0.2.3
u5surf Jan 1, 2025
6038d44
Merge pull request #306 from u5surf/cut-v0.2.3
u5surf Jan 1, 2025
8c24c00
Add example of build process for PGO supported binary #283 (#288)
u5surf Jan 1, 2025
3407cc2
Support query string encoding for control API #279 (#287)
u5surf Jan 1, 2025
bb44ba9
Introduce vhost_traffic_status_stats_by_upstream (#293)
u5surf Jan 2, 2025
08100af
fix: escape uri in module side
u5surf Jan 2, 2025
08cfc05
Pin CI to Ubuntu 24.04, use system libpcre2-dev package
mschfh Jan 3, 2025
dcb995a
Merge pull request #310 from mschfh/test-ci-with-pcre2
u5surf Jan 3, 2025
f12ad50
Add issue template
u5surf Jan 5, 2025
b942dd8
Merge pull request #311 from u5surf/issue_template
u5surf Jan 5, 2025
eca7b8a
Fix issue template
u5surf Jan 5, 2025
a18c3f6
Merge pull request #312 from u5surf/issue_template_2
u5surf Jan 5, 2025
4aa96d5
Update README.md
masterzu Jan 9, 2025
b6f6528
Merge pull request #314 from masterzu/patch-1
u5surf Jan 9, 2025
63d3881
Add ignore_status
u5surf Mar 1, 2025
7a641fe
fix aline node_t
u5surf Mar 3, 2025
ea759b6
Merge pull request #307 from u5surf/fix_encode_without_pcre2
u5surf Mar 12, 2025
e016f7f
Release v0.2.4
u5surf Mar 12, 2025
8027b3b
Merge pull request #320 from vozlt/cut-v0.2.4
u5surf Mar 12, 2025
1485f3f
Merge pull request #316 from u5surf/issue-315
u5surf Apr 7, 2025
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
41 changes: 41 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]

{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{ range .Versions }}
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{- if .Versions }}
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}
20 changes: 20 additions & 0 deletions .chglog/RELNOTES.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ range .Versions -}}
Release {{ .Tag.Name}}

Release {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
** {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
** {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
27 changes: 27 additions & 0 deletions .chglog/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/vozlt/nginx-module-vts
options:
commits:
# filters:
# Type:
# - feat
# - fix
# - perf
# - refactor
commit_groups:
# title_maps:
# feat: Features
# fix: Bug Fixes
# perf: Performance Improvements
# refactor: Code Refactoring
header:
pattern: "^(\\w*)\\:\\s(.*)$"
pattern_maps:
- Type
- Subject
notes:
keywords:
- BREAKING CHANGE
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Bug Report
description: Report incorrect behavior in this module
title: "BUG: "
labels: [bug]

body:
- type: checkboxes
id: checks
attributes:
label: module version checks
options:
- label: >
I have checked that this issue has not already been reported.
required: true
- type: textarea
id: problem
attributes:
label: Issue Description
description: >
Please provide a description of the issue shown in the reproducible example.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: >
Please describe or show a code example of the expected behavior.
validations:
required: true
- type: textarea
id: version
attributes:
label: Installed Versions
placeholder: >
% sudo /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.27.0
built by gcc 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
configure arguments: --add-module=../nginx-module-vts
description: >
Please paste the output of ``nginx -V``
value: >
<details>


Replace this line with the output of nginx -V


</details>
validations:
required: true
- type: textarea
id: conf
attributes:
label: Reproducible Example nginx.conf
description: >
Please paste the reproducible nginx.conf
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Feature Request
description: Suggest an idea for this module
title: "ENH: "
labels: [enhancement]

body:
- type: checkboxes
id: checks
attributes:
label: Feature Type
description: Please check what type of feature request you would like to propose.
options:
- label: >
Adding new functionality to this module
- label: >
Changing existing functionality in this module
- label: >
Removing existing functionality in this module
- type: textarea
id: description
attributes:
label: Problem Description
description: >
Please describe what problem the feature would solve, e.g. "I wish I could use this module to ..."
placeholder: >
I wish I could use this module...
validations:
required: true
- type: textarea
id: feature
attributes:
label: Feature Description
description: >
Please describe how the new feature would be implemented, using psudocode if relevant.
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional Context
description: >
Please provide any relevant GitHub issues, code examples or references that help describe and support the feature request.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/submit_question.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Submit Question
description: Ask a general question about this module
title: "QST: "
labels: [question]

body:
- type: textarea
id: question
attributes:
label: Question about this module
- type: textarea
id: version
attributes:
label: Installed Versions
placeholder: >
% sudo /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.27.0
built by gcc 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
configure arguments: --add-module=../nginx-module-vts
description: >
Please paste the output of ``nginx -V``
value: >
<details>
Replace this line with the output of nginx -V
</details>
- type: textarea
id: conf
attributes:
label: Reproducible Example nginx.conf
description: >
Please paste the reproducible nginx.conf
129 changes: 129 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
name: 'build'
runs-on: ubuntu-24.04
steps:
- name: 'checkout'
uses: actions/checkout@v3
with:
path: nginx-module-vts
- name: 'checkout nginx'
uses: actions/checkout@v3
with:
repository: nginx/nginx
path: nginx
- name: 'checkout freenginx'
uses: actions/checkout@v3
with:
repository: freenginx/nginx
path: freenginx
- name: 'checkout luajit2'
uses: actions/checkout@v3
with:
repository: openresty/luajit2
path: luajit2
- name: 'checkout ngx_devel_kit'
uses: actions/checkout@v3
with:
repository: vision5/ngx_devel_kit
path: ngx_devel_kit
- name: 'checkout lua-nginx-module'
uses: actions/checkout@v3
with:
repository: openresty/lua-nginx-module
path: lua-nginx-module
- name: 'checkout lua-resty-core'
uses: actions/checkout@v3
with:
repository: openresty/lua-resty-core
path: lua-resty-core
- name: 'checkout lua-resty-lrucache'
uses: actions/checkout@v3
with:
repository: openresty/lua-resty-lrucache
path: lua-resty-lrucache
- name: 'build luajit2'
working-directory: luajit2
run: |
make
sudo make install
sudo mkdir /usr/local/share/lua/5.1/resty
- name: 'link resty lib'
working-directory: /usr/local/share/lua/5.1/resty
run: |
sudo ln -s /home/runner/work/nginx-module-vts/nginx-module-vts/lua-resty-core/lib/resty/core core
sudo ln -s /home/runner/work/nginx-module-vts/nginx-module-vts/lua-resty-core/lib/resty/core.lua core.lua
sudo ln -s /home/runner/work/nginx-module-vts/nginx-module-vts/lua-resty-lrucache/lib/resty/lrucache lrucache
sudo ln -s /home/runner/work/nginx-module-vts/nginx-module-vts/lua-resty-lrucache/lib/resty/lrucache.lua lrucache.lua
- name: 'prepare nginx_upstream_check'
uses: actions/checkout@v3
with:
repository: yaoweibin/nginx_upstream_check_module
path: nginx_upstream_check

- name: 'patch upstream_check'
working-directory: nginx
run: |
patch -p1 < /home/runner/work/nginx-module-vts/nginx-module-vts/nginx_upstream_check/check_1.20.1+.patch
- name: 'patch upstream_check for freenginx'
working-directory: freenginx
run: |
patch -p1 < /home/runner/work/nginx-module-vts/nginx-module-vts/nginx_upstream_check/check_1.20.1+.patch
- name: 'build nginx'
working-directory: nginx
run: |
./auto/configure --with-ld-opt="-Wl,-rpath,/usr/local/lib" --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/ngx_devel_kit --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/lua-nginx-module --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx-module-vts --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx_upstream_check
make
sudo make install
/usr/local/nginx/sbin/nginx -V
env:
LUAJIT_LIB: /usr/local/lib
LUAJIT_INC: /usr/local/include/luajit-2.1
- name: 'build freenginx'
working-directory: freenginx
run: |
./auto/configure --prefix=/usr/local/freenginx --with-ld-opt="-Wl,-rpath,/usr/local/lib" --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/ngx_devel_kit --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/lua-nginx-module --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx-module-vts --add-module=/home/runner/work/nginx-module-vts/nginx-module-vts/nginx_upstream_check
make
sudo make install
/usr/local/freenginx/sbin/nginx -V
env:
LUAJIT_LIB: /usr/local/lib
LUAJIT_INC: /usr/local/include/luajit-2.1
- name: 'prepare cpanm'
run: |
sudo apt install -y cpanminus
sudo cpanm --notest Test::Nginx::Socket > build.log 2>&1 || (cat build.log && exit 1)
- name: 'prepare promtool'
run: |
sudo apt-get update && sudo apt-get install -y curl
curl -L $(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '"' -f 4) -o prometheus-latest.tar.gz
tar xvf prometheus-latest.tar.gz
sudo mv prometheus-*/promtool /usr/local/bin
- name: 'test'
working-directory: nginx-module-vts
run: |
echo "/usr/local/nginx/sbin/" >> $GITHUB_PATH
sudo PATH=/usr/local/nginx/sbin:$PATH prove -r t
- name: 'test upstream check'
working-directory: nginx-module-vts
run: |
echo "/usr/local/nginx/sbin/" >> $GITHUB_PATH
sudo TEST_UPSTREAM_CHECK=1 TEST_NGINX_SLEEP=1 PATH=/usr/local/nginx/sbin:$PATH prove t/024.upstream_check.t
- name: 'test freenginx'
working-directory: nginx-module-vts
run: |
echo "/usr/local/freenginx/sbin/" >> $GITHUB_PATH
sudo PATH=/usr/local/freenginx/sbin:$PATH prove -r t
- name: 'test upstream check for freenginx'
working-directory: nginx-module-vts
run: |
echo "/usr/local/freenginx/sbin/" >> $GITHUB_PATH
sudo TEST_UPSTREAM_CHECK=1 TEST_NGINX_SLEEP=1 PATH=/usr/local/freenginx/sbin:$PATH prove t/024.upstream_check.t
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
t/servroot
Loading