Closed eguzki closed 1 year ago
Support for Ruby 3.0.X
Implements THREESCALE-8989
CVEs Addressed:
Only first level dependencies updated shown here. Excluding testing deps also.
Manual testing
Build local image
docker build -t apisonator:runtime -f openshift/distro/ubi/8/Dockerfile .
Run Redis
❯ docker run --net=host -ti --rm registry.redhat.io/rhscl/redis-5-rhel7:5 redis-server
Run Listener
❯ docker run -it --rm --net=host --env CONFIG_REDIS_PROXY=127.0.0.1:6379 --env CONFIG_QUEUES_MASTER_NAME=127.0.0.1:6379/1 --env RACK_ENV=production --env CONFIG_INTERNAL_API_USER=internal_api_user --env CONFIG_INTERNAL_API_PASSWORD=internal_api_password --env PUMA_WORKERS=0 apisonator:runtime 3scale_backend start -e production -p 3000 -x /dev/stdout
Run worker
❯ docker run -ti --rm --net=host --env CONFIG_REDIS_PROXY=127.0.0.1:6379/0 --env CONFIG_QUEUES_MASTER_NAME=127.0.0.1:6379/1 --env RACK_ENV=production --env CONFIG_WORKERS_LOGGER_FORMATTER=json apisonator:runtime bin/3scale_backend_worker run
Populate some (fake) data
❯ docker run -it --rm --net=host quay.io/3scale/perftest-toolkit:buddhi-v1.1.0 -I http://127.0.0.1:3000 -B http://127.0.0.1:3000 -U internal_api_user -P internal_api_password -E http://echo-api.3scale.net -T onprem -A http://benchmark.3sca.net
Get available URLS
❯ curl http://127.0.0.1:8089/paths/backend?lines=10 /transactions/authrep.xml?provider_key=29f5c9c6-b17b-4245-a12d-7eb52705ad8f&service_id=b92c4556-16c3-48a9-85c3-236060e13a56&app_id=8c0211817bddd50b&app_key=a3d8fe2a4e61d521&usage%5Ba5aa2153-6306-4053-b63f-26f1af4ec754%5D=1 /transactions/authrep.xml?provider_key=29f5c9c6-b17b-4245-a12d-7eb52705ad8f&service_id=b92c4556-16c3-48a9-85c3-236060e13a56&app_id=4a7011e7a47b8056&app_key=e33689d92c5034f6&usage%5Ba5aa2153-6306-4053-b63f-26f1af4ec754%5D=1 /transactions/authrep.xml?provider_key=29f5c9c6-b17b-4245-a12d-7eb52705ad8f&service_id=ad91cd17-6a24-476c-9435-3d14127d0787&app_id=daf8637eeaa14af6&app_key=ed1268d868e50474 /transactions/authrep.xml?provider_key=29f5c9c6-b17b-4245-a12d-7eb52705ad8f&service_id=b92c4556-16c3-48a9-85c3-236060e13a56&app_id=083f6d4caf710cb7&app_key=fff6b51cf57d4dc3
Test few of the URLS, all of them should return 200 OK
200 OK
❯ curl -v "http://127.0.0.1:3000/transactions/authrep.xml?provider_key=29f5c9c6-b17b-4245-a12d-7eb52705ad8f&service_id=b92c4556-16c3-48a9-85c3-236060e13a56&app_id=8c0211817bddd50b&app_key=a3d8fe2a4e61d521&usage%5Ba5aa2153-6306-4053-b63f-26f1af4ec754%5D=1"
Trying 127.0.0.1:3000...
Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0)
GET /transactions/authrep.xml?provider_key=29f5c9c6-b17b-4245-a12d-7eb52705ad8f&service_id=b92c4556-16c3-48a9-85c3-236060e13a56&app_id=8c0211817bddd50b&app_key=a3d8fe2a4e61d521&usage%5Ba5aa2153-6306-4053-b63f-26f1af4ec754%5D=1 HTTP/1.1 Host: 127.0.0.1:3000 User-Agent: curl/7.81.0 Accept: /
Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Content-Type: application/vnd.3scale-v2.0+xml < Access-Control-Allow-Origin: < Access-Control-Expose-Headers: ETag, Link, 3scale-rejection-reason < X-Content-Type-Options: nosniff < Content-Length: 2224 < <?xml version="1.0" encoding="UTF-8"?>true83e35191-e62e-439d-bb8f-dc98ca9470182023-04-19 00:00:00 +00002023-04-20 00:00:00 +0000100000000002023-04-19 09:00:00 +00002023-04-19 10:00:00 +0000100000000002023-04-19 00:00:00 +00002023-04-20 00:00:00 +0000100000000012023-04-19 09:00:00 +00002023-04-19 10:00:00 +0000100000000012023-04-19 00:00:00 +00002023-04-20 00:00:00 +0000100000000012023-04-19 09:00:00 +00002023-04-19 10:00:00 +0000100000000012023-04-19 00:00:00 +00002023-04-20 00:00:00 +0000100000000002023-04-19 09:00:00 Connection #0 to host 127.0.0.1 left intact +00002023-04-19 10:00:00 +000010000000000
The worker should report
{"severity":"INFO","pid":1,"time":"2023-04-19 09:13:47 UTC","job_class":"ReportJob","runtime":0.00495,"run_plus_queued_time":0.00623,"memoizer_size":8,"memoizer_count":8,"memoizer_hits":0}
The listener should report
127.0.0.1 - - [19/Apr/2023 09:13:47 UTC] "GET /transactions/authrep.xml?provider_key=29f5c9c6-b17b-4245-a12d-7eb52705ad8f&service_id=b92c4556-16c3-48a9-85c3-236060e13a56&app_id=8c0211817bddd50b&app_key=a3d8fe2a4e61d521&usage%5Ba5aa2153-6306-4053-b63f-26f1af4ec754%5D=1 HTTP/1.1" 200 2224 0.007327759 0 0 0 618 664 16 - -
@gsaslis heads up on ruby 3 for apisonator coming
What
Support for Ruby 3.0.X
Implements THREESCALE-8989
CVEs Addressed:
Dependency Updates
Only first level dependencies updated shown here. Excluding testing deps also.
Verification steps
Manual testing
Build local image
Run Redis
Run Listener
Run worker
Populate some (fake) data
Get available URLS
Test few of the URLS, all of them should return
200 OK
Trying 127.0.0.1:3000...
Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0)
Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Content-Type: application/vnd.3scale-v2.0+xml < Access-Control-Allow-Origin: < Access-Control-Expose-Headers: ETag, Link, 3scale-rejection-reason < X-Content-Type-Options: nosniff < Content-Length: 2224 < <?xml version="1.0" encoding="UTF-8"?>true 83e35191-e62e-439d-bb8f-dc98ca947018 2023-04-19 00:00:00 +0000 2023-04-20 00:00:00 +0000 1000000000 0 2023-04-19 09:00:00 +0000 2023-04-19 10:00:00 +0000 1000000000 0 2023-04-19 00:00:00 +0000 2023-04-20 00:00:00 +0000 1000000000 1 2023-04-19 09:00:00 +0000 2023-04-19 10:00:00 +0000 1000000000 1 2023-04-19 00:00:00 +0000 2023-04-20 00:00:00 +0000 1000000000 1 2023-04-19 09:00:00 +0000 2023-04-19 10:00:00 +0000 1000000000 1 2023-04-19 00:00:00 +0000 2023-04-20 00:00:00 +0000 1000000000 0 2023-04-19 09:00:00 Connection #0 to host 127.0.0.1 left intact
+00002023-04-19 10:00:00 +0000 1000000000 0
The worker should report
The listener should report