Compare commits

..

20 Commits

Author SHA1 Message Date
Raul Ochoa
8dfe2098ed Release 2.84.0 2016-11-11 16:16:21 +01:00
Raul Ochoa
c56a4ee036 Update news and bump version 2016-11-11 16:15:59 +01:00
Raul Ochoa
c32623b821 Stubs next version 2016-11-11 16:15:08 +01:00
Raul Ochoa
3cd0a947f7 Merge pull request #586 from CartoDB/docs-switch-to-builder
switched gui tool from editor to builder
2016-11-11 12:52:38 +01:00
Raul Ochoa
8eea1cf4e7 Merge pull request #590 from CartoDB/analyses-limits-configuration
Analyses limit configuration allows to set other limits than timeout
2016-11-11 12:52:21 +01:00
Javier Goizueta
b5fccd5bbe Merge pull request #589 from CartoDB/upgrade-camshaft-to-0.48.1
Release 2.83.1
2016-11-10 18:48:14 +01:00
Raul Ochoa
e74ce9dfd8 Analyses limit configuration allows to set other limits than timeout
Configuration is now defined as a dictionary instead of just timeouts
per analysis type
2016-11-10 18:41:59 +01:00
Javier Goizueta
3743365a83 Release 2.83.1
Upgrade camshaft to 0.48.1
2016-11-10 18:16:42 +01:00
Javier Goizueta
8aeb2173d1 Release 2.83.0 2016-11-10 13:02:39 +01:00
Javier Goizueta
9a2b17d952 Merge pull request #588 from CartoDB/upgrade-camshaft-to-0.48.0
Upgrade camshaft to 0.48.0
2016-11-10 12:47:18 +01:00
Javier Goizueta
6f54cce01a Upgrade camshaft to 0.48.0
Upgrade camshaft to have analysis limits checking
2016-11-10 12:23:15 +01:00
Daniel García Aubert
6901b2049e Release 2.82.0 2016-11-08 18:48:01 +01:00
Daniel García Aubert
d0dcc027df Upgrade camshaft to version 0.47.0 2016-11-08 18:44:58 +01:00
Daniel García Aubert
b693005118 Stubs next version 2016-11-05 14:41:15 +01:00
Daniel García Aubert
ab4a0e836f Release 2.81.1 2016-11-05 14:36:49 +01:00
Daniel
abe02db6c6 Merge pull request #585 from CartoDB/fix-map-validator-basemap
Fix issues related to rollout
2016-11-05 14:35:06 +01:00
Daniel García Aubert
a2cd5dd32d Upgrade camshaft and windshaft 2016-11-05 14:12:03 +01:00
Daniel García Aubert
49b46a6096 Use address column in styles 2016-11-05 11:43:39 +01:00
csobier
94f420ca3f switched gui tool from editor to builder 2016-11-02 09:34:55 -04:00
Daniel García Aubert
5e530105df Stubs next version 2016-11-02 14:30:11 +01:00
11 changed files with 149 additions and 64 deletions

36
NEWS.md
View File

