mirror of
https://github.com/google/nomulus
synced 2026-01-07 14:05: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:
@@ -36,7 +36,7 @@ public final class ActivityReportingQueryBuilder implements QueryBuilder {
|
|||||||
static final String DNS_COUNTS = "dns_counts";
|
static final String DNS_COUNTS = "dns_counts";
|
||||||
static final String MONTHLY_LOGS = "monthly_logs";
|
static final String MONTHLY_LOGS = "monthly_logs";
|
||||||
static final String EPP_METRICS = "epp_metrics";
|
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";
|
static final String ACTIVITY_REPORT_AGGREGATION = "activity_report_aggregation";
|
||||||
|
|
||||||
private final String projectId;
|
private final String projectId;
|
||||||
@@ -98,13 +98,13 @@ public final class ActivityReportingQueryBuilder implements QueryBuilder {
|
|||||||
.build();
|
.build();
|
||||||
queriesBuilder.put(getTableName(EPP_METRICS, yearMonth), eppQuery);
|
queriesBuilder.put(getTableName(EPP_METRICS, yearMonth), eppQuery);
|
||||||
|
|
||||||
String whoisQuery =
|
String rdapQuery =
|
||||||
SqlTemplate.create(getQueryFromFile(WHOIS_COUNTS + ".sql"))
|
SqlTemplate.create(getQueryFromFile(RDAP_COUNTS + ".sql"))
|
||||||
.put("PROJECT_ID", projectId)
|
.put("PROJECT_ID", projectId)
|
||||||
.put("ICANN_REPORTING_DATA_SET", icannReportingDataSet)
|
.put("ICANN_REPORTING_DATA_SET", icannReportingDataSet)
|
||||||
.put("MONTHLY_LOGS_TABLE", getTableName(MONTHLY_LOGS, yearMonth))
|
.put("MONTHLY_LOGS_TABLE", getTableName(MONTHLY_LOGS, yearMonth))
|
||||||
.build();
|
.build();
|
||||||
queriesBuilder.put(getTableName(WHOIS_COUNTS, yearMonth), whoisQuery);
|
queriesBuilder.put(getTableName(RDAP_COUNTS, yearMonth), rdapQuery);
|
||||||
|
|
||||||
SqlTemplate aggregateQuery =
|
SqlTemplate aggregateQuery =
|
||||||
SqlTemplate.create(getQueryFromFile(ACTIVITY_REPORT_AGGREGATION + ".sql"))
|
SqlTemplate.create(getQueryFromFile(ACTIVITY_REPORT_AGGREGATION + ".sql"))
|
||||||
@@ -115,7 +115,7 @@ public final class ActivityReportingQueryBuilder implements QueryBuilder {
|
|||||||
.put("ICANN_REPORTING_DATA_SET", icannReportingDataSet)
|
.put("ICANN_REPORTING_DATA_SET", icannReportingDataSet)
|
||||||
.put("DNS_COUNTS_TABLE", getTableName(DNS_COUNTS, yearMonth))
|
.put("DNS_COUNTS_TABLE", getTableName(DNS_COUNTS, yearMonth))
|
||||||
.put("EPP_METRICS_TABLE", getTableName(EPP_METRICS, 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(
|
queriesBuilder.put(
|
||||||
getTableName(ACTIVITY_REPORT_AGGREGATION, yearMonth), aggregateQuery.build());
|
getTableName(ACTIVITY_REPORT_AGGREGATION, yearMonth), aggregateQuery.build());
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ SELECT
|
|||||||
SUM(IF(metricName = 'operational-registrars', count, 0)) AS operational_registrars,
|
SUM(IF(metricName = 'operational-registrars', count, 0)) AS operational_registrars,
|
||||||
-- We use the Centralized Zone Data Service.
|
-- We use the Centralized Zone Data Service.
|
||||||
"CZDS" AS zfa_passwords,
|
"CZDS" AS zfa_passwords,
|
||||||
SUM(IF(metricName = 'whois-43-queries', count, 0)) AS whois_43_queries,
|
-- We don't support WHOIS queries any more.
|
||||||
SUM(IF(metricName = 'web-whois-queries', count, 0)) AS web_whois_queries,
|
0 AS whois_43_queries,
|
||||||
-- We don't support searchable WHOIS.
|
0 AS web_whois_queries,
|
||||||
0 AS searchable_whois_queries,
|
0 AS searchable_whois_queries,
|
||||||
-- DNS queries for UDP/TCP are all assumed to be received/responded.
|
-- 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,
|
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%`
|
`%PROJECT_ID%.%ICANN_REPORTING_DATA_SET%.%EPP_METRICS_TABLE%`
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT * FROM
|
SELECT * FROM
|
||||||
`%PROJECT_ID%.%ICANN_REPORTING_DATA_SET%.%WHOIS_COUNTS_TABLE%`
|
`%PROJECT_ID%.%ICANN_REPORTING_DATA_SET%.%RDAP_COUNTS_TABLE%`
|
||||||
-- END INTERMEDIARY DATA SOURCES --
|
-- END INTERMEDIARY DATA SOURCES --
|
||||||
)) AS TldMetrics
|
)) AS TldMetrics
|
||||||
WHERE RealTlds.tld = TldMetrics.tld OR TldMetrics.tld IS NULL
|
WHERE RealTlds.tld = TldMetrics.tld OR TldMetrics.tld IS NULL
|
||||||
|
|||||||
@@ -13,22 +13,12 @@
|
|||||||
-- See the License for the specific language governing permissions and
|
-- See the License for the specific language governing permissions and
|
||||||
-- limitations under the License.
|
-- limitations under the License.
|
||||||
|
|
||||||
-- Query for WHOIS metrics.
|
-- Query for RDAP metrics.
|
||||||
|
-- This searches the monthly GKE logs for RDAP requests and counts the number of hits
|
||||||
-- This searches the monthly appengine logs for Whois requests, and
|
|
||||||
-- counts the number of hits via both endpoints (port 43 and the web).
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
STRING(NULL) AS tld,
|
STRING(NULL) AS tld,
|
||||||
CASE
|
'rdap-queries' AS metricName,
|
||||||
WHEN requestPath = '/_dr/whois' THEN 'whois-43-queries'
|
count(*)
|
||||||
WHEN SUBSTR(requestPath, 0, 7) = '/whois/' THEN 'web-whois-queries'
|
FROM `%PROJECT_ID%.%ICANN_REPORTING_DATA_SET%.%MONTHLY_LOGS_TABLE%`
|
||||||
WHEN SUBSTR(requestPath, 0, 6) = '/rdap/' THEN 'rdap-queries'
|
WHERE SUBSTR(requestPath, 0, 6) = '/rdap/'
|
||||||
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
|
|
||||||
@@ -50,7 +50,7 @@ class ActivityReportingQueryBuilderTest {
|
|||||||
ActivityReportingQueryBuilder.MONTHLY_LOGS,
|
ActivityReportingQueryBuilder.MONTHLY_LOGS,
|
||||||
ActivityReportingQueryBuilder.DNS_COUNTS,
|
ActivityReportingQueryBuilder.DNS_COUNTS,
|
||||||
ActivityReportingQueryBuilder.EPP_METRICS,
|
ActivityReportingQueryBuilder.EPP_METRICS,
|
||||||
ActivityReportingQueryBuilder.WHOIS_COUNTS,
|
ActivityReportingQueryBuilder.RDAP_COUNTS,
|
||||||
ActivityReportingQueryBuilder.ACTIVITY_REPORT_AGGREGATION);
|
ActivityReportingQueryBuilder.ACTIVITY_REPORT_AGGREGATION);
|
||||||
|
|
||||||
ActivityReportingQueryBuilder queryBuilder = createQueryBuilder("cloud_sql_icann_reporting");
|
ActivityReportingQueryBuilder queryBuilder = createQueryBuilder("cloud_sql_icann_reporting");
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ public class ConsoleScreenshotTest {
|
|||||||
driver.diffPage("registrarSelected_contacts");
|
driver.diffPage("registrarSelected_contacts");
|
||||||
driver.findElement(By.cssSelector("a[routerLink=\"rdap\"]")).click();
|
driver.findElement(By.cssSelector("a[routerLink=\"rdap\"]")).click();
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
driver.diffPage("registrarSelected_whois");
|
driver.diffPage("registrarSelected_rdap");
|
||||||
driver.findElement(By.cssSelector("a[routerLink=\"security\"]")).click();
|
driver.findElement(By.cssSelector("a[routerLink=\"security\"]")).click();
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
driver.diffPage("registrarSelected_security");
|
driver.diffPage("registrarSelected_security");
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ SELECT
|
|||||||
SUM(IF(metricName = 'operational-registrars', count, 0)) AS operational_registrars,
|
SUM(IF(metricName = 'operational-registrars', count, 0)) AS operational_registrars,
|
||||||
-- We use the Centralized Zone Data Service.
|
-- We use the Centralized Zone Data Service.
|
||||||
"CZDS" AS zfa_passwords,
|
"CZDS" AS zfa_passwords,
|
||||||
SUM(IF(metricName = 'whois-43-queries', count, 0)) AS whois_43_queries,
|
-- We don't support WHOIS queries any more.
|
||||||
SUM(IF(metricName = 'web-whois-queries', count, 0)) AS web_whois_queries,
|
0 AS whois_43_queries,
|
||||||
-- We don't support searchable WHOIS.
|
0 AS web_whois_queries,
|
||||||
0 AS searchable_whois_queries,
|
0 AS searchable_whois_queries,
|
||||||
-- DNS queries for UDP/TCP are all assumed to be received/responded.
|
-- 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,
|
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`
|
`domain-registry-alpha.cloud_sql_icann_reporting.epp_metrics_201709`
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT * FROM
|
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 --
|
-- END INTERMEDIARY DATA SOURCES --
|
||||||
)) AS TldMetrics
|
)) AS TldMetrics
|
||||||
WHERE RealTlds.tld = TldMetrics.tld OR TldMetrics.tld IS NULL
|
WHERE RealTlds.tld = TldMetrics.tld OR TldMetrics.tld IS NULL
|
||||||
|
|||||||
@@ -13,22 +13,12 @@
|
|||||||
-- See the License for the specific language governing permissions and
|
-- See the License for the specific language governing permissions and
|
||||||
-- limitations under the License.
|
-- limitations under the License.
|
||||||
|
|
||||||
-- Query for WHOIS metrics.
|
-- Query for RDAP metrics.
|
||||||
|
-- This searches the monthly GKE logs for RDAP requests and counts the number of hits
|
||||||
-- This searches the monthly appengine logs for Whois requests, and
|
|
||||||
-- counts the number of hits via both endpoints (port 43 and the web).
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
STRING(NULL) AS tld,
|
STRING(NULL) AS tld,
|
||||||
CASE
|
'rdap-queries' AS metricName,
|
||||||
WHEN requestPath = '/_dr/whois' THEN 'whois-43-queries'
|
count(*)
|
||||||
WHEN SUBSTR(requestPath, 0, 7) = '/whois/' THEN 'web-whois-queries'
|
FROM `domain-registry-alpha.cloud_sql_icann_reporting.monthly_logs_201709`
|
||||||
WHEN SUBSTR(requestPath, 0, 6) = '/rdap/' THEN 'rdap-queries'
|
WHERE SUBSTR(requestPath, 0, 6) = '/rdap/'
|
||||||
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
|
|
||||||
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Reference in New Issue
Block a user