Kong / kong

🦍 The Cloud-Native API Gateway and AI Gateway.
https://konghq.com/install/#kong-community
Apache License 2.0
38.87k stars 4.78k forks source link

Building kong deb package failed behind proxy for version3.5.0 and above #13515

Open shusriva opened 1 month ago

shusriva commented 1 month ago

Is there an existing issue for this?

Kong version ($ kong version)

kong 3.5.0 >=

Current Behavior

When building kong(3.5.0 or above) debian package behind proxy, build failed with the error image

While building kong (3.4.2) debian package behind proxy. build is successful image

Expected Behavior

All the version of kong debian package should be build successfully behind the proxy.

Steps To Reproduce

No response

Anything else?

Without proxy, all the version of kong is getting build successfully

chobits commented 4 weeks ago

hi, could you try this command to verify whether the file could be downloaded as the error log mentioned.

$ curl https://luafr.org/luarocks/manifest-5.1

You could also try accessing other manifiest mirror links provided by the error.log

The error logs indicated that the bazel building system attempted to download these necessary files, but it failed finally.

image
Water-Melon commented 4 weeks ago

Hi @shusriva, thanks for your report. Could you provide us with the commands you executed and details about your system environment where the issue occurred? I just tried running make package/deb on Linux, and everything worked fine.

shusriva commented 3 weeks ago

Hi @Water-Melon , I am using this command bazel build --config release //build:kong --verbose_failures --action_env=http_proxy=${CODE_PROXY} --action_env=https_proxy=${CODE_PROXY}

This command works fine till version 3.4.2 but the same command failed if I tried to build version 3.5.0. Attached the log log.txt

Water-Melon commented 3 weeks ago

Sorry for the late reply. Could you provide more information about your development environment? Or which operating system and distribution can reproduce this issue? I just ran the commands you provided on Kong version 3.5.0 on Ubuntu 22.04, and it worked fine.

shusriva commented 3 weeks ago

@Water-Melon I am using bookworm debian 12 to build the kong debian package. when I pull this image locally and install all the build tools inside the container and try to build the kong debian package. it works fine. But when I try to build the kong debian package in the gitlab ci pipeline it fails. Strange part is same proxy, same dev environment works fine till version 3.4.2 but not above that.

Water-Melon commented 2 weeks ago

I also tried it in a Bookworm Debian 12 container, and couldn't reproduce the issue. Have you compared the $CODE_PROXY values between the two environments? Is http_proxy enabled? The error seems to occur when running ./src/bin/luarocks install "luarocks 3.9.2", failing during download and check manifest. It looks like a network issue.