Skip to content

Commit f4c6514

Browse files
Revert deletion of reports Firestore export (without tech versions) (#214)
* REvert deletion of reports for adoption, core web vitals, lighthouse, page weight, and technologies * Remove deprecated CWV report files and add legacy export queries to tech-report-apis database
1 parent 04e7e86 commit f4c6514

4 files changed

Lines changed: 61 additions & 0 deletions

File tree

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
`)

definitions/output/reports/tech_report_page_weight.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,19 @@ GROUP BY
8282
"query": "SELECT STRING(date) AS date, * EXCEPT(date) FROM ${ctx.self()} WHERE date = '${pastMonth}'"
8383
}'''
8484
);
85+
86+
// legacy export for tech-report-apis
87+
SELECT
88+
reports.run_export_job(
89+
JSON '''{
90+
"destination": "firestore",
91+
"config": {
92+
"database": "tech-report-apis-${constants.environment}",
93+
"collection": "page_weight",
94+
"type": "report",
95+
"date": "${pastMonth}"
96+
},
97+
"query": "SELECT STRING(date) AS date, * EXCEPT(date, version) FROM ${ctx.self()} WHERE date = '${pastMonth}' AND version = 'ALL'"
98+
}'''
99+
);
85100
`)

0 commit comments

Comments
 (0)