From 8091c13eb27642c65303f9347dec6aea00fc6e8b Mon Sep 17 00:00:00 2001 From: Zhongwei Yao Date: Wed, 4 Oct 2023 11:20:00 -0700 Subject: [PATCH] fix(build): fix the building failure when applying patches When openresty patch applying order matters, some patch applying fails. Fix it by sorting. --- build/kong_bindings.bzl | 4 ++-- changelog/unreleased/kong/fix_patch_order.yml | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/kong/fix_patch_order.yml diff --git a/build/kong_bindings.bzl b/build/kong_bindings.bzl index fc85f5a91dde..006df8d98829 100644 --- a/build/kong_bindings.bzl +++ b/build/kong_bindings.bzl @@ -54,10 +54,10 @@ def _load_vars(ctx): # convert them into a list of labels relative to the workspace root # TODO: this may not change after a bazel clean if cache exists - patches = [ + patches = sorted([ '"@kong//:%s"' % str(p).replace(workspace_path, "").lstrip("/") for p in ctx.path(workspace_path + "/build/openresty/patches").readdir() - ] + ]) content += '"OPENRESTY_PATCHES": [%s],' % (", ".join(patches)) diff --git a/changelog/unreleased/kong/fix_patch_order.yml b/changelog/unreleased/kong/fix_patch_order.yml new file mode 100644 index 000000000000..00089c0d848d --- /dev/null +++ b/changelog/unreleased/kong/fix_patch_order.yml @@ -0,0 +1,7 @@ +message: fix the building failure when applying patches +type: bugfix +scope: Core +prs: + - 11696 +jiras: + - KAG-2712