@cumulus/async-operations 15.0.4 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/async_operations.d.ts +8 -13
- package/dist/async_operations.d.ts.map +1 -1
- package/dist/async_operations.js +22 -37
- package/dist/async_operations.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +0 -10
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/async_operations.ts +18 -44
- package/src/types.ts +0 -11
- package/tests/test-async_operations.js +67 -172
|
@@ -5,7 +5,7 @@ import { EnvironmentVariables } from 'aws-sdk/clients/lambda';
|
|
|
5
5
|
import { ApiAsyncOperation, AsyncOperationType } from '@cumulus/types/api/async_operations';
|
|
6
6
|
import type { AWSError } from 'aws-sdk/lib/error';
|
|
7
7
|
import type { PromiseResult } from 'aws-sdk/lib/request';
|
|
8
|
-
import type {
|
|
8
|
+
import type { AsyncOperationPgModelObject } from './types';
|
|
9
9
|
declare type StartEcsTaskReturnType = Promise<PromiseResult<ECS.RunTaskResponse, AWSError>>;
|
|
10
10
|
export declare const getLambdaConfiguration: (functionName: string) => Promise<Lambda.FunctionConfiguration>;
|
|
11
11
|
export declare const getLambdaEnvironmentVariables: (configuration: Lambda.FunctionConfiguration) => EnvironmentVariables[];
|
|
@@ -15,7 +15,7 @@ export declare const getLambdaEnvironmentVariables: (configuration: Lambda.Funct
|
|
|
15
15
|
* @param {Object} params
|
|
16
16
|
* @param {string} params.asyncOperationTaskDefinition - ARN for the task definition
|
|
17
17
|
* @param {string} params.cluster - ARN for the ECS cluster to use for the task
|
|
18
|
-
* @param {string} params.
|
|
18
|
+
* @param {string} params.callerLambdaName
|
|
19
19
|
* Environment variable for Lambda name that is initiating the ECS task
|
|
20
20
|
* @param {string} params.lambdaName
|
|
21
21
|
* Environment variable for Lambda name that will be run by the ECS task
|
|
@@ -29,7 +29,7 @@ export declare const getLambdaEnvironmentVariables: (configuration: Lambda.Funct
|
|
|
29
29
|
* @returns {Promise<Object>}
|
|
30
30
|
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ECS.html#runTask-property
|
|
31
31
|
*/
|
|
32
|
-
export declare const startECSTask: ({ asyncOperationTaskDefinition, cluster, callerLambdaName, lambdaName, id, payloadBucket, payloadKey, useLambdaEnvironmentVariables,
|
|
32
|
+
export declare const startECSTask: ({ asyncOperationTaskDefinition, cluster, callerLambdaName, lambdaName, id, payloadBucket, payloadKey, useLambdaEnvironmentVariables, }: {
|
|
33
33
|
asyncOperationTaskDefinition: string;
|
|
34
34
|
cluster: string;
|
|
35
35
|
callerLambdaName: string;
|
|
@@ -38,17 +38,15 @@ export declare const startECSTask: ({ asyncOperationTaskDefinition, cluster, cal
|
|
|
38
38
|
payloadBucket: string;
|
|
39
39
|
payloadKey: string;
|
|
40
40
|
useLambdaEnvironmentVariables?: boolean | undefined;
|
|
41
|
-
dynamoTableName: string;
|
|
42
41
|
}) => StartEcsTaskReturnType;
|
|
43
42
|
export declare const createAsyncOperation: (params: {
|
|
44
43
|
createObject: ApiAsyncOperation;
|
|
45
44
|
stackName: string;
|
|
46
45
|
systemBucket: string;
|
|
47
|
-
dynamoTableName: string;
|
|
48
46
|
knexConfig?: NodeJS.ProcessEnv;
|
|
49
47
|
esClient?: object;
|
|
50
48
|
asyncOperationPgModel?: AsyncOperationPgModelObject;
|
|
51
|
-
}
|
|
49
|
+
}) => Promise<Partial<ApiAsyncOperation>>;
|
|
52
50
|
/**
|
|
53
51
|
* Start an AsyncOperation in ECS and store its associate record to DynamoDB
|
|
54
52
|
*
|
|
@@ -57,21 +55,19 @@ export declare const createAsyncOperation: (params: {
|
|
|
57
55
|
* async-operation ECS task definition
|
|
58
56
|
* @param {string} params.cluster - the name of the ECS cluster
|
|
59
57
|
* @param {string} params.description - the ECS task description
|
|
60
|
-
* @param {string} params.dynamoTableName - the dynamo async operations table to
|
|
61
|
-
* write records to
|
|
62
58
|
* @param {Object} params.knexConfig - Object with Knex configuration keys
|
|
63
59
|
* @param {string} params.callerLambdaName - the name of the Lambda initiating the ECS task
|
|
64
60
|
* @param {string} params.lambdaName - the name of the Lambda task to be run
|
|
65
61
|
* @param {string} params.operationType - the type of async operation to run
|
|
66
62
|
* @param {Object|Array} params.payload - the event to be passed to the lambda task.
|
|
67
63
|
* Must be a simple Object or Array which can be converted to JSON.
|
|
68
|
-
* @param {string} params.stackName- the Cumulus stack name
|
|
69
|
-
* @param {string} params.
|
|
64
|
+
* @param {string} params.stackName - the Cumulus stack name
|
|
65
|
+
* @param {string} params.systemBucket - Cumulus system bucket to use for writing
|
|
70
66
|
* async payload objects
|
|
71
67
|
* @param {string} params.useLambdaEnvironmentVariables -
|
|
72
68
|
* useLambdaEnvironmentVariables, set 'true' if async task
|
|
73
69
|
* should import environment variables from the deployed lambda
|
|
74
|
-
* @param {
|
|
70
|
+
* @param {Object} params.startEcsTaskFunc - used for testing
|
|
75
71
|
* @returns {Promise<Object>} - an AsyncOperation record
|
|
76
72
|
* @memberof AsyncOperation
|
|
77
73
|
*/
|
|
@@ -80,7 +76,6 @@ export declare const startAsyncOperation: (params: {
|
|
|
80
76
|
asyncOperationTaskDefinition: string;
|
|
81
77
|
cluster: string;
|
|
82
78
|
description: string;
|
|
83
|
-
dynamoTableName: string;
|
|
84
79
|
knexConfig?: NodeJS.ProcessEnv;
|
|
85
80
|
callerLambdaName: string;
|
|
86
81
|
lambdaName: string;
|
|
@@ -90,6 +85,6 @@ export declare const startAsyncOperation: (params: {
|
|
|
90
85
|
systemBucket: string;
|
|
91
86
|
useLambdaEnvironmentVariables?: boolean;
|
|
92
87
|
startEcsTaskFunc?: () => StartEcsTaskReturnType;
|
|
93
|
-
}
|
|
88
|
+
}) => Promise<Partial<ApiAsyncOperation>>;
|
|
94
89
|
export {};
|
|
95
90
|
//# sourceMappingURL=async_operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async_operations.d.ts","sourceRoot":"","sources":["../src/async_operations.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAItC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"async_operations.d.ts","sourceRoot":"","sources":["../src/async_operations.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAItC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAS9D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAE5F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EACV,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AAYjB,aAAK,sBAAsB,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEpF,eAAO,MAAM,sBAAsB,iBACnB,MAAM,KACnB,QAAQ,OAAO,qBAAqB,CAE3B,CAAC;AAEb,eAAO,MAAM,6BAA6B,kBACzB,OAAO,qBAAqB,KAC1C,oBAAoB,EAKtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,YAAY;kCAUO,MAAM;aAC3B,MAAM;sBACG,MAAM;gBACZ,MAAM;QACd,MAAM;mBACK,MAAM;gBACT,MAAM;;4BAsCnB,CAAC;AAEF,eAAO,MAAM,oBAAoB,WACvB;IACN,YAAY,EAAE,iBAAiB,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,UAAU,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,2BAA2B,CAAA;CACpD,KACA,QAAQ,QAAQ,iBAAiB,CAAC,CAsBpC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,mBAAmB,WACtB;IACN,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4BAA4B,EAAE,MAAM,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,UAAU,CAAC;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,kBAAkB,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,gBAAgB,CAAC,EAAE,MAAM,sBAAsB,CAAA;CAChD,KACA,QAAQ,QAAQ,iBAAiB,CAAC,CAqFpC,CAAC"}
|
package/dist/async_operations.js
CHANGED
|
@@ -27,7 +27,7 @@ exports.getLambdaEnvironmentVariables = getLambdaEnvironmentVariables;
|
|
|
27
27
|
* @param {Object} params
|
|
28
28
|
* @param {string} params.asyncOperationTaskDefinition - ARN for the task definition
|
|
29
29
|
* @param {string} params.cluster - ARN for the ECS cluster to use for the task
|
|
30
|
-
* @param {string} params.
|
|
30
|
+
* @param {string} params.callerLambdaName
|
|
31
31
|
* Environment variable for Lambda name that is initiating the ECS task
|
|
32
32
|
* @param {string} params.lambdaName
|
|
33
33
|
* Environment variable for Lambda name that will be run by the ECS task
|
|
@@ -41,10 +41,9 @@ exports.getLambdaEnvironmentVariables = getLambdaEnvironmentVariables;
|
|
|
41
41
|
* @returns {Promise<Object>}
|
|
42
42
|
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ECS.html#runTask-property
|
|
43
43
|
*/
|
|
44
|
-
const startECSTask = async ({ asyncOperationTaskDefinition, cluster, callerLambdaName, lambdaName, id, payloadBucket, payloadKey, useLambdaEnvironmentVariables,
|
|
44
|
+
const startECSTask = async ({ asyncOperationTaskDefinition, cluster, callerLambdaName, lambdaName, id, payloadBucket, payloadKey, useLambdaEnvironmentVariables, }) => {
|
|
45
45
|
const envVars = [
|
|
46
46
|
{ name: 'asyncOperationId', value: id },
|
|
47
|
-
{ name: 'asyncOperationsTable', value: dynamoTableName },
|
|
48
47
|
{ name: 'lambdaName', value: lambdaName },
|
|
49
48
|
{ name: 'payloadUrl', value: `s3://${payloadBucket}/${payloadKey}` },
|
|
50
49
|
];
|
|
@@ -77,30 +76,20 @@ const startECSTask = async ({ asyncOperationTaskDefinition, cluster, callerLambd
|
|
|
77
76
|
}).promise();
|
|
78
77
|
};
|
|
79
78
|
exports.startECSTask = startECSTask;
|
|
80
|
-
const createAsyncOperation = async (params
|
|
81
|
-
const { createObject, stackName, systemBucket,
|
|
82
|
-
|
|
83
|
-
stackName
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
});
|
|
79
|
+
const createAsyncOperation = async (params) => {
|
|
80
|
+
const { createObject, stackName, systemBucket, knexConfig = process.env, esClient = await Search.es(), asyncOperationPgModel = new db_1.AsyncOperationPgModel(), } = params;
|
|
81
|
+
if (!stackName)
|
|
82
|
+
throw new TypeError('stackName is required');
|
|
83
|
+
if (!systemBucket)
|
|
84
|
+
throw new TypeError('systemBucket is required');
|
|
87
85
|
const knex = await (0, db_1.getKnexClient)({ env: knexConfig });
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return createdAsyncOperation;
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
catch (error) {
|
|
99
|
-
if (createdAsyncOperation) {
|
|
100
|
-
await asyncOperationModel.delete({ id: createdAsyncOperation.id });
|
|
101
|
-
}
|
|
102
|
-
throw error;
|
|
103
|
-
}
|
|
86
|
+
return await (0, db_1.createRejectableTransaction)(knex, async (trx) => {
|
|
87
|
+
const pgCreateObject = (0, db_1.translateApiAsyncOperationToPostgresAsyncOperation)(createObject);
|
|
88
|
+
const pgRecord = await asyncOperationPgModel.create(trx, pgCreateObject, ['*']);
|
|
89
|
+
const apiRecord = (0, db_1.translatePostgresAsyncOperationToApiAsyncOperation)(pgRecord[0]);
|
|
90
|
+
await indexAsyncOperation(esClient, apiRecord, process.env.ES_INDEX);
|
|
91
|
+
return apiRecord;
|
|
92
|
+
});
|
|
104
93
|
};
|
|
105
94
|
exports.createAsyncOperation = createAsyncOperation;
|
|
106
95
|
/**
|
|
@@ -111,26 +100,24 @@ exports.createAsyncOperation = createAsyncOperation;
|
|
|
111
100
|
* async-operation ECS task definition
|
|
112
101
|
* @param {string} params.cluster - the name of the ECS cluster
|
|
113
102
|
* @param {string} params.description - the ECS task description
|
|
114
|
-
* @param {string} params.dynamoTableName - the dynamo async operations table to
|
|
115
|
-
* write records to
|
|
116
103
|
* @param {Object} params.knexConfig - Object with Knex configuration keys
|
|
117
104
|
* @param {string} params.callerLambdaName - the name of the Lambda initiating the ECS task
|
|
118
105
|
* @param {string} params.lambdaName - the name of the Lambda task to be run
|
|
119
106
|
* @param {string} params.operationType - the type of async operation to run
|
|
120
107
|
* @param {Object|Array} params.payload - the event to be passed to the lambda task.
|
|
121
108
|
* Must be a simple Object or Array which can be converted to JSON.
|
|
122
|
-
* @param {string} params.stackName- the Cumulus stack name
|
|
123
|
-
* @param {string} params.
|
|
109
|
+
* @param {string} params.stackName - the Cumulus stack name
|
|
110
|
+
* @param {string} params.systemBucket - Cumulus system bucket to use for writing
|
|
124
111
|
* async payload objects
|
|
125
112
|
* @param {string} params.useLambdaEnvironmentVariables -
|
|
126
113
|
* useLambdaEnvironmentVariables, set 'true' if async task
|
|
127
114
|
* should import environment variables from the deployed lambda
|
|
128
|
-
* @param {
|
|
115
|
+
* @param {Object} params.startEcsTaskFunc - used for testing
|
|
129
116
|
* @returns {Promise<Object>} - an AsyncOperation record
|
|
130
117
|
* @memberof AsyncOperation
|
|
131
118
|
*/
|
|
132
|
-
const startAsyncOperation = async (params
|
|
133
|
-
const { description, operationType, payload, systemBucket, stackName,
|
|
119
|
+
const startAsyncOperation = async (params) => {
|
|
120
|
+
const { description, operationType, payload, systemBucket, stackName, callerLambdaName, knexConfig = process.env, startEcsTaskFunc = exports.startECSTask, } = params;
|
|
134
121
|
if (!callerLambdaName) {
|
|
135
122
|
throw new MissingRequiredArgument(`callerLambdaName must be specified to start new async operation, received: ${callerLambdaName}`);
|
|
136
123
|
}
|
|
@@ -175,9 +162,8 @@ const startAsyncOperation = async (params, AsyncOperation) => {
|
|
|
175
162
|
},
|
|
176
163
|
stackName,
|
|
177
164
|
systemBucket,
|
|
178
|
-
dynamoTableName,
|
|
179
165
|
knexConfig,
|
|
180
|
-
}
|
|
166
|
+
});
|
|
181
167
|
throw error;
|
|
182
168
|
}
|
|
183
169
|
logger.debug(`About to create AsyncOperation record: ${id}`);
|
|
@@ -193,9 +179,8 @@ const startAsyncOperation = async (params, AsyncOperation) => {
|
|
|
193
179
|
},
|
|
194
180
|
stackName,
|
|
195
181
|
systemBucket,
|
|
196
|
-
dynamoTableName,
|
|
197
182
|
knexConfig,
|
|
198
|
-
}
|
|
183
|
+
});
|
|
199
184
|
};
|
|
200
185
|
exports.startAsyncOperation = startAsyncOperation;
|
|
201
186
|
//# sourceMappingURL=async_operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async_operations.js","sourceRoot":"","sources":["../src/async_operations.ts"],"names":[],"mappings":";;;;;;AAGA,2DAA+D;AAE/D,
|
|
1
|
+
{"version":3,"file":"async_operations.js","sourceRoot":"","sources":["../src/async_operations.ts"],"names":[],"mappings":";;;;;;AAGA,2DAA+D;AAE/D,oCAMqB;AACrB,6DAAqC;AAErC,+BAAoC;AAQpC,MAAM,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,GAAG,OAAO,CAAC,i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