Skip to content

Comments

fix(caching): removed irrelevant nginx check on global rate limit after phase 4#379

Merged
TeKrop merged 1 commit intomainfrom
bugfix/remove-global-rate-limit-check-on-nginx
Feb 22, 2026
Merged

fix(caching): removed irrelevant nginx check on global rate limit after phase 4#379
TeKrop merged 1 commit intomainfrom
bugfix/remove-global-rate-limit-check-on-nginx

Conversation

@TeKrop
Copy link
Owner

@TeKrop TeKrop commented Feb 22, 2026

Summary by Sourcery

Enhancements:

  • Clean up unused Blizzard rate limiting environment variables and template substitutions in the Nginx entrypoint script.

@TeKrop TeKrop self-assigned this Feb 22, 2026
@TeKrop TeKrop added the bug Something isn't working label Feb 22, 2026
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 22, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes now-unused Blizzard global rate limit environment variables and their substitution into the Valkey Lua handler template, simplifying the Nginx entrypoint configuration for caching and rate limiting.

Flow diagram for updated Nginx entrypoint configuration and Valkey Lua handler generation

flowchart TD
    subgraph Environment
        env_VALKEY_HOST["VALKEY_HOST"]
        env_VALKEY_PORT["VALKEY_PORT"]
        env_CACHE_TTL_HEADER["CACHE_TTL_HEADER"]
        env_RETRY_AFTER_HEADER["RETRY_AFTER_HEADER"]
        env_UNKNOWN_PLAYER_COOLDOWN_KEY_PREFIX["UNKNOWN_PLAYER_COOLDOWN_KEY_PREFIX"]
        env_UNKNOWN_PLAYERS_CACHE_ENABLED["UNKNOWN_PLAYERS_CACHE_ENABLED"]
    end

    entrypoint["entrypoint.sh"]
    nginx_template["default.conf.template"]
    lua_template["valkey_handler.lua.template"]

    nginx_conf["default.conf"]
    lua_handler["valkey_handler.lua"]

    env_to_nginx["envsubst for Nginx config"]
    env_to_lua["envsubst for Valkey Lua handler"]

    Environment --> entrypoint

    entrypoint --> env_to_nginx
    entrypoint --> env_to_lua

    env_to_nginx --> nginx_template
    env_to_nginx --> nginx_conf

    env_to_lua --> lua_template
    env_to_lua --> lua_handler

    env_VALKEY_HOST --> env_to_lua
    env_VALKEY_PORT --> env_to_lua
    env_CACHE_TTL_HEADER --> env_to_lua
    env_RETRY_AFTER_HEADER --> env_to_lua
    env_UNKNOWN_PLAYER_COOLDOWN_KEY_PREFIX --> env_to_lua
    env_UNKNOWN_PLAYERS_CACHE_ENABLED --> env_to_lua
Loading

File-Level Changes

Change Details Files
Remove unused Blizzard global rate limit environment variables from Nginx entrypoint and Valkey Lua template substitution.
  • Drop default variable initialization for BLIZZARD_RATE_LIMIT_KEY and BLIZZARD_RATE_LIMIT_RETRY_AFTER in the Nginx entrypoint script
  • Remove BLIZZARD_RATE_LIMIT_KEY and BLIZZARD_RATE_LIMIT_RETRY_AFTER from the envsubst variable list used to generate valkey_handler.lua from its template
  • Rely on remaining rate limiting and retry-after configuration (RETRY_AFTER_HEADER and unknown-player cache settings) for the Valkey handler template generation
build/nginx/entrypoint.sh
build/nginx/lua/valkey_handler.lua.template

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sonarqubecloud
Copy link

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Since BLIZZARD_RATE_LIMIT_KEY and BLIZZARD_RATE_LIMIT_RETRY_AFTER were removed from env defaults and envsubst, double-check that valkey_handler.lua.template and any other templates no longer reference these placeholders so we don’t end up with literal ${...} strings at runtime.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since `BLIZZARD_RATE_LIMIT_KEY` and `BLIZZARD_RATE_LIMIT_RETRY_AFTER` were removed from env defaults and `envsubst`, double-check that `valkey_handler.lua.template` and any other templates no longer reference these placeholders so we don’t end up with literal `${...}` strings at runtime.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@TeKrop TeKrop merged commit 0f07a38 into main Feb 22, 2026
5 checks passed
@TeKrop TeKrop deleted the bugfix/remove-global-rate-limit-check-on-nginx branch February 22, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant