Skip to content

Commit

Permalink
Merge branch 'master' into feat/FTI-5861-AI-Metrics-Prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineJac authored Jun 7, 2024
2 parents 008c3bb + d1994f7 commit c1a1960
Show file tree
Hide file tree
Showing 162 changed files with 2,186 additions and 759 deletions.
5 changes: 4 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ plugins/standard-webhooks:

schema-change-noteworthy:
- changed-files:
- any-glob-to-any-file: ['kong/db/schema/**/*.lua', 'kong/**/schema.lua', 'kong/plugins/**/daos.lua', 'plugins-ee/**/daos.lua', 'plugins-ee/**/schema.lua', 'kong/db/dao/*.lua', 'kong/enterprise_edition/redis/init.lua']
- any-glob-to-any-file: [
'kong/db/schema/**/*.lua', 'kong/**/schema.lua', 'kong/plugins/**/daos.lua', 'plugins-ee/**/daos.lua', 'plugins-ee/**/schema.lua', 'kong/db/dao/*.lua', 'kong/enterprise_edition/redis/init.lua',
'kong/llm/init.lua',
]

build/bazel:
- changed-files:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -597,14 +597,20 @@ jobs:
username: ${{ secrets.GHA_DOCKERHUB_PUSH_USER }}
password: ${{ secrets.GHA_KONG_ORG_DOCKERHUB_PUSH_TOKEN }}

- uses: actions/checkout@v3

- name: Get latest commit SHA on master
run: |
echo "latest_sha=$(git ls-remote origin -h refs/heads/${{ github.event.inputs.default_branch }} | cut -f1)" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ needs.metadata.outputs.docker-repository }}
sep-tags: " "
tags: |
type=raw,value=latest,enable=${{ matrix.label == 'ubuntu' }}
type=raw,value=latest,enable=${{ matrix.label == 'ubuntu' && github.ref_name == github.event.inputs.default_branch && env.latest_sha == needs.metadata.outputs.commit-sha }}
type=match,enable=${{ github.event_name == 'workflow_dispatch' }},pattern=\d.\d,value=${{ github.event.inputs.version }}
type=match,enable=${{ github.event_name == 'workflow_dispatch' && matrix.label == 'ubuntu' }},pattern=\d.\d,value=${{ github.event.inputs.version }},suffix=
type=raw,enable=${{ github.event_name == 'workflow_dispatch' }},${{ github.event.inputs.version }}
Expand Down
4 changes: 2 additions & 2 deletions .requirements
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ KONG_PACKAGE_NAME=kong

OPENRESTY=1.25.3.1
OPENRESTY_SHA256=32ec1a253a5a13250355a075fe65b7d63ec45c560bbe213350f0992a57cd79df
LUAROCKS=3.11.0
LUAROCKS_SHA256=25f56b3c7272fb35b869049371d649a1bbe668a56d24df0a66e3712e35dd44a6
LUAROCKS=3.11.1
LUAROCKS_SHA256=c3fb3d960dffb2b2fe9de7e3cb004dc4d0b34bb3d342578af84f84325c669102
OPENSSL=3.2.1
OPENSSL_SHA256=83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39
PCRE=10.43
Expand Down
2 changes: 2 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ Install the development dependencies ([busted](https://lunarmodules.github.io/bu
make dev
```

If Rust/Cargo doesn't work, try setting `export KONG_TEST_USER_CARGO_DISABLED=1` first.

Kong relies on three test suites using the [busted](https://lunarmodules.github.io/busted/) testing library:

* Unit tests
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OS := $(shell uname | awk '{print tolower($$0)}')
MACHINE := $(shell uname -m)

DEV_ROCKS = "busted 2.2.0" "busted-hjtest 0.0.5" "luacheck 1.1.2" "lua-llthreads2 0.1.6" "ldoc 1.5.0" "luacov 0.15.0"
DEV_ROCKS = "busted 2.2.0" "busted-hjtest 0.0.5" "luacheck 1.2.0" "lua-llthreads2 0.1.6" "ldoc 1.5.0" "luacov 0.15.0"
WIN_SCRIPTS = "bin/busted" "bin/kong" "bin/kong-health"
BUSTED_ARGS ?= -v
TEST_CMD ?= bin/busted $(BUSTED_ARGS)
Expand Down Expand Up @@ -44,7 +44,7 @@ endif
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
KONG_SOURCE_LOCATION ?= $(ROOT_DIR)
GRPCURL_VERSION ?= 1.8.5
BAZLISK_VERSION ?= 1.19.0
BAZLISK_VERSION ?= 1.20.0
H2CLIENT_VERSION ?= 0.4.4
BAZEL := $(shell command -v bazel 2> /dev/null)
VENV = /dev/null # backward compatibility when no venv is built
Expand Down Expand Up @@ -209,4 +209,3 @@ install-legacy:
@luarocks make OPENSSL_DIR=$(OPENSSL_DIR) CRYPTO_DIR=$(OPENSSL_DIR) YAML_DIR=$(YAML_DIR)

dev-legacy: remove install-legacy dependencies

12 changes: 10 additions & 2 deletions bin/kong
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,17 @@ package.path = (os.getenv("KONG_LUA_PATH_OVERRIDE") or "") .. "./?.lua;./?/init.
require("kong.cmd.init")("%s", %s)
]], cmd_name, args_str)

local resty_ngx_log_level
if arg.vv then
resty_ngx_log_level = "debug"
elseif arg.v then
resty_ngx_log_level = "info"
end

local resty_cmd = string.format(
"resty --main-conf \"%s\" --http-conf \"%s\" --stream-conf \"%s\" -e '%s'",
main_conf, http_conf, stream_conf, inline_code)
"resty %s --main-conf \"%s\" --http-conf \"%s\" --stream-conf \"%s\" -e '%s'",
resty_ngx_log_level and ("--errlog-level " .. resty_ngx_log_level) or "", main_conf,
http_conf, stream_conf, inline_code)

local _, code = pl_utils.execute(resty_cmd)
os.exit(code)
Expand Down
10 changes: 5 additions & 5 deletions build/nfpm/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ nfpm_release_select = repository_rule(

def nfpm_repositories():
npfm_matrix = [
["linux", "x86_64", "6dd3b07d4d6ee373baea5b5fca179ebf78dec38c9a55392bae34040e596e4de7"],
["linux", "arm64", "e6487dca9d9e9b1781fe7fa0a3d844e70cf12d92f3b5fc0c4ff771aa776b05ca"],
["Darwin", "x86_64", "19954ef8e6bfa0607efccd0a97452b6d571830665bd76a2f9957413f93f9d8cd"],
["Darwin", "arm64", "9fd82cda017cdfd49b010199a2eed966d0a645734d9a6bf932c4ef82c8c12c96"],
["linux", "x86_64", "3e1fe85c9a224a221c64cf72fc19e7cd6a0a51a5c4f4b336e3b8eccd417116a3"],
["linux", "arm64", "df8f272195b7ddb09af9575673a9b8111f9eb7529cdd0a3fac4d44b52513a1e1"],
["Darwin", "x86_64", "0213fa5d5af6f209d953c963103f9b6aec8a0e89d4bf0ab3d531f5f8b20b8eeb"],
["Darwin", "arm64", "5162ce5a59fe8d3b511583cb604c34d08bd2bcced87d9159c7005fc35287b9cd"],
]
for name, arch, sha in npfm_matrix:
http_archive(
name = "nfpm_%s_%s" % (name, arch),
url = "https://github.com/goreleaser/nfpm/releases/download/v2.31.0/nfpm_2.31.0_%s_%s.tar.gz" % (name, arch),
url = "https://github.com/goreleaser/nfpm/releases/download/v2.37.1/nfpm_2.37.1_%s_%s.tar.gz" % (name, arch),
sha256 = sha,
build_file = "//build/nfpm:BUILD.bazel",
)
Expand Down
12 changes: 6 additions & 6 deletions build/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ def github_cli_repositories():
"""Defines the github cli repositories"""

gh_matrix = [
["linux", "amd64", "tar.gz", "5aee45bd42a27f5be309373c326e45cbcc7f04591b1798581a3094af767225b7"],
["linux", "arm64", "tar.gz", "3ef741bcc1ae8bb975adb79a78e26ab7f18a246197f193aaa8cb5c3bdc373a3f"],
["macOS", "amd64", "zip", "6b91c446586935de0e9df82da58309b2d1b83061cfcd4cc173124270f1277ca7"],
["macOS", "arm64", "zip", "32a71652367f3cf664894456e4c4f655faa95964d71cc3a449fbf64bdce1fff1"],
["linux", "amd64", "tar.gz", "7f9795b3ce99351a1bfc6ea3b09b7363cb1eccca19978a046bcb477839efab82"],
["linux", "arm64", "tar.gz", "115e1a18695fcc2e060711207f0c297f1cca8b76dd1d9cd0cf071f69ccac7422"],
["macOS", "amd64", "zip", "d18acd3874c9b914e0631c308f8e2609bd45456272bacfa70221c46c76c635f6"],
["macOS", "arm64", "zip", "85fced36325e212410d0eea97970251852b317d49d6d72fd6156e522f2896bc5"],
]
for name, arch, type, sha in gh_matrix:
http_archive(
name = "gh_%s_%s" % (name, arch),
url = "https://github.com/cli/cli/releases/download/v2.30.0/gh_2.30.0_%s_%s.%s" % (name, arch, type),
strip_prefix = "gh_2.30.0_%s_%s" % (name, arch),
url = "https://github.com/cli/cli/releases/download/v2.50.0/gh_2.50.0_%s_%s.%s" % (name, arch, type),
strip_prefix = "gh_2.50.0_%s_%s" % (name, arch),
sha256 = sha,
build_file_content = _SRCS_BUILD_FILE_CONTENT,
)
Expand Down
Loading

0 comments on commit c1a1960

Please sign in to comment.