Skip to content

Commit e1f04bd

Browse files
committed
Remove deprecated CWV report files and add legacy export queries to tech-report-apis database
1 parent 8650463 commit e1f04bd

9 files changed

Lines changed: 61 additions & 568 deletions

definitions/output/reports/cwv_tech_adoption.js

Lines changed: 0 additions & 46 deletions
This file was deleted.

definitions/output/reports/cwv_tech_core_web_vitals.js

Lines changed: 0 additions & 114 deletions
This file was deleted.

definitions/output/reports/cwv_tech_lighthouse.js

Lines changed: 0 additions & 91 deletions
This file was deleted.

definitions/output/reports/cwv_tech_page_weight.js

Lines changed: 0 additions & 81 deletions
This file was deleted.

definitions/output/reports/tech_report_adoption.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,20 @@ SELECT
4545
"query": "SELECT STRING(date) AS date, * EXCEPT(date) FROM ${ctx.self()} WHERE date = '${pastMonth}'"
4646
}'''
4747
);
48+
49+
// legacy export to tech-report-apis database
50+
SELECT
51+
reports.run_export_job(
52+
JSON '''{
53+
"destination": "firestore",
54+
"config": {
55+
"database": "tech-report-apis-${constants.environment}",
56+
"collection": "adoption",
57+
"type": "report",
58+
"date": "${pastMonth}"
59+
},
60+
"query": "SELECT STRING(date) AS date, * EXCEPT(date, version) FROM ${ctx.self()} WHERE date = '${pastMonth}' AND version = 'ALL'"
61+
}'''
62+
);
63+
4864
`)

definitions/output/reports/tech_report_core_web_vitals.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,19 @@ GROUP BY
113113
"query": "SELECT STRING(date) AS date, * EXCEPT(date) FROM ${ctx.self()} WHERE date = '${pastMonth}'"
114114
}'''
115115
);
116+
117+
// legacy export to tech-report-apis database
118+
SELECT
119+
reports.run_export_job(
120+
JSON '''{
121+
"destination": "firestore",
122+
"config": {
123+
"database": "tech-report-api-${constants.environment}",
124+
"collection": "core_web_vitals",
125+
"type": "report",
126+
"date": "${pastMonth}"
127+
},
128+
"query": "SELECT STRING(date) AS date, * EXCEPT(date, version) FROM ${ctx.self()} WHERE date = '${pastMonth}' AND version = 'ALL'"
129+
}'''
130+
);
116131
`)

definitions/output/reports/tech_report_lighthouse.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,19 @@ GROUP BY
8989
"query": "SELECT STRING(date) AS date, * EXCEPT(date) FROM ${ctx.self()} WHERE date = '${pastMonth}'"
9090
}'''
9191
);
92+
93+
// legacy export to tech-report-apis database
94+
SELECT
95+
reports.run_export_job(
96+
JSON '''{
97+
"destination": "firestore",
98+
"config": {
99+
"database": "tech-report-api-${constants.environment}",
100+
"collection": "lighthouse",
101+
"type": "report",
102+
"date": "${pastMonth}"
103+
},
104+
"query": "SELECT STRING(date) AS date, * EXCEPT(date, version) FROM ${ctx.self()} WHERE date = '${pastMonth}' AND version = 'ALL'"
105+
}'''
106+
);
92107
`)

0 commit comments

Comments
 (0)