diff --git a/core/src/main/java/google/registry/reporting/icann/ActivityReportingQueryBuilder.java b/core/src/main/java/google/registry/reporting/icann/ActivityReportingQueryBuilder.java index c0db835b6..45f2fce43 100644 --- a/core/src/main/java/google/registry/reporting/icann/ActivityReportingQueryBuilder.java +++ b/core/src/main/java/google/registry/reporting/icann/ActivityReportingQueryBuilder.java @@ -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()); diff --git a/core/src/main/resources/google/registry/reporting/icann/sql/activity_report_aggregation.sql b/core/src/main/resources/google/registry/reporting/icann/sql/activity_report_aggregation.sql index 0c304b9de..038266667 100644 --- a/core/src/main/resources/google/registry/reporting/icann/sql/activity_report_aggregation.sql +++ b/core/src/main/resources/google/registry/reporting/icann/sql/activity_report_aggregation.sql @@ -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 diff --git a/core/src/main/resources/google/registry/reporting/icann/sql/whois_counts.sql b/core/src/main/resources/google/registry/reporting/icann/sql/rdap_counts.sql similarity index 55% rename from core/src/main/resources/google/registry/reporting/icann/sql/whois_counts.sql rename to core/src/main/resources/google/registry/reporting/icann/sql/rdap_counts.sql index 07fa4d107..3af89ae3e 100644 --- a/core/src/main/resources/google/registry/reporting/icann/sql/whois_counts.sql +++ b/core/src/main/resources/google/registry/reporting/icann/sql/rdap_counts.sql @@ -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/' diff --git a/core/src/test/java/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java b/core/src/test/java/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java index aaf7ff8cc..b116d0e5d 100644 --- a/core/src/test/java/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java +++ b/core/src/test/java/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java @@ -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"); diff --git a/core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java b/core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java index b6981c51e..926f15c97 100644 --- a/core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java +++ b/core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java @@ -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"); diff --git a/core/src/test/resources/google/registry/reporting/icann/activity_report_aggregation_test.sql b/core/src/test/resources/google/registry/reporting/icann/activity_report_aggregation_test.sql index d933d6746..15a932865 100644 --- a/core/src/test/resources/google/registry/reporting/icann/activity_report_aggregation_test.sql +++ b/core/src/test/resources/google/registry/reporting/icann/activity_report_aggregation_test.sql @@ -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 diff --git a/core/src/test/resources/google/registry/reporting/icann/whois_counts_test.sql b/core/src/test/resources/google/registry/reporting/icann/rdap_counts_test.sql similarity index 55% rename from core/src/test/resources/google/registry/reporting/icann/whois_counts_test.sql rename to core/src/test/resources/google/registry/reporting/icann/rdap_counts_test.sql index 0c5a8a584..d34822bf1 100644 --- a/core/src/test/resources/google/registry/reporting/icann/whois_counts_test.sql +++ b/core/src/test/resources/google/registry/reporting/icann/rdap_counts_test.sql @@ -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/' diff --git a/core/src/test/resources/google/registry/webdriver/goldens/chrome-linux/ConsoleScreenshotTest_settingsPage_registrarSelected_whois.png b/core/src/test/resources/google/registry/webdriver/goldens/chrome-linux/ConsoleScreenshotTest_settingsPage_registrarSelected_rdap.png similarity index 100% rename from core/src/test/resources/google/registry/webdriver/goldens/chrome-linux/ConsoleScreenshotTest_settingsPage_registrarSelected_whois.png rename to core/src/test/resources/google/registry/webdriver/goldens/chrome-linux/ConsoleScreenshotTest_settingsPage_registrarSelected_rdap.png