Kong / kong

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

Luarocks packaging borked for 2.8.1? #9282

Closed jeremyjpj0916 closed 2 years ago

jeremyjpj0916 commented 2 years ago

Is there an existing issue for this?

Kong version ($ kong version)

2.8.1

Current Behavior

Please review: https://github.com/luarocks/luarocks/issues/1431 , it contains the details of the issue I see.

Expected Behavior

Luarocks install process works like it always have before in our pipelines.

Steps To Reproduce

1. luarocks install kong 2.8.1

Anything else?

No response

bungle commented 2 years ago

I can reproduce it:

~ ❯  luarocks install kong 2.8.1
Installing https://luarocks.org/kong-2.8.1-0.src.rock

Error: Couldn't extract archive /private/var/folders/6p/w721tj_s2hv_1wjcdrqdw2rw0000gn/T/luarocks_kong-2.8.1-0-8986542/kong.git: unrecognized filename extension
bungle commented 2 years ago

@hanshuebner do you have any idea?

bungle commented 2 years ago

2.8.0 works a bit better, needed to pass OPENSSL_DIR (didn't pick them up from exported env), it has:

url = "git://github.com/Kong/kong",

The 2.8.1 has:

url = "https://github.com/Kong/kong.git"
bungle commented 2 years ago

It looks like changing the url to:

url = "https://github.com/Kong/kong"

Fixes the issue, at least with:

luarocks make kong-2.8.1-0.rockspec OPENSSL_DIR=/opt/homebrew/opt/openssl@1.1

I still got weird:

Error: Build error: Failed installing kong/plugins/proxy-cache/handler.lua in
/Users/bungle/.luaver/luarocks/3.9.1_5.1/lib/luarocks/rocks-5.1/kong/2.8.1-0/lua/kong/plugins/proxy-cache/handler.lua:
kong/plugins/proxy-cache/handler.lua: No such file or directory

And that is because the .rock is itself broken: https://luarocks.org/manifests/kong/kong-2.8.1-0.src.rock

bungle commented 2 years ago

Yes if you download https://luarocks.org/manifests/kong/kong-2.8.1-0.src.rock, rename it to .zip, it only contains:

So building a rock went wrong (needs a re-release for sure).

jeremyjpj0916 commented 2 years ago

Just for cross reference for internal purposes I did tie a Kong case ticket to this in the Ent. Support portal as well: Case #00029768

Surprised the CICD integrity did not pick up on a luarocks make style failure. Maybe various valid package manager install tests as part of Kongs QA automated signoff would be good for cases like this.

Sounds like you drove down into close to where the problem may live though. Last series luarocks made out fine for me was Kong 2.7.1 as part of our pipelines.

bungle commented 2 years ago

@jeremyjpj0916 yes, we need to check out what went wrong. I think the url can basically be anything as long as .rock is correct, but now it seems like .rock is not correct.

bungle commented 2 years ago

@jeremyjpj0916 this should be fixed now. Please reopen if you see any further issues with it.

jeremyjpj0916 commented 2 years ago

@bungle I do see the revis in luarocks UI now "2.8.1-02 hours ago(revision: 2)263 downloads" , going to give it a go now!

jeremyjpj0916 commented 2 years ago

Worked fine now. Thx!