Skip to content

Commit b97e8d6

Browse files
Merge pull request #63 from jacksonlester/staging
Staging
2 parents 04dfc48 + acbf9dd commit b97e8d6

8 files changed

Lines changed: 484 additions & 6 deletions

.dev/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.dev/sync-geometries-table.js

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,45 @@ async function syncGeometriesTable() {
224224
console.log(` ❌ Failed: ${failed}`)
225225
console.log(` 📁 Local files: ${localFileSet ? localFileSet.size : 'N/A'}`)
226226

227-
if (failed === 0) {
228-
console.log('\n✅ Geometries table synced successfully!')
229-
console.log('\n📝 Next steps:')
230-
console.log(` Run: ${isStaging ? 'STAGING=true ' : ''}node rebuild-cache.js`)
231-
} else {
227+
if (failed > 0) {
232228
console.log('\n⚠️ Some entries failed to insert. Please check errors above.')
233229
process.exit(1)
234230
}
231+
232+
// Verify all writes are visible before exiting (prevents race condition with rebuild-cache.js)
233+
if (inserted > 0 || updated > 0 || deletedFromTable > 0) {
234+
console.log('\n🔍 Verifying database writes are visible...')
235+
const expectedCount = localFileSet ? localFileSet.size : geojsonFiles.length
236+
237+
// Retry up to 5 times with 1 second delay
238+
for (let attempt = 1; attempt <= 5; attempt++) {
239+
const { data: verifyData, error: verifyError } = await supabase
240+
.from(table)
241+
.select('geometry_name', { count: 'exact' })
242+
243+
if (verifyError) {
244+
console.error(` ❌ Verification query failed: ${verifyError.message}`)
245+
break
246+
}
247+
248+
const actualCount = verifyData?.length || 0
249+
if (actualCount === expectedCount) {
250+
console.log(` ✅ Verified: ${actualCount} entries in table (expected ${expectedCount})`)
251+
break
252+
}
253+
254+
if (attempt < 5) {
255+
console.log(` ⏳ Attempt ${attempt}: Found ${actualCount} entries, expected ${expectedCount}. Waiting...`)
256+
await new Promise(resolve => setTimeout(resolve, 1000))
257+
} else {
258+
console.log(` ⚠️ Final count: ${actualCount} entries (expected ${expectedCount}) - proceeding anyway`)
259+
}
260+
}
261+
}
262+
263+
console.log('\n✅ Geometries table synced successfully!')
264+
console.log('\n📝 Next steps:')
265+
console.log(` Run: ${isStaging ? 'STAGING=true ' : ''}node rebuild-cache.js`)
235266
}
236267

237268
syncGeometriesTable().catch(error => {

events.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,4 @@ date,event_type,company,city,geometry_file,vehicles,platform,fares,direct_bookin
155155
2025-12-20,geometry_updated,Waymo,Silicon Valley,waymo-silicon-valley-december-20-2025-boundary.geojson,,,,,,,,,,,,https://www.reddit.com/r/waymo/comments/1prowr0/san_jose_service_area_expanded/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button,Thanks to u/dscreations for posting this on Reddit!
156156
2025-12-22,service_announced,Apollo Go,London,"-0.1276,51.5074",Apollo RT6,Lyft;Uber,Yes,No,Flexible,Safety Driver,Announced,,2026,https://www.apollogo.com/,,https://www.cnbc.com/2025/12/22/uber-lyft-set-to-trial-robotaxis-uk-in-partnership-chinas-baidu.html,Apollo Go to provide service with Uber AND Lyft in London in 2026
157157
2026-01-13,geometry_updated,Waymo,Austin,waymo-austin-january-13-2026-boundary.geojson,,,,,,,,,,,,https://x.com/reed/status/2011133349486871008?s=20,Waymo expands Austin service area according to a Waymo employee on X
158+
2026-01-22,service_created,Waymo,Miami,waymo-miami-january-22-2026-boundary.geojson,Jaguar I-Pace,Waymo,Yes,Yes,Flexible,Autonomous,Waitlist,,,https://waymo.com/blog/2026/01/miami-your-waymo-ride-is-ready,,https://www.cnbc.com/2026/01/22/waymo-launches-robotaxi-service-in-miami-extending-us-lead.html,Waymo launches its service to the public in Miami and is gradually letting riders off a waitlist to use their service.

events.csv.bak

Lines changed: 157 additions & 0 deletions
Large diffs are not rendered by default.

events.csv.tmp

Whitespace-only changes.
Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
{
2+
"type": "FeatureCollection",
3+
"features": [
4+
{
5+
"type": "Feature",
6+
"properties": {
7+
"name": "Layer 1"
8+
},
9+
"geometry": {
10+
"type": "Polygon",
11+
"coordinates": [
12+
[
13+
[
14+
-80.26473999023439,
15+
25.786135424965803
16+
],
17+
[
18+
-80.2654266357422,
19+
25.795718255882786
20+
],
21+
[
22+
-80.26473999023439,
23+
25.796954693777383
24+
],
25+
[
26+
-80.26525497436525,
27+
25.8070002735437
28+
],
29+
[
30+
-80.26422500610353,
31+
25.80823659373864
32+
],
33+
[
34+
-80.26473999023439,
35+
25.8162723605281
36+
],
37+
[
38+
-80.18920898437501,
39+
25.818435743058657
40+
],
41+
[
42+
-80.18405914306642,
43+
25.814727063097408
44+
],
45+
[
46+
-80.18526077270509,
47+
25.786753695492386
48+
],
49+
[
50+
-80.18423080444337,
51+
25.772223486079017
52+
],
53+
[
54+
-80.18234252929688,
55+
25.769904670998418
56+
],
57+
[
58+
-80.18405914306642,
59+
25.763102552072006
60+
],
61+
[
62+
-80.18972396850587,
63+
25.755527006373068
64+
],
65+
[
66+
-80.20191192626955,
67+
25.747023267173702
68+
],
69+
[
70+
-80.20843505859376,
71+
25.744703959920052
72+
],
73+
[
74+
-80.21118164062501,
75+
25.74207535696733
76+
],
77+
[
78+
-80.20980834960939,
79+
25.740219837519998
80+
],
81+
[
82+
-80.21238327026369,
83+
25.738364289100456
84+
],
85+
[
86+
-80.21495819091798,
87+
25.737436504026586
88+
],
89+
[
90+
-80.21770477294923,
91+
25.73898280845934
92+
],
93+
[
94+
-80.22233963012697,
95+
25.735580912151537
96+
],
97+
[
98+
-80.22783279418947,
99+
25.732488194652866
100+
],
101+
[
102+
-80.23555755615236,
103+
25.72537463906764
104+
],
105+
[
106+
-80.23778915405275,
107+
25.725838579578493
108+
],
109+
[
110+
-80.2486038208008,
111+
25.713620875781906
112+
],
113+
[
114+
-80.2486038208008,
115+
25.71006358693073
116+
],
117+
[
118+
-80.24551391601562,
119+
25.704804791228057
120+
],
121+
[
122+
-80.2599334716797,
123+
25.706042175827832
124+
],
125+
[
126+
-80.26937484741212,
127+
25.690109865847596
128+
],
129+
[
130+
-80.2846097946167,
131+
25.68968445942082
132+
],
133+
[
134+
-80.28486728668214,
135+
25.688562926103575
136+
],
137+
[
138+
-80.28645515441896,
139+
25.68968445942082
140+
],
141+
[
142+
-80.31718254089357,
143+
25.68883364200908
144+
],
145+
[
146+
-80.31859874725343,
147+
25.715708800140543
148+
],
149+
[
150+
-80.3188991546631,
151+
25.7232482219005
152+
],
153+
[
154+
-80.31851291656496,
155+
25.73411188137259
156+
],
157+
[
158+
-80.31941413879396,
159+
25.73817100114067
160+
],
161+
[
162+
-80.31984329223633,
163+
25.748414829792814
164+
],
165+
[
166+
-80.32164573669435,
167+
25.748646755311245
168+
],
169+
[
170+
-80.32155990600587,
171+
25.750115606412873
172+
],
173+
[
174+
-80.31975746154787,
175+
25.751893665024244
176+
],
177+
[
178+
-80.32010078430177,
179+
25.75544970239532
180+
],
181+
[
182+
-80.32138824462892,
183+
25.760087851989827
184+
],
185+
[
186+
-80.32319068908693,
187+
25.76248415829598
188+
],
189+
[
190+
-80.32220363616945,
191+
25.764996362972873
192+
],
193+
[
194+
-80.3203582763672,
195+
25.765189607284434
196+
],
197+
[
198+
-80.32044410705568,
199+
25.770175201759077
200+
],
201+
[
202+
-80.321946144104,
203+
25.770059260080018
204+
],
205+
[
206+
-80.32052993774414,
207+
25.77709285026313
208+
],
209+
[
210+
-80.32370567321779,
211+
25.78057084518746
212+
],
213+
[
214+
-80.3229331970215,
215+
25.78288945182125
216+
],
217+
[
218+
-80.31752586364748,
219+
25.782966737928504
220+
],
221+
[
222+
-80.3163242340088,
223+
25.781652867256543
224+
],
225+
[
226+
-80.3108310699463,
227+
25.780416269800465
228+
],
229+
[
230+
-80.3027629852295,
231+
25.784435164398015
232+
],
233+
[
234+
-80.29349327087404,
235+
25.784744304496108
236+
],
237+
[
238+
-80.28868675231935,
239+
25.784048738142317
240+
],
241+
[
242+
-80.28001785278322,
243+
25.785594435610964
244+
],
245+
[
246+
-80.27744293212892,
247+
25.785130728485544
248+
],
249+
[
250+
-80.27297973632814,
251+
25.783430453514477
252+
],
253+
[
254+
-80.26963233947755,
255+
25.78327588185392
256+
],
257+
[
258+
-80.26473999023439,
259+
25.786135424965803
260+
]
261+
]
262+
]
263+
}
264+
}
265+
]
266+
}

package-lock.json

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"csv-parse": "^6.1.0"
4+
}
5+
}

0 commit comments

Comments
 (0)