Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Remove unused shared dict #1456

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

tkan145
Copy link
Contributor

@tkan145 tkan145 commented Apr 8, 2024

Remove unused shared dict. May be help to save a few mb of memory

Verification steps

  • Create a apicast-config.json file with the following content
cat <<EOF >apicast-config.json
{
    "services": [
        {
            "id": "1",
            "backend_version": "1",
            "proxy": {
                "hosts": [
                    "one"
                ],
                "api_backend": "https://echo-api.3scale.net:443",
                "backend": {
                    "endpoint": "http://127.0.0.1:8081",
                    "host": "backend"
                },
                "policy_chain": [
                    {
                        "name": "apicast.policy.apicast"
                    }
                ],
                "proxy_rules": [
                    {
                        "http_method": "GET",
                        "pattern": "/",
                        "metric_system_name": "hits",
                        "delta": 1,
                        "parameters": [],
                        "querystring_parameters": {}
                    }
                ]
            }
        }
    ]
} 
EOF
  • Checkout this branch and start dev environment
make development
make dependencies
  • Run apicast locally
THREESCALE_DEPLOYMENT_ENV=staging APICAST_LOG_LEVEL=debug APICAST_WORKER=1 APICAST_CONFIGURATION_LOADER=lazy APICAST_CONFIGURATION_CACHE=0  THREESCALE_CONFIG_FILE=apicast-config.json ./bin/apicast
  • Capture apicast IP
APICAST_IP=$(docker inspect apicast_build_0-development-1 | yq e -P '.[0].NetworkSettings.Networks.apicast_build_0_default.IPAddress' -)
  • Send a request
curl -i -k -H "Host: one" "http://${APICAST_IP}:8080/test?user_key="
  • The response should be HTTP/1.1 200
HTTP/1.1 200 OK
Server: openresty
Date: Tue, 16 Apr 2024 06:56:54 GMT
Content-Type: application/json
Content-Length: 569
Connection: keep-alive
x-3scale-echo-api: echo-api/1.0.3
vary: Origin
x-content-type-options: nosniff
x-envoy-upstream-service-time: 0

@tkan145 tkan145 force-pushed the cleanup-unused-shared-dict branch from 557d864 to 7b39ce4 Compare April 8, 2024 02:00
@tkan145 tkan145 marked this pull request as ready for review April 16, 2024 06:48
@tkan145 tkan145 requested a review from a team as a code owner April 16, 2024 06:48
@tkan145 tkan145 merged commit bc2922c into 3scale:master Apr 17, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants