Skip to content

Commit

Permalink
fix(build): fix the building failure when applying patches (#11696)
Browse files Browse the repository at this point in the history
When openresty patch applying order matters, some patch applying
fails. Fix it by sorting.
  • Loading branch information
zhongweiy authored Oct 5, 2023
1 parent 32872bf commit e373295
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/kong_bindings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
7 changes: 7 additions & 0 deletions changelog/unreleased/kong/fix_patch_order.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
message: fix the building failure when applying patches
type: bugfix
scope: Core
prs:
- 11696
jiras:
- KAG-2712

1 comment on commit e373295

@khcp-gha-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:e373295618b951c0481f9de11b170b8d4dce85f3
Artifacts available https://github.com/Kong/kong/actions/runs/6420769821

Please sign in to comment.