Skip to content

Bug 2091196 - fetch_product_versions is not cached for the request: buglist.cgi makes 42 memcached lookups, and a new HTTP request on every call when the product-details endpoint fails - #2823

Merged
dklawren merged 3 commits into
mozilla:masterfrom
dklawren:2091196
Nov 10, 2026

Conversation

@dklawren

Copy link
Copy Markdown
Collaborator

No description provided.

…uglist.cgi makes 42 memcached lookups, and a new HTTP request on every call when the product-details endpoint fails

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The empty import list suppresses MockLocalconfig::import, leaving LOCALCONFIG_ENV unset and causing the test to fail before its first assertion in checkouts without site configuration or an externally set environment variable.

1 open issue
What changed in this PR

This PR reduces repeated cache and HTTP lookups when rendering Bugzilla pages by reusing product-version results and field metadata within each request.

Changes:

  • Cache product-version results per request, including failures and memcached hits.
  • Reuse request-cached fields when checking field visibility.
  • Add tests for successful fetches, failures, separate products, and missing endpoint configuration.
File Description
t/​util-fetch-product-versions.t Adds regression tests for request-level product-version caching.
extensions/​BMO/​Extension.pm Prefers cached field metadata over repeated memcached lookups.
Bugzilla/​Util.pm Retains product-version results, including failures, for the current request.

Review effort: Balanced

Comment thread t/util-fetch-product-versions.t Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@dklawren
dklawren requested review from Xzzz and cgsheeh November 10, 2026 02:48
@dklawren
dklawren merged commit d6905fa into mozilla:master Nov 10, 2026
13 of 14 checks passed
@dklawren
dklawren deleted the 2091196 branch November 10, 2026 23:13
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.

3 participants