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

Build/2.8.x cleanup #13395

Merged
merged 42 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f47051a
chore(build): remove unrelated patches
Water-Melon Jun 22, 2024
5d3922c
chore(build): fix docker image version
Water-Melon Jun 22, 2024
0b18b01
chore(build): downgrade dependencies versions (#13282)
Water-Melon Jun 22, 2024
b5e01be
fix(package): add missing zlib1g-dev dep
locao Jun 22, 2024
0e327f8
chore(ci): skip uploading centos packages to cloudsmith
AndyZhang0707 Jun 23, 2024
61042e3
docs(release): genereate 2.8.5 changelog
AndyZhang0707 Jun 23, 2024
ab16349
Revert "docs(changelog): move changelog locations (#13236)"
AndyZhang0707 Jul 18, 2024
044d555
Revert "fix(dns): fix the UDP socket leaking issue (#12698)"
AndyZhang0707 Jul 18, 2024
187e39a
Revert "fix(template): fix failure of starting if `proxy_access_log` …
AndyZhang0707 Jul 18, 2024
84b52d6
Revert "fix(conf): fix the default value of upstream_keepalive_max_re…
AndyZhang0707 Jul 18, 2024
a5c97b0
Revert "perf(proxy): use higher default keepalive request value for N…
AndyZhang0707 Jul 18, 2024
2cfa696
Revert "perf(template): use more reasonable default value for Nginx t…
AndyZhang0707 Jul 18, 2024
cf324bc
Revert "chore(patches): revert the "respect max retries" patch"
AndyZhang0707 Jul 18, 2024
a33ea19
Revert "fix(balancer): respect max retries (#12346)"
AndyZhang0707 Jul 18, 2024
e2dd96a
Revert "chore(deps): bump `lua-resty-healthcheck` to `1.5.4` (#12238)"
AndyZhang0707 Jul 18, 2024
660a79b
Revert "Revert "Revert "tests: re-enable and fix flaky tests in spec/…
AndyZhang0707 Jul 18, 2024
31673b2
Revert "Revert "Revert "test(cmd): fix flaky `can receive USR1` test …
AndyZhang0707 Jul 18, 2024
cf85cf6
Revert "Revert "Revert "tests(*): fix flaky hybrid mode ocsp tests (#…
AndyZhang0707 Jul 18, 2024
0f9ca8c
Revert "Revert "Revert "tests(*): modify tests that need to access mo…
AndyZhang0707 Jul 18, 2024
0cdb258
Revert "Revert "Revert "tests(helpers): pickup reload helper from #86…
AndyZhang0707 Jul 18, 2024
9040cc0
Revert "Revert "Revert "tests(router): add worker_consistency=eventua…
AndyZhang0707 Jul 18, 2024
f523e4d
Revert "Revert "Revert "fix(*): do not use stale router data if worke…
AndyZhang0707 Jul 18, 2024
6fce805
Revert "Revert "Revert "fix(runloop) do not reset `*:version` to `ini…
AndyZhang0707 Jul 18, 2024
41fe3df
Revert "Revert "Revert "fix(*): prevent queues from growing without b…
AndyZhang0707 Jul 18, 2024
5f8d3a1
Revert "Revert "Revert "Revert "fix(*): prevent queues from growing w…
AndyZhang0707 Jul 18, 2024
40c351c
Revert "Revert "Revert "Revert "docs(*): document new max_queued_batc…
AndyZhang0707 Jul 18, 2024
4428c7c
Revert "Revert "Revert "docs(*): document new max_queued_batches para…
AndyZhang0707 Jul 18, 2024
4251010
Revert "Revert "Revert "fix(*): prevent queues from growing without b…
AndyZhang0707 Jul 18, 2024
4ec3aba
Revert "Revert "Revert "refactor(handler): trying to make reconfigure…
AndyZhang0707 Jul 18, 2024
dc8e87b
Revert "Revert "Revert "chore(rockspec): bump lua-resty-healthcheck t…
AndyZhang0707 Jul 18, 2024
8e4c60a
Revert "Revert "Revert "fix(postgres): close socket actively when tim…
AndyZhang0707 Jul 18, 2024
2dbd59d
Revert "feat(templates): bump `dns_stale_ttl` default to 1 hour (#120…
AndyZhang0707 Jul 18, 2024
ed464a2
Revert "fix(dns): eliminate asynchronous timer in `syncQuery()` to pr…
AndyZhang0707 Jul 18, 2024
5ac37a4
Revert "fix(dns): fix retry and timeout handling (#11386)"
AndyZhang0707 Jul 18, 2024
a17f569
Revert "perf(request-id): use `proxy_set_header` instead of `ngx.req.…
AndyZhang0707 Jul 18, 2024
c6c37f9
Revert "perf(request-id): use `$kong_request_id` for `$request_id` fo…
AndyZhang0707 Jul 18, 2024
7a70642
Revert "feat(request-id): introduce unique Request ID (#11663)"
AndyZhang0707 Jul 18, 2024
553fbec
chore(cd): drop EOL rhel7 and debian10
fffonion May 21, 2024
a4e6e5c
chore(build): bump cross toolchain to 0.7.0
fffonion May 21, 2024
bdacadd
feat(build): cross build for amazonlinux:2 x86_64
fffonion May 21, 2024
8188ef7
fix(build): cleanup cross build flags
fffonion May 21, 2024
1705ae1
fix(build): use Configure directly to support cross build on openssl …
fffonion Jul 23, 2024
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
15 changes: 6 additions & 9 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
FROM kong/kong:3.0.0-ubuntu
FROM kong/kong:2.7.0

USER root

RUN apt-get update

RUN apt-get install -y \
build-essential \
unzip \
git \
m4 \
libyaml-dev
RUN apk add --update \
alpine-sdk \
build-base \
bsd-compat-headers \
m4
2 changes: 1 addition & 1 deletion .github/matrix-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ build-packages:

# Amazon Linux
- label: amazonlinux-2
image: amazonlinux:2
package: rpm
package-type: aws2
check-manifest-suite: amazonlinux-2-amd64
bazel-args: --platforms=//:aws2-crossbuild-x86_64
- label: amazonlinux-2023
image: amazonlinux:2023
package: rpm
Expand Down
32 changes: 11 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Package & Release

# The workflow to build and release official Kong packages and images.
#
# TODO:
# Do not bump the version of actions/checkout to v4 before dropping rhel7 and amazonlinux2.

on: # yamllint disable-line rule:truthy
pull_request:
Expand Down Expand Up @@ -130,15 +127,15 @@ jobs:

- name: Cache Git
id: cache-git
if: (matrix.package == 'rpm' || matrix.image == 'debian:10') && matrix.image != ''
uses: actions/cache@v3
if: (matrix.package == 'rpm') && matrix.image != ''
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3, DO NOT BUMP, v4 BREAKS ON CENTOS7 OR AMAZONLINUX2
with:
path: /usr/local/git
key: ${{ matrix.label }}-git-2.41.0

# el-7,8, amazonlinux-2,2023, debian-10 doesn't have git 2.18+, so we need to install it manually
# el-7,8, amazonlinux-2,2023 doesn't have git 2.18+, so we need to install it manually
- name: Install newer Git
if: (matrix.package == 'rpm' || matrix.image == 'debian:10') && matrix.image != '' && steps.cache-git.outputs.cache-hit != 'true'
if: (matrix.package == 'rpm') && matrix.image != '' && steps.cache-git.outputs.cache-hit != 'true'
run: |
if which apt 2>/dev/null; then
apt update
Expand All @@ -152,28 +149,16 @@ jobs:
tar xf git-2.41.0.tar.gz
cd git-2.41.0

# https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/5948/diffs
if [[ ${{ matrix.image }} == "centos:7" ]]; then
echo 'CFLAGS=-std=gnu99' >> config.mak
fi

make configure
./configure --prefix=/usr/local/git
make -j$(nproc)
make install

- name: Add Git to PATH
if: (matrix.package == 'rpm' || matrix.image == 'debian:10') && matrix.image != ''
if: (matrix.package == 'rpm') && matrix.image != ''
run: |
echo "/usr/local/git/bin" >> $GITHUB_PATH

- name: Debian Git dependencies
if: matrix.image == 'debian:10'
run: |
apt update
# dependencies for git
apt install -y wget libz-dev libssl-dev libcurl4-gnutls-dev sudo

- name: Checkout Kong source code
uses: actions/checkout@v3

Expand Down Expand Up @@ -618,7 +603,12 @@ jobs:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
CLOUDSMITH_DRY_RUN: ''
IGNORE_CLOUDSMITH_FAILURES: ${{ vars.IGNORE_CLOUDSMITH_FAILURES }}
USE_CLOUDSMITH: ${{ vars.USE_CLOUDSMITH }}
# skip CentOS package uploads for Cloudsmith
#
# Cloudsmith doesn't support CentOS as a unique distribution
# there is only "el" (enterprise linux) distributions that cover all
# RedHat-family OSs and that distribution is covered by the rhel label
USE_CLOUDSMITH: ${{ ! startsWith(matrix.label, 'centos') || '' && vars.USE_CLOUDSMITH }}
run: |
sha256sum bazel-bin/pkg/*

Expand Down
9 changes: 4 additions & 5 deletions .requirements
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ RESTY_PCRE_VERSION=8.45
LIBYAML_VERSION=0.2.5
KONG_GO_PLUGINSERVER_VERSION=v0.6.1
KONG_BUILD_TOOLS_VERSION=4.40.1
KONG_NGINX_MODULE_BRANCH=0.2.2
KONG_NGINX_MODULE_BRANCH=0.2.1

PCRE=8.45
OPENSSL=1.1.1w
LIBEXPAT=2.5.0
OPENSSL=1.1.1o
OPENRESTY=1.19.9.1
LUAROCKS=3.9.2
LUA_KONG_NGINX_MODULE=f52a34c17af4543245ff79e3227b9d514b8cfa5c # 0.2.2
LUAROCKS=3.8.0
LUA_KONG_NGINX_MODULE=6b2fa308e091e2daed2407dc38d54fbcd8fae768 # 0.2.1-sr1
37 changes: 23 additions & 14 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ nfpm_pkg(
visibility = ["//visibility:public"],
)

nfpm_pkg(
name = "kong_el7",
config = "//build:package/nfpm.yaml",
env = nfpm_env,
extra_env = {
"RPM_EXTRA_DEPS": "hostname",
},
packager = "rpm",
pkg_name = "kong.el7",
visibility = ["//visibility:public"],
)

nfpm_pkg(
name = "kong_aws2",
config = "//build:package/nfpm.yaml",
Expand Down Expand Up @@ -205,10 +193,20 @@ platform(
for vendor in aarch64_glibc_distros
]

platform(
name = "aws2-crossbuild-x86_64",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
"//build/platforms/distro:aws2",
":cross_build",
],
)

# config_settings define a select() condition based on user-set constraint_values
# see https://bazel.build/docs/configurable-attributes
config_setting(
name = "aarch64-linux-anylibc-cross",
name = "aarch64-linux-glibc-cross",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:aarch64",
Expand All @@ -228,12 +226,23 @@ config_setting(
visibility = ["//visibility:public"],
)

config_setting(
name = "x86_64-linux-glibc-cross",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
":cross_build",
],
visibility = ["//visibility:public"],
)

selects.config_setting_group(
# matches all cross build platforms
name = "any-cross",
match_any = [
":aarch64-linux-anylibc-cross",
":aarch64-linux-glibc-cross",
":x86_64-linux-musl-cross",
":x86_64-linux-glibc-cross",
],
visibility = ["//visibility:public"],
)
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@

- **HTTP Log**: fix internal error during validating the schema if http_endpoint contains
userinfo but headers is empty [#9574](https://github.com/Kong/kong/pull/9574)
- Update the batch queues module so that queues no longer grow without bounds if
their consumers fail to process the entries. Instead, old batches are now dropped
and an error is logged.
[#10247](https://github.com/Kong/kong/pull/10247)

##### CLI

Expand Down
2 changes: 0 additions & 2 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ GITHUB_TOKEN=token bazel build --config release //build:kong --verbose_failures

Supported build targets for binary packages:
- `:kong_deb`
- `:kong_el7`
- `:kong_el8`
- `:kong_aws2`
- `:kong_aws2023`
- `:kong_apk`

For example, to build the deb package:

Expand Down
7 changes: 5 additions & 2 deletions build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ configure_make(
configure_command = "configure",
configure_in_place = True,
configure_options = select({
"@kong//:aarch64-linux-anylibc-cross": [
"--host=aarch64-linux",
"@kong//:aarch64-linux-glibc-cross": [
"--host=aarch64-unknown-linux-gnu",
],
"@kong//:x86_64-linux-glibc-cross": [
"--host=x86_64-unknown-linux-gnu",
],
"@kong//:x86_64-linux-musl-cross": [
"--host=x86_64-linux-musl",
Expand Down
7 changes: 5 additions & 2 deletions build/cross_deps/libyaml/BUILD.libyaml.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ configure_make(
configure_command = "configure",
configure_in_place = True,
configure_options = select({
"@kong//:aarch64-linux-anylibc-cross": [
"--host=aarch64-linux",
"@kong//:aarch64-linux-glibc-cross": [
"--host=aarch64-unknown-linux-gnu",
],
"@kong//:x86_64-linux-glibc-cross": [
"--host=x86_64-unknown-linux-gnu",
],
"@kong//:x86_64-linux-musl-cross": [
"--host=x86_64-linux-musl",
Expand Down
2 changes: 1 addition & 1 deletion build/luarocks/luarocks_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def luarocks_repositories():
name = "luarocks",
build_file = "//build/luarocks:BUILD.luarocks.bazel",
strip_prefix = "luarocks-" + version,
sha256 = "bca6e4ecc02c203e070acdb5f586045d45c078896f6236eb46aa33ccd9b94edb",
sha256 = "56ab9b90f5acbc42eb7a94cf482e6c058a63e8a1effdf572b8b2a6323a06d923",
urls = [
"https://luarocks.org/releases/luarocks-" + version + ".tar.gz",
],
Expand Down
17 changes: 15 additions & 2 deletions build/openresty/BUILD.openresty.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ CONFIGURE_OPTIONS = [
"--add-module=$$EXT_BUILD_ROOT$$/external/lua-kong-nginx-module",
"--add-module=$$EXT_BUILD_ROOT$$/external/lua-kong-nginx-module/stream",
] + select({
"@kong//:aarch64-linux-anylibc-cross": [
"@kong//:aarch64-linux-glibc-cross": [
"--crossbuild=Linux:aarch64",
"--with-endian=little",
"--with-int=4",
Expand All @@ -165,6 +165,19 @@ CONFIGURE_OPTIONS = [
"--with-time-t=8",
"--with-sys-nerr=132",
],
"@kong//:x86_64-linux-glibc-cross": [
"--crossbuild=Linux:x86_64",
"--with-endian=little",
"--with-int=4",
"--with-long=8",
"--with-long-long=8",
"--with-ptr-size=8",
"--with-sig-atomic-t=4",
"--with-size-t=8",
"--with-off-t=8",
"--with-time-t=8",
"--with-sys-nerr=132",
],
"@kong//:x86_64-linux-musl-cross": [
"--crossbuild=Linux:x86_64",
"--with-endian=little",
Expand All @@ -188,7 +201,7 @@ CONFIGURE_OPTIONS = [
}) + select({
# any cross build that migrated to use libxcrypt needs those flags
# alpine uses different libc so doesn't need it
"@kong//:aarch64-linux-anylibc-cross": [
"@kong//:aarch64-linux-glibc-cross": [
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS$$/libxcrypt/include\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS$$/libxcrypt/lib\"",
],
Expand Down
16 changes: 12 additions & 4 deletions build/openresty/openssl/openssl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ load("@kong_bindings//:variables.bzl", "KONG_VAR")
# Read https://wiki.openssl.org/index.php/Compilation_and_Installation

CONFIGURE_OPTIONS = select({
"@kong//:aarch64-linux-anylibc-cross": [
"@kong//:aarch64-linux-glibc-cross": [
"linux-aarch64",
],
"@kong//:x86_64-linux-glibc-cross": [
"linux-x86_64",
],
# non-cross build
"@platforms//cpu:x86_64": [
"linux-x86_64",
],
"@platforms//cpu:aarch64": [
"linux-aarch64",
],
# no extra args needed for "@kong//:x86_64-linux-musl-cross" or non-cross builds
"//conditions:default": [],
}) + [
"-g",
"-O3", # force -O3 even we are using --debug (for example on CI)
Expand Down Expand Up @@ -47,7 +55,7 @@ def build_openssl(

configure_make(
name = name,
configure_command = "config",
configure_command = "Configure",
configure_in_place = True,
configure_options = CONFIGURE_OPTIONS + extra_configure_options,
env = select({
Expand Down
2 changes: 1 addition & 1 deletion build/openresty/openssl/openssl_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def openssl_repositories():
http_archive,
name = "openssl",
build_file = "//build/openresty/openssl:BUILD.bazel",
sha256 = "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8",
sha256 = "9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f",
strip_prefix = "openssl-" + version,
urls = [
"https://www.openssl.org/source/openssl-" + version + ".tar.gz",
Expand Down

This file was deleted.

Loading
Loading