Closed Algunenano closed 5 years ago
Could reproduce the issue locally with the example in current master and this cartocss:
#populated_places_simple {
marker-fill-opacity: 1.0;
marker-line-color: #FFF;
marker-line-width: 1;
marker-line-opacity: 1;
marker-allow-overlap: true;
marker-width: ramp(, (1,10), quantiles()));
marker-fill: ramp([pop_max], colorbrewer(YlGnBu), quantiles());
}
note the evil ramp: marker-width: ramp(, (1,10), quantiles()));
.
It dies with the following traces (very similar to production one):
Note there's a 400 response to a POST with an error message Failed to process marker width property column replace is not a function
before dying.
Will work on a fix.
I wrote a test to reproduce the issue in https://github.com/CartoDB/turbo-carto/pull/84 (all WIP).
It produces the following output:
When trying to find a suitable fix, I noticed that the the message Failed to process...
comes from the exception caught and then relaunched wrapped in a TurboCartoError
here:
I'd need some help from the Node experts @dgaubert or @oleurud on what's the best way to do error management in this situation. There may well be other cases with similar results (exception caught, relaunched, and then Windshaft dying on them).
I finally got it fixed in #84
I also tested it end-to-end with the cartocss above and Windshaft-cartodb with this patch:
diff --git a/package.json b/package.json
index aab6a238..36b8e2fe 100644
--- a/package.json
+++ b/package.json
@@ -47,7 +47,7 @@
"request": "2.87.0",
"semver": "5.5.0",
"step-profiler": "0.3.0",
- "turbo-carto": "0.21.0",
+ "turbo-carto": "github:cartodb/turbo-carto#83-fix-cannot-read-property-replace",
"underscore": "1.6.0",
"windshaft": "5.2.1",
"yargs": "11.1.0"
and instead of dying it does what is meant to do, which is to log the error and carry on:
[2019-06-11 11:25:23.751] [INFO] [default] - undefined POST development.localhost.lan:8181/api/v1/map 400 44 ms -> application/json; charset=utf-8 ({"dbConnSetup":1,"anonymous_getMapConfig":36,"overviewsAddedToMapconfig":false,"mapType":"anonymous","total":37}) ({"mainError":{"statusCode":400,"message":"Failed to process marker width property column replace is not a function","name":"Error","type":"layer","subtype":"turbo carto"},"moreErrors":[]})
The final fix is in #85
It is released and deployed, working as expected. Cheers!
This is restarting services in production:
cc/ @CartoDB/rt-managers