fixing kong build #2271

Merged
mfreeman451 merged 1 commit from refs/pull/2271/head into main 2025-10-04 22:06:13 +00:00
mfreeman451 commented 2025-10-04 22:00:04 +00:00 (Migrated from github.com)
Owner

Imported from GitHub pull request.

Original GitHub pull request: #1697
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1697
Original created: 2025-10-04T22:00:04Z
Original updated: 2025-10-04T22:06:20Z
Original head: carverauto/serviceradar:chore/fix_kong_builds
Original base: main
Original merged: 2025-10-04T22:06:13Z by @mfreeman451

PR Type

Enhancement


Description

  • Add automated Kong OSS package build script

  • Integrate Kong vendor artifact building into CI release workflow

  • Update documentation with new build process and versioned filenames


Diagram Walkthrough

flowchart LR
  A["build-kong-vendor.sh"] --> B["Clone Kong repo"]
  B --> C["Bootstrap Bazelisk"]
  C --> D["Build Kong packages"]
  D --> E["Stage artifacts to vendor/"]
  F["GitHub Actions"] --> A
  E --> G["Release workflow"]

File Walkthrough

Relevant files
Enhancement
build-kong-vendor.sh
Add Kong OSS package build automation script                         

scripts/build-kong-vendor.sh

  • New comprehensive build script for Kong OSS packages
  • Handles git cloning, Bazel setup, and artifact staging
  • Supports configurable Kong commit, remote, and build flags
  • Maps build outputs to versioned filenames
+167/-0 
release.yml
Integrate Kong build into release workflow                             

.github/workflows/release.yml

  • Add Kong vendor artifact build step to release workflow
  • Executes before package publishing step
+3/-0     
Documentation
README.md
Update Kong packaging documentation                                           

packaging/kong/README.md

  • Update artifact naming convention to include versions
  • Add automated build instructions using new script
  • Provide manual build fallback and upgrade guidance
+23/-6   

Imported from GitHub pull request. Original GitHub pull request: #1697 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/1697 Original created: 2025-10-04T22:00:04Z Original updated: 2025-10-04T22:06:20Z Original head: carverauto/serviceradar:chore/fix_kong_builds Original base: main Original merged: 2025-10-04T22:06:13Z by @mfreeman451 --- ### **PR Type** Enhancement ___ ### **Description** - Add automated Kong OSS package build script - Integrate Kong vendor artifact building into CI release workflow - Update documentation with new build process and versioned filenames ___ ### Diagram Walkthrough ```mermaid flowchart LR A["build-kong-vendor.sh"] --> B["Clone Kong repo"] B --> C["Bootstrap Bazelisk"] C --> D["Build Kong packages"] D --> E["Stage artifacts to vendor/"] F["GitHub Actions"] --> A E --> G["Release workflow"] ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>build-kong-vendor.sh</strong><dd><code>Add Kong OSS package build automation script</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> scripts/build-kong-vendor.sh <ul><li>New comprehensive build script for Kong OSS packages<br> <li> Handles git cloning, Bazel setup, and artifact staging<br> <li> Supports configurable Kong commit, remote, and build flags<br> <li> Maps build outputs to versioned filenames</ul> </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/1697/files#diff-60c9831d4f024788268c9fa56e16e212061b7b55939899f04579d8445036df24">+167/-0</a>&nbsp; </td> </tr> <tr> <td> <details> <summary><strong>release.yml</strong><dd><code>Integrate Kong build into release workflow</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> .github/workflows/release.yml <ul><li>Add Kong vendor artifact build step to release workflow<br> <li> Executes before package publishing step</ul> </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/1697/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34">+3/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>README.md</strong><dd><code>Update Kong packaging documentation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> packaging/kong/README.md <ul><li>Update artifact naming convention to include versions<br> <li> Add automated build instructions using new script<br> <li> Provide manual build fallback and upgrade guidance</ul> </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/1697/files#diff-0371346dc2a772957ae98006d92841ad86b86df489bcb6951b15f698f5c65192">+23/-6</a>&nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> </details> ___
qodo-code-review[bot] commented 2025-10-04 22:00:23 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR comment.

Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1697#issuecomment-3368564226
Original created: 2025-10-04T22:00:23Z

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
- Requires Further Human Verification
🏷️ - Compliance label
Imported GitHub PR comment. Original author: @qodo-code-review[bot] Original URL: https://github.com/carverauto/serviceradar/pull/1697#issuecomment-3368564226 Original created: 2025-10-04T22:00:23Z --- ## PR Compliance Guide 🔍 <!-- https://github.com/carverauto/serviceradar/commit/c6d987c4b378ca435dd930d6f883e88c1869977f --> Below is a summary of compliance checks for this PR:<br> <table><tbody><tr><td colspan='2'><strong>Security Compliance</strong></td></tr> <tr><td>🟢</td><td><details><summary><strong>No security concerns identified</strong></summary> No security vulnerabilities detected by AI analysis. Human verification advised for critical code. </details></td></tr> <tr><td colspan='2'><strong>Ticket Compliance</strong></td></tr> <tr><td>⚪</td><td><details><summary>🎫 <strong>No ticket provided </summary></strong> - [ ] Create ticket/issue <!-- /create_ticket --create_ticket=true --> </details></td></tr> <tr><td colspan='2'><strong>Codebase Duplication Compliance</strong></td></tr> <tr><td>⚪</td><td><details><summary><strong>Codebase context is not defined </strong></summary> Follow the <a href='https://qodo-merge-docs.qodo.ai/core-abilities/rag_context_enrichment/'>guide</a> to enable codebase context checks. </details></td></tr> <tr><td colspan='2'><strong>Custom Compliance</strong></td></tr> <tr><td>⚪</td><td><details><summary><strong>No custom compliance provided</strong></summary> Follow the <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/'>guide</a> to enable custom compliance check. </details></td></tr> <tr><td align="center" colspan="2"> <!-- placeholder --> <!-- /compliance --update_compliance=true --> </td></tr></tbody></table> <details><summary>Compliance status legend</summary> 🟢 - Fully Compliant<br> 🟡 - Partial Compliant<br> 🔴 - Not Compliant<br> ⚪ - Requires Further Human Verification<br> 🏷️ - Compliance label<br> </details>
qodo-code-review[bot] commented 2025-10-04 22:01:12 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR comment.

Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1697#issuecomment-3368564605
Original created: 2025-10-04T22:01:12Z