@@ -1,5 +1,41 @@
# Changelog
## 2.84.0
Released 2016-11-11
New features:
- Analyses limit configuration allows to set other limits than timeout.
## 2.83.1
Released 2016-11-10
Announcements:
- Upgrades camshaft to [0.48.1](https://github.com/CartoDB/camshaft/releases/tag/0.48.1).
## 2.83.0
Released 2016-11-10
Announcements:
- Upgrades camshaft to [0.48.0](https://github.com/CartoDB/camshaft/releases/tag/0.48.0).
## 2.82.0
Released 2016-11-08
Announcements:
- Upgrades camshaft to [0.47.0](https://github.com/CartoDB/camshaft/releases/tag/0.47.0).
## 2.81.1
Released 2016-11-05
Announcements:
- Upgrades windshaft to [2.6.2](https://github.com/CartoDB/windshaft/releases/tag/2.6.2).
- Upgrades camshaft to [0.46.3](https://github.com/CartoDB/camshaft/releases/tag/0.46.3).
## 2.81.0
Released 2016-11-02

View File

@@ -220,8 +220,8 @@ var config = {
// Define max execution time in ms for analyses or tags
// If analysis or tag are not found in redis this values will be used as default.
limits: {
moran: 120000,
cpu2x: 60000
moran: { timeout: 120000, maxNumberOfRows: 1e5 },
cpu2x: { timeout: 60000 }
}
}
,millstone: {

View File

@@ -214,8 +214,8 @@ var config = {
// Define max execution time in ms for analyses or tags
// If analysis or tag are not found in redis this values will be used as default.
limits: {
moran: 120000,
cpu2x: 60000
moran: { timeout: 120000, maxNumberOfRows: 1e5 },
cpu2x: { timeout: 60000 }
}
}
,millstone: {

View File

@@ -214,8 +214,8 @@ var config = {
// Define max execution time in ms for analyses or tags
// If analysis or tag are not found in redis this values will be used as default.
limits: {
moran: 120000,
cpu2x: 60000
moran: { timeout: 120000, maxNumberOfRows: 1e5 },
cpu2x: { timeout: 60000 }
}
}
,millstone: {

View File

@@ -215,8 +215,8 @@ var config = {
// Define max execution time in ms for analyses or tags
// If analysis or tag are not found in redis this values will be used as default.
limits: {
moran: 120000,
cpu2x: 60000
moran: { timeout: 120000, maxNumberOfRows: 1e5 },
cpu2x: { timeout: 60000 }
}
}
,millstone: {

View File

@@ -149,7 +149,7 @@ It is important to note that generated images are cached from the live data refe
* While images can encompass an entirety of a map, the default limit for pixel range is 8192 x 8192.
* Image resolution by default is set to 72 DPI
* JPEG quality by default is 85%
* Timeout limits for generating static maps are the same across the CARTO Editor and CARTO Engine. It is important to ensure timely processing of queries.
* Timeout limits for generating static maps are the same across CARTO Builder and CARTO Engine. It is important to ensure timely processing of queries.
## Examples

View File

@@ -12,6 +12,7 @@ var REDIS_LIMITS = {
function AnalysisBackend (metadataBackend, options) {
this.metadataBackend = metadataBackend;
this.options = options || {};
this.options.limits = this.options.limits || {};
this.setBatchConfig(this.options.batch);
this.setLoggerConfig(this.options.logger);
}
@@ -59,24 +60,32 @@ AnalysisBackend.prototype.create = function(analysisConfiguration, analysisDefin
AnalysisBackend.prototype.getAnalysesLimits = function(username, callback) {
var self = this;
var analysesLimits = {
analyses: {
// buffer: {
// timeout: 1000,
// maxNumberOfRows: 1e6
// }
}
};
Object.keys(self.options.limits).forEach(function(analysisTypeOrTag) {
analysesLimits.analyses[analysisTypeOrTag] = _.extend({}, self.options.limits[analysisTypeOrTag]);
});
var analysesLimitsKey = REDIS_LIMITS.PREFIX + username;
this.metadataBackend.redisCmd(REDIS_LIMITS.DB, 'HGETALL', [analysesLimitsKey], function(err, analysesTimeouts) {
// analysesTimeouts wil be something like: { moran: 3000, intersection: 5000 }
analysesTimeouts = analysesTimeouts || {};
_.defaults(analysesTimeouts, self.options.limits);
var analysesLimits = {
analyses: {
// buffer: {
// timeout: 1000
// }
}
};
Object.keys(analysesTimeouts).forEach(function(analysisType) {
analysesLimits.analyses[analysisType] = {
timeout: Number.isFinite(+analysesTimeouts[analysisType]) ? +analysesTimeouts[analysisType] : 0
};
analysesLimits.analyses[analysisType] = _.defaults(
{
timeout: Number.isFinite(+analysesTimeouts[analysisType]) ? +analysesTimeouts[analysisType] : 0
},
analysesLimits.analyses[analysisType]
);
});
return callback(null, analysesLimits);

68
npm-shrinkwrap.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "windshaft-cartodb",
"version": "2.81.0",
"version": "2.84.0",
"dependencies": {
"body-parser": {
"version": "1.14.2",
@@ -105,9 +105,9 @@
}
},
"camshaft": {
"version": "0.46.2",
"from": "camshaft@0.46.2",
"resolved": "https://registry.npmjs.org/camshaft/-/camshaft-0.46.2.tgz",
"version": "0.48.1",
"from": "camshaft@0.48.1",
"resolved": "https://registry.npmjs.org/camshaft/-/camshaft-0.48.1.tgz",
"dependencies": {
"async": {
"version": "1.5.2",
@@ -233,16 +233,16 @@
"resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.0.3.tgz"
},
"moment": {
"version": "2.15.2",
"version": "2.16.0",
"from": "moment@>=2.10.6 <3.0.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.15.2.tgz"
"resolved": "https://registry.npmjs.org/moment/-/moment-2.16.0.tgz"
}
}
},
"request": {
"version": "2.76.0",
"version": "2.78.0",
"from": "request@>=2.69.0 <3.0.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.76.0.tgz",
"resolved": "https://registry.npmjs.org/request/-/request-2.78.0.tgz",
"dependencies": {
"aws-sign2": {
"version": "0.6.0",
@@ -282,9 +282,9 @@
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz"
},
"form-data": {
"version": "2.1.1",
"version": "2.1.2",
"from": "form-data@>=2.1.1 <2.2.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.1.tgz",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz",
"dependencies": {
"asynckit": {
"version": "0.4.0",
@@ -939,7 +939,7 @@
},
"inherits": {
"version": "2.0.3",
"from": "inherits@>=2.0.0 <3.0.0",
"from": "inherits@>=2.0.1 <2.1.0",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
}
}
@@ -1082,12 +1082,12 @@
"async": {
"version": "2.1.2",
"from": "async@>=2.0.1 <3.0.0",
"resolved": "https://registry.npmjs.org/async/-/async-2.1.2.tgz",
"resolved": "http://registry.npmjs.org/async/-/async-2.1.2.tgz",
"dependencies": {
"lodash": {
"version": "4.16.4",
"version": "4.16.6",
"from": "lodash@>=4.14.0 <5.0.0",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.16.4.tgz"
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.16.6.tgz"
}
}
}
@@ -1126,9 +1126,16 @@
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz"
},
"tough-cookie": {
"version": "2.3.1",
"version": "2.3.2",
"from": "tough-cookie@>=0.12.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.1.tgz"
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
"dependencies": {
"punycode": {
"version": "1.4.1",
"from": "punycode@>=1.4.1 <2.0.0",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz"
}
}
},
"http-signature": {
"version": "0.11.0",
@@ -1389,9 +1396,9 @@
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz"
},
"windshaft": {
"version": "2.6.1",
"from": "windshaft@2.6.1",
"resolved": "https://registry.npmjs.org/windshaft/-/windshaft-2.6.1.tgz",
"version": "2.6.2",
"from": "windshaft@2.6.2",
"resolved": "https://registry.npmjs.org/windshaft/-/windshaft-2.6.2.tgz",
"dependencies": {
"abaculus": {
"version": "1.1.0-cdb7",
@@ -4345,7 +4352,7 @@
"dependencies": {
"strip-ansi": {
"version": "3.0.1",
"from": "strip-ansi@>=3.0.1 <4.0.0",
"from": "strip-ansi@>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"dependencies": {
"ansi-regex": {
@@ -4436,9 +4443,9 @@
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"dependencies": {
"graceful-fs": {
"version": "4.1.9",
"version": "4.1.10",
"from": "graceful-fs@>=4.1.2 <5.0.0",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.9.tgz"
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.10.tgz"
},
"parse-json": {
"version": "2.2.0",
@@ -4549,9 +4556,9 @@
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
"dependencies": {
"graceful-fs": {
"version": "4.1.9",
"version": "4.1.10",
"from": "graceful-fs@>=4.1.2 <5.0.0",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.9.tgz"
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.10.tgz"
},
"pify": {
"version": "2.3.0",
@@ -4597,16 +4604,9 @@
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"dependencies": {
"code-point-at": {
"version": "1.0.1",
"version": "1.1.0",
"from": "code-point-at@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.1.tgz",
"dependencies": {
"number-is-nan": {
"version": "1.0.1",
"from": "number-is-nan@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz"
}
}
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz"
},
"is-fullwidth-code-point": {
"version": "1.0.0",
@@ -4622,7 +4622,7 @@
},
"strip-ansi": {
"version": "3.0.1",
"from": "strip-ansi@>=3.0.1 <4.0.0",
"from": "strip-ansi@>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"dependencies": {
"ansi-regex": {

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "windshaft-cartodb",
"version": "2.81.0",
"version": "2.84.0",
"description": "A map tile server for CartoDB",
"keywords": [
"cartodb"
@@ -20,7 +20,7 @@
],
"dependencies": {
"body-parser": "~1.14.0",
"camshaft": "0.46.2",
"camshaft": "0.48.1",
"cartodb-psql": "~0.6.1",
"cartodb-query-tables": "~0.1.0",
"cartodb-redis": "0.13.1",
@@ -39,7 +39,7 @@
"step-profiler": "~0.3.0",
"turbo-carto": "0.18.0",
"underscore": "~1.6.0",
"windshaft": "2.6.1",
"windshaft": "2.6.2",
"yargs": "~5.0.0"
},
"devDependencies": {

View File

@@ -257,7 +257,7 @@ describe('multilayer error cases', function() {
layers: [
{ options: {
sql: 'select * from test_table limit 1',
cartocss: '#test_table::outline[nonexistent="one"], [nonexistent="two"] { marker-fill: red; }',
cartocss: '#test_table::outline[address="one"], [address="two"] { marker-fill: red; }',
cartocss_version: '2.0.2',
interactivity: [ 'cartodb_id' ],
geom_column: 'the_geom'
@@ -282,7 +282,7 @@ describe('multilayer error cases', function() {
var parsed = JSON.parse(res.body);
assert.equal(parsed.errors.length, 1);
var error = parsed.errors[0];
assert.ok(error.match(/column "nonexistent" does not exist/m), error);
assert.ok(error.match(/column "address" does not exist/m), error);
done();
});
});

View File

@@ -44,7 +44,12 @@ describe('analysis-backend limits', function() {
}
it("should use limits from configuration", function(done) {
var analysisBackend = new AnalysisBackend(this.metadataBackend, { limits: { moran: 5000, kmeans: 5000 } });
var analysisBackend = new AnalysisBackend(this.metadataBackend, {
limits: {
moran: { timeout: 5000 },
kmeans: { timeout: 5000 }
}
});
analysisBackend.getAnalysesLimits(user, function(err, result) {
assert.ok(!err, err);
@@ -88,7 +93,11 @@ describe('analysis-backend limits', function() {
return done(err);
}
var analysisBackend = new AnalysisBackend(self.metadataBackend, { limits: { moran: 1000 } });
var analysisBackend = new AnalysisBackend(self.metadataBackend, {
limits: {
moran: { timeout: 1000 }
}
});
analysisBackend.getAnalysesLimits(user, function(err, result) {
assert.ok(!err, err);
@@ -109,7 +118,12 @@ describe('analysis-backend limits', function() {
return done(err);
}
var analysisBackend = new AnalysisBackend(self.metadataBackend, { limits: { moran: 1000, kmeans: 1000 } });
var analysisBackend = new AnalysisBackend(self.metadataBackend, {
limits: {
moran: { timeout: 1000 },
kmeans: { timeout: 1000 }
}
});
analysisBackend.getAnalysesLimits(user, function(err, result) {
assert.ok(!err, err);
@@ -124,4 +138,30 @@ describe('analysis-backend limits', function() {
});
});
it("should allow to set other limits per analysis via configuration, and keep timeout from redis", function(done) {
var self = this;
var limits = ['aggregate-intersection', 5000];
withAnalysesLimits(limits, function(err) {
if (err) {
return done(err);
}
var analysisBackend = new AnalysisBackend(self.metadataBackend, {
limits: {
'aggregate-intersection': { timeout: 10000, maxNumberOfRows: 1e5 }
}
});
analysisBackend.getAnalysesLimits(user, function(err, result) {
assert.ok(!err, err);
assert.ok(result.analyses['aggregate-intersection']);
assert.equal(result.analyses['aggregate-intersection'].timeout, 5000);
assert.equal(result.analyses['aggregate-intersection'].maxNumberOfRows, 1e5);
done();
});
});
});
});