Skip to content

Commit c583f65

Browse files
fix: use includes() check for project placeholder to survive sed substitution (#164)
The CI pipeline runs `sed -i 's/MLAB_PROJECT_PLACEHOLDER/mlab-oti/g'` to set the production project. The previous strict equality check `placeholder === 'MLAB_PROJECT_PLACEHOLDER'` became `'mlab-oti' === 'mlab-oti'` after substitution, which is always true, causing production to use the mlab-staging fallback. Using `placeholder.includes('PLACEHOLDER')` instead ensures the check correctly detects an unsubstituted placeholder while evaluating to false after sed replaces it with 'mlab-oti'. This bug has been silently routing all ndt7 tests from the website to staging infrastructure since the 2026-02-03 release, causing a 99% drop in ndt7 test data in production BigQuery.
1 parent 755cdfa commit c583f65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const SpeedTest = {
134134
*/
135135
mlabProject() {
136136
const placeholder = 'MLAB_PROJECT_PLACEHOLDER';
137-
return placeholder === 'MLAB_PROJECT_PLACEHOLDER' ? 'mlab-staging' : placeholder;
137+
return placeholder.includes('PLACEHOLDER') ? 'mlab-staging' : placeholder;
138138
},
139139

140140
/**

0 commit comments

Comments
 (0)