PR Code Suggestions

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Safely parse extra build flags

To safely parse KONG_EXTRA_BAZEL_FLAGS, replace the unsafe word-splitting
assignment with read -r -a. This prevents misinterpretation of flags containing
spaces or special characters.

scripts/build-kong-vendor.sh [147-151]

 if [[ -n "${KONG_EXTRA_BAZEL_FLAGS:-}" ]]; then
-  # shellcheck disable=SC2206
-  EXTRA_FLAGS=( ${KONG_EXTRA_BAZEL_FLAGS} )
+  local -a EXTRA_FLAGS
+  read -r -a EXTRA_FLAGS <<< "${KONG_EXTRA_BAZEL_FLAGS}"
   COMMON_FLAGS+=("${EXTRA_FLAGS[@]}")
 fi
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that unquoted expansion is unsafe for parsing flags and proposes a more robust method using read, which prevents issues with word splitting and globbing.

Medium
  • More
Imported GitHub PR comment. Original author: @qodo-code-review[bot] Original URL: https://github.com/carverauto/serviceradar/pull/1697#issuecomment-3368564605 Original created: 2025-10-04T22:01:12Z --- ## PR Code Suggestions ✨ <!-- c6d987c --> Explore these optional code suggestions: <table><thead><tr><td><strong>Category</strong></td><td align=left><strong>Suggestion&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </strong></td><td align=center><strong>Impact</strong></td></tr><tbody><tr><td rowspan=1>Possible issue</td> <td> <details><summary>Safely parse extra build flags</summary> ___ **To safely parse <code>KONG_EXTRA_BAZEL_FLAGS</code>, replace the unsafe word-splitting <br>assignment with <code>read -r -a</code>. This prevents misinterpretation of flags containing <br>spaces or special characters.** [scripts/build-kong-vendor.sh [147-151]](https://github.com/carverauto/serviceradar/pull/1697/files#diff-60c9831d4f024788268c9fa56e16e212061b7b55939899f04579d8445036df24R147-R151) ```diff if [[ -n "${KONG_EXTRA_BAZEL_FLAGS:-}" ]]; then - # shellcheck disable=SC2206 - EXTRA_FLAGS=( ${KONG_EXTRA_BAZEL_FLAGS} ) + local -a EXTRA_FLAGS + read -r -a EXTRA_FLAGS <<< "${KONG_EXTRA_BAZEL_FLAGS}" COMMON_FLAGS+=("${EXTRA_FLAGS[@]}") fi ``` - [ ] **Apply / Chat** <!-- /improve --apply_suggestion=0 --> <details><summary>Suggestion importance[1-10]: 7</summary> __ Why: The suggestion correctly identifies that unquoted expansion is unsafe for parsing flags and proposes a more robust method using `read`, which prevents issues with word splitting and globbing. </details></details></td><td align=center>Medium </td></tr> <tr><td align="center" colspan="2"> - [ ] More <!-- /improve --more_suggestions=true --> </td><td></td></tr></tbody></table>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar!2271
No description provided.