Skip to content

Commit feaf4f1

Browse files
authored
Merge pull request #202 from perftool-incubator/feat-default-aggregation
2 parents 2a84734 + 94dcb00 commit feaf4f1

12 files changed

Lines changed: 633 additions & 187 deletions

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v8dev
1+
v10dev

‎queries/cdmq/add-run-worker.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ module.exports = async ({ instance, filePath, docTypes, mode }) => {
8989
// "run":{"run-uuid":"c0e04edb-ddbc-4081-8bbc-9b9e84e6538d"}}
9090
if (Object.keys(action).includes('index') && Object.keys(action['index']).includes('_index')) {
9191
const indexName = action['index']['_index'];
92-
const regExp = /^cdm-*(v7dev|v8dev|v9dev)-([^@]+)(@\d\d\d\d\.\d\d)*$/;
92+
const regExp = new RegExp(
93+
'^cdm-*(' + cdm.supportedCdmVersions.join('|') + ')-([^@]+)(@\\d\\d\\d\\d\\.\\d\\d)*$'
94+
);
9395
const matches = regExp.exec(indexName);
9496
if (matches) {
9597
const cdmVer = matches[1];

‎queries/cdmq/add-run.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ function save_ver(ver) {
2929
console.log('You must specify a --host before a --ver');
3030
process.exit(1);
3131
}
32-
if (/^v[789]dev$/.exec(ver)) {
32+
if (cdm.isValidCdmVersion(ver)) {
3333
instances[instances.length - 1]['ver'] = ver;
3434
} else {
35-
console.log('The version must be v7dev, v8dev, or v9dev, not: ' + ver);
35+
console.log('The version must be one of: ' + cdm.supportedCdmVersions.join(', ') + ', not: ' + ver);
3636
process.exit(1);
3737
}
3838
}
@@ -119,7 +119,7 @@ async function main() {
119119
.option('--dir <a directory with ndjson files to index>')
120120
.option('--host <host[:port]>', 'The host and optional port of the OpenSearch instance', save_host)
121121
.option('--userpass <user:pass>', 'The user and password for the most recent --host', save_userpass)
122-
.option('--ver <v7dev|v8dev|v9dev>', 'The Common Data Model version to use for the most recent --host', save_ver)
122+
.option(cdm.cdmVersionOptionDesc(), 'The Common Data Model version to use for the most recent --host', save_ver)
123123
.parse(process.argv);
124124

125125
// If the user does not specify any hosts, assume localhost:9200 is used

0 commit comments

Comments
 (0)