3scale / APIcast

3scale API Gateway
Apache License 2.0
304 stars 171 forks source link

lua-rover issue faced while enabling support for power(ppc64le) architecture #1462

Closed shubham-bhagwat0 closed 1 month ago

shubham-bhagwat0 commented 2 months ago

issue: openresty image is built from scratch for power, and the "make development" command is working fine, a runtime container is getting created, but inside the container, when we try to run "make dependencies" command, it gives the following error:

bash-4.4# make dependencies
make: *** No rule to make target '/usr/local/openresty/luajit/bin/rover', needed by 'lua_modules'.  Stop.

furthermore, we made the necessary changes required to build lua-rover in the Dockerfile (openresty) but it still eventually fails at the very same error

another issue faced is :

  1. we imported the custom openresty image by making changes in the "docker-compose-devel.yml" file
  2. later we realized there's another image which is required by the "docker-compose.prove.yml" file which has the name of _{IMAGENAME:-apicast-test} which is supposedly required to run the test cases
Version - v3.15.0
Steps To Reproduce
Current Result
3scale/APIcast$ sudo make development
Running on Linux
/usr/bin/docker compose -f docker-compose-devel.yml -f docker-compose-devel-volmount-default.yml up -d
WARN[0000] Found orphan containers ([apicast_build_0-echo-1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. 
[+] Running 2/0
 ✔ Container apicast_build_0-redis-1        Running                                                                                                                                                        0.0s 
 ✔ Container apicast_build_0-development-1  Running                                                                                                                                                        0.0s 
/usr/bin/docker compose -f docker-compose-devel.yml -f docker-compose-devel-volmount-default.yml exec -e COLUMNS="`tput cols`" -e LINES="`tput lines`" --user 0:0 development bash
bash-4.4# make busted
make: *** No rule to make target '/usr/local/openresty/luajit/bin/rover', needed by 'busted'.  Stop.
bash-4.4# make dependencies
make: *** No rule to make target '/usr/local/openresty/luajit/bin/rover', needed by 'lua_modules'.  Stop.
bash-4.4# 
Expected Result

https://app.circleci.com/pipelines/github/3scale/APIcast/3037/workflows/62ba9d0c-a94f-43b1-9699-c50780507dea/jobs/38400/parallel-runs/0/steps/0-106

Additional Information
tkan145 commented 2 months ago

Hi, it looks like you don't have rover installed in your image. What command did you use to build the runtime image?

For development image, you will need to run make dev-build IMAGE_NAME=quay.io/3scale/apicast-ci:openresty-X.Y.Z-{release_number}, then reference that image inside docker-compose-devel.yml

image: ${IMAGE:-quay.io/3scale/apicast-ci:openresty-1.19.3-23}

NOTE: you will need to modify Makefile to build for ppc64le. The default is linux/amd64

dev-build: ## Build development image
   $(DOCKER) build --platform linux/amd64 -t $(IMAGE_NAME) \
      --build-arg OPENRESTY_RPM_VERSION=$(OPENRESTY_RPM_VERSION) \
      --build-arg LUAROCKS_VERSION=$(LUAROCKS_VERSION) \
      $(PROJECT_PATH) -f $(DEVEL_DOCKERFILE)
shubham-bhagwat0 commented 2 months ago

hi, we tried to build it further and we are facing the jaegertracing issue

jaegertracing issue:

custom jaeger build leads to the following error :

460.9 Running tests...
460.9 Test project /tmp/jaeger-client-cpp/build
460.9     Start 1: UnitTest
463.0 1/2 Test #1: UnitTest .........................***Failed    2.04 sec
463.0     Start 2: DynamicallyLoadTracerTest
463.0 2/2 Test #2: DynamicallyLoadTracerTest ........   Passed    0.01 sec
463.0
463.0 50% tests passed, 1 tests failed out of 2
463.0
463.0 Total Test time (real) =   2.05 sec
463.0
463.0 The following tests FAILED:
463.0 Errors while running CTest
463.0 Output from these tests are in: /tmp/jaeger-client-cpp/build/Testing/Temporary/LastTest.log
463.0 Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
463.0     1 - UnitTest (Failed)
463.0 make: *** [Makefile:71: test] Error 8
------
Dockerfile.devel:39
--------------------
  38 |          gcc-c++ #jaegertracing-cpp-client-${JAEGERTRACING_CPP_CLIENT_RPM_VERSION}
  39 | >>> RUN git clone https://github.com/jaegertracing/jaeger-client-cpp.git \
  40 | >>> && cd jaeger-client-cpp \
  41 | >>> && mkdir build \
  42 | >>> && cd build \
  43 | >>> && cmake .. \
  44 | >>> && make \
  45 | >>> && make test \
  46 | >>> && make install
  47 |     RUN ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \
--------------------
ERROR: failed to solve: process "/bin/sh -c git clone https://github.com/jaegertracing/jaeger-client-cpp.git && cd jaeger-client-cpp && mkdir build && cd build && cmake .. && make && make test && make install" did not complete successfully: exit code: 2
make: *** [Makefile:76: dev-build] Error 1

alternatively:

tkan145 commented 2 months ago

Hi,

This test doesn't look like APIcast test suite so I can't comment on what's wrong with it. But if I had to guess, I think your jaeger-client-cpp is not built correctly, thus leading to failed DynamicallyLoadTracerTest

Regarding jaegertracing, it will depend on your use case, but you are right, we are gradually moving to opentelemetry and keeping support jaegertracing mainly for those who have not yet migrated to opentelemetry. However, we will eventually remove jaegertracing in a future release.

tkan145 commented 1 month ago

Closing due to inactivity. Feel free to reopen if you need more info