This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new c57fba0e5e9 Fix registry explore page showing wrong provider counts
and empty Top Providers (#63961)
c57fba0e5e9 is described below
commit c57fba0e5e956688482e2cb6994887ea151e73c1
Author: Kaxil Naik <[email protected]>
AuthorDate: Fri Mar 20 04:50:59 2026 +0000
Fix registry explore page showing wrong provider counts and empty Top
Providers (#63961)
Two bugs on the /registry/explore/ page:
1. Category cards all showed "6+ providers" because
exploreCategoryProviders.js
capped matching at 6 providers per category. Removed the cap so the real
count
is displayed (the template already slices to 6 badges for display).
2. Top Providers and Incubating Providers sections were empty/showing 0
modules
because explore.njk read module_counts from providers.json (always
zeros).
Switched to moduleCountsByProvider which computes counts from
modules.json.
---
registry/src/_data/exploreCategoryProviders.js | 3 ---
registry/src/explore.njk | 6 +++---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/registry/src/_data/exploreCategoryProviders.js
b/registry/src/_data/exploreCategoryProviders.js
index 83abe85cfb8..8cd35ab915a 100644
--- a/registry/src/_data/exploreCategoryProviders.js
+++ b/registry/src/_data/exploreCategoryProviders.js
@@ -20,14 +20,11 @@
const providersData = require("./providers.json");
const exploreCategories = require("./exploreCategories");
-const MAX_PROVIDERS_PER_CATEGORY = 6;
-
module.exports = function () {
const map = {};
for (const category of exploreCategories) {
const matched = [];
for (const provider of providersData.providers) {
- if (matched.length >= MAX_PROVIDERS_PER_CATEGORY) break;
for (const keyword of category.keywords) {
if (
provider.id.includes(keyword) ||
diff --git a/registry/src/explore.njk b/registry/src/explore.njk
index 705887cf286..00f260c7b4c 100644
--- a/registry/src/explore.njk
+++ b/registry/src/explore.njk
@@ -24,7 +24,7 @@ mainClass: explore-page
</div>
<div>
<h2>{{ category.name }}</h2>
- <p class="provider-count">{{ categoryProviders.length }}+
providers</p>
+ <p class="provider-count">{{ categoryProviders.length }}
providers</p>
</div>
</div>
<p class="category-description">{{ category.description }}</p>
@@ -59,7 +59,7 @@ mainClass: explore-page
<div class="provider-list">
{% set topProviders = [] %}
{% for provider in providers.providers %}
- {% set counts = provider.module_counts or {} %}
+ {% set counts = moduleCountsByProvider[provider.id] or {} %}
{% set totalMods = (counts.operator or 0) + (counts.hook or 0) +
(counts.sensor or 0) + (counts.trigger or 0) + (counts.transfer or 0) %}
{% if totalMods > 0 %}
{% set topProviders = (topProviders.push({provider: provider,
total: totalMods}), topProviders) %}
@@ -99,7 +99,7 @@ mainClass: explore-page
{% for provider in providers.providers %}
{% set lc = provider.lifecycle or "production" %}
{% if lc === 'incubation' %}
- {% set counts = provider.module_counts or {} %}
+ {% set counts = moduleCountsByProvider[provider.id] or {} %}
{% set totalMods = (counts.operator or 0) + (counts.hook or 0) +
(counts.sensor or 0) + (counts.trigger or 0) + (counts.transfer or 0) %}
{% set incubatingProviders =
(incubatingProviders.push({provider: provider, total: totalMods}),
incubatingProviders) %}
{% endif %}