1
0
mirror of https://github.com/google/nomulus synced 2025-12-23 14:25:44 +00:00

Remove WHOIS references from activity reporting (#2865)

This also changes a screenshot test filename since there wasn't a great
other place to put that change
This commit is contained in:
gbrodman
2025-10-29 12:42:16 -04:00
committed by GitHub
parent b357fc79f7
commit 0c74883428
8 changed files with 27 additions and 47 deletions

View File

@@ -36,7 +36,7 @@ public final class ActivityReportingQueryBuilder implements QueryBuilder {
static final String DNS_COUNTS = "dns_counts";
static final String MONTHLY_LOGS = "monthly_logs";
static final String EPP_METRICS = "epp_metrics";
static final String WHOIS_COUNTS = "whois_counts";
static final String RDAP_COUNTS = "rdap_counts";
static final String ACTIVITY_REPORT_AGGREGATION = "activity_report_aggregation";
private final String projectId;
@@ -98,13 +98,13 @@ public final class ActivityReportingQueryBuilder implements QueryBuilder {
.build();
queriesBuilder.put(getTableName(EPP_METRICS, yearMonth), eppQuery);
String whoisQuery =
SqlTemplate.create(getQueryFromFile(WHOIS_COUNTS + ".sql"))
String rdapQuery =
SqlTemplate.create(getQueryFromFile(RDAP_COUNTS + ".sql"))
.put("PROJECT_ID", projectId)
.put("ICANN_REPORTING_DATA_SET", icannReportingDataSet)
.put("MONTHLY_LOGS_TABLE", getTableName(MONTHLY_LOGS, yearMonth))
.build();
queriesBuilder.put(getTableName(WHOIS_COUNTS, yearMonth), whoisQuery);
queriesBuilder.put(getTableName(RDAP_COUNTS, yearMonth), rdapQuery);
SqlTemplate aggregateQuery =
SqlTemplate.create(getQueryFromFile(ACTIVITY_REPORT_AGGREGATION + ".sql"))
@@ -115,7 +115,7 @@ public final class ActivityReportingQueryBuilder implements QueryBuilder {
.put("ICANN_REPORTING_DATA_SET", icannReportingDataSet)
.put("DNS_COUNTS_TABLE", getTableName(DNS_COUNTS, yearMonth))
.put("EPP_METRICS_TABLE", getTableName(EPP_METRICS, yearMonth))
.put("WHOIS_COUNTS_TABLE", getTableName(WHOIS_COUNTS, yearMonth));
.put("RDAP_COUNTS_TABLE", getTableName(RDAP_COUNTS, yearMonth));
queriesBuilder.put(
getTableName(ACTIVITY_REPORT_AGGREGATION, yearMonth), aggregateQuery.build());

View File

@@ -21,9 +21,9 @@ SELECT
SUM(IF(metricName = 'operational-registrars', count, 0)) AS operational_registrars,
-- We use the Centralized Zone Data Service.
"CZDS" AS zfa_passwords,
SUM(IF(metricName = 'whois-43-queries', count, 0)) AS whois_43_queries,
SUM(IF(metricName = 'web-whois-queries', count, 0)) AS web_whois_queries,
-- We don't support searchable WHOIS.
-- We don't support WHOIS queries any more.
0 AS whois_43_queries,
0 AS web_whois_queries,
0 AS searchable_whois_queries,
-- DNS queries for UDP/TCP are all assumed to be received/responded.
SUM(IF(metricName = 'dns-udp-queries', count, 0)) AS dns_udp_queries_received,
@@ -96,7 +96,7 @@ CROSS JOIN(
`%PROJECT_ID%.%ICANN_REPORTING_DATA_SET%.%EPP_METRICS_TABLE%`
UNION ALL
SELECT * FROM
`%PROJECT_ID%.%ICANN_REPORTING_DATA_SET%.%WHOIS_COUNTS_TABLE%`
`%PROJECT_ID%.%ICANN_REPORTING_DATA_SET%.%RDAP_COUNTS_TABLE%`
-- END INTERMEDIARY DATA SOURCES --
)) AS TldMetrics
WHERE RealTlds.tld = TldMetrics.tld OR TldMetrics.tld IS NULL

View File

@@ -13,22 +13,12 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- Query for WHOIS metrics.
-- This searches the monthly appengine logs for Whois requests, and
-- counts the number of hits via both endpoints (port 43 and the web).
-- Query for RDAP metrics.
-- This searches the monthly GKE logs for RDAP requests and counts the number of hits
SELECT
STRING(NULL) AS tld,
CASE
WHEN requestPath = '/_dr/whois' THEN 'whois-43-queries'
WHEN SUBSTR(requestPath, 0, 7) = '/whois/' THEN 'web-whois-queries'
WHEN SUBSTR(requestPath, 0, 6) = '/rdap/' THEN 'rdap-queries'
END AS metricName,
COUNT(requestPath) AS count
FROM
`%PROJECT_ID%.%ICANN_REPORTING_DATA_SET%.%MONTHLY_LOGS_TABLE%`
GROUP BY
metricName
HAVING
metricName IS NOT NULL
'rdap-queries' AS metricName,
count(*)
FROM `%PROJECT_ID%.%ICANN_REPORTING_DATA_SET%.%MONTHLY_LOGS_TABLE%`
WHERE SUBSTR(requestPath, 0, 6) = '/rdap/'

View File

@@ -50,7 +50,7 @@ class ActivityReportingQueryBuilderTest {
ActivityReportingQueryBuilder.MONTHLY_LOGS,
ActivityReportingQueryBuilder.DNS_COUNTS,
ActivityReportingQueryBuilder.EPP_METRICS,
ActivityReportingQueryBuilder.WHOIS_COUNTS,
ActivityReportingQueryBuilder.RDAP_COUNTS,
ActivityReportingQueryBuilder.ACTIVITY_REPORT_AGGREGATION);
ActivityReportingQueryBuilder queryBuilder = createQueryBuilder("cloud_sql_icann_reporting");

View File

@@ -120,7 +120,7 @@ public class ConsoleScreenshotTest {
driver.diffPage("registrarSelected_contacts");
driver.findElement(By.cssSelector("a[routerLink=\"rdap\"]")).click();
Thread.sleep(500);
driver.diffPage("registrarSelected_whois");
driver.diffPage("registrarSelected_rdap");
driver.findElement(By.cssSelector("a[routerLink=\"security\"]")).click();
Thread.sleep(500);
driver.diffPage("registrarSelected_security");

View File

@@ -21,9 +21,9 @@ SELECT
SUM(IF(metricName = 'operational-registrars', count, 0)) AS operational_registrars,
-- We use the Centralized Zone Data Service.
"CZDS" AS zfa_passwords,
SUM(IF(metricName = 'whois-43-queries', count, 0)) AS whois_43_queries,
SUM(IF(metricName = 'web-whois-queries', count, 0)) AS web_whois_queries,
-- We don't support searchable WHOIS.
-- We don't support WHOIS queries any more.
0 AS whois_43_queries,
0 AS web_whois_queries,
0 AS searchable_whois_queries,
-- DNS queries for UDP/TCP are all assumed to be received/responded.
SUM(IF(metricName = 'dns-udp-queries', count, 0)) AS dns_udp_queries_received,
@@ -96,7 +96,7 @@ CROSS JOIN(
`domain-registry-alpha.cloud_sql_icann_reporting.epp_metrics_201709`
UNION ALL
SELECT * FROM
`domain-registry-alpha.cloud_sql_icann_reporting.whois_counts_201709`
`domain-registry-alpha.cloud_sql_icann_reporting.rdap_counts_201709`
-- END INTERMEDIARY DATA SOURCES --
)) AS TldMetrics
WHERE RealTlds.tld = TldMetrics.tld OR TldMetrics.tld IS NULL

View File

@@ -13,22 +13,12 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- Query for WHOIS metrics.
-- This searches the monthly appengine logs for Whois requests, and
-- counts the number of hits via both endpoints (port 43 and the web).
-- Query for RDAP metrics.
-- This searches the monthly GKE logs for RDAP requests and counts the number of hits
SELECT
STRING(NULL) AS tld,
CASE
WHEN requestPath = '/_dr/whois' THEN 'whois-43-queries'
WHEN SUBSTR(requestPath, 0, 7) = '/whois/' THEN 'web-whois-queries'
WHEN SUBSTR(requestPath, 0, 6) = '/rdap/' THEN 'rdap-queries'
END AS metricName,
COUNT(requestPath) AS count
FROM
`domain-registry-alpha.cloud_sql_icann_reporting.monthly_logs_201709`
GROUP BY
metricName
HAVING
metricName IS NOT NULL
'rdap-queries' AS metricName,
count(*)
FROM `domain-registry-alpha.cloud_sql_icann_reporting.monthly_logs_201709`
WHERE SUBSTR(requestPath, 0, 6) = '/rdap/'