@orcabus/platform-cdk-constructs 0.0.45 → 0.0.47
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/.jsii +2 -2
- package/api-gateway/api-gateway.js +1 -1
- package/deployment-stack-pipeline/artifact-bucket.js +1 -1
- package/deployment-stack-pipeline/pipeline.js +1 -1
- package/dynamodb/index.js +2 -2
- package/ecs/index.js +1 -1
- package/lambda/index.js +1 -1
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/data_sharing/__init__.py +9 -0
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/data_sharing/models.py +14 -1
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/data_sharing/query_helpers.py +32 -0
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/data_sharing/update_helpers.py +3 -3
- package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/fastq_decompression/models.py +14 -1
- package/monitored-queue/index.js +1 -1
- package/named-lambda-role/index.js +1 -1
- package/package.json +1 -1
- package/provider-function/index.js +1 -1
- package/shared-config/networking.js +2 -2
- package/shared-config/slack.js +1 -1
package/.jsii
CHANGED
|
@@ -6756,6 +6756,6 @@
|
|
|
6756
6756
|
"symbolId": "shared-config/slack:SlackAlerts"
|
|
6757
6757
|
}
|
|
6758
6758
|
},
|
|
6759
|
-
"version": "0.0.
|
|
6760
|
-
"fingerprint": "
|
|
6759
|
+
"version": "0.0.47",
|
|
6760
|
+
"fingerprint": "efnw8JJpfwVcImj5oidEElmBzpYb6UgaPKxmvh9hB9k="
|
|
6761
6761
|
}
|
|
@@ -15,7 +15,7 @@ const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
|
|
|
15
15
|
const aws_route53_targets_1 = require("aws-cdk-lib/aws-route53-targets");
|
|
16
16
|
const config_1 = require("./config");
|
|
17
17
|
class OrcaBusApiGateway extends constructs_1.Construct {
|
|
18
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.apigateway.OrcaBusApiGateway", version: "0.0.
|
|
18
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.apigateway.OrcaBusApiGateway", version: "0.0.47" };
|
|
19
19
|
/**
|
|
20
20
|
* The AWS region where the API Gateway is deployed.
|
|
21
21
|
*/
|
|
@@ -13,7 +13,7 @@ exports.CROSS_DEPLOYMENT_ARTIFACT_BUCKET_NAME = "orcabus-cross-deployment-codepi
|
|
|
13
13
|
exports.CROSS_DEPLOYMENT_ARTIFACT_KMS_ALIAS = "orcabus-cross-deployment-codepipeline-artifact";
|
|
14
14
|
exports.CROSS_DEPLOYMENT_ARTIFACT_KMS_ARN_SSM_PARAMETER_NAME = "/orcabus/deployment-stack-pipeline/artifact-bucket/kms-key-arn";
|
|
15
15
|
class CrossDeploymentArtifactBucket extends constructs_1.Construct {
|
|
16
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.deploymentPipeline.CrossDeploymentArtifactBucket", version: "0.0.
|
|
16
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.deploymentPipeline.CrossDeploymentArtifactBucket", version: "0.0.47" };
|
|
17
17
|
/**
|
|
18
18
|
* The S3 bucket used to store artifacts for cross-deployment pipelines.
|
|
19
19
|
*/
|
|
@@ -32,7 +32,7 @@ exports.DEFAULT_SYNTH_STEP_PARTIAL_BUILD_SPEC = {
|
|
|
32
32
|
* before using this construct.
|
|
33
33
|
*/
|
|
34
34
|
class DeploymentStackPipeline extends constructs_1.Construct {
|
|
35
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.deploymentPipeline.DeploymentStackPipeline", version: "0.0.
|
|
35
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.deploymentPipeline.DeploymentStackPipeline", version: "0.0.47" };
|
|
36
36
|
/**
|
|
37
37
|
* The code pipeline construct that is created.
|
|
38
38
|
*/
|
package/dynamodb/index.js
CHANGED
|
@@ -40,7 +40,7 @@ const dynamodb = __importStar(require("aws-cdk-lib/aws-dynamodb"));
|
|
|
40
40
|
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
41
41
|
const config_1 = require("./config");
|
|
42
42
|
class DynamoDbPartitionedConstruct extends constructs_1.Construct {
|
|
43
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.dynamodb.DynamoDbPartitionedConstruct", version: "0.0.
|
|
43
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.dynamodb.DynamoDbPartitionedConstruct", version: "0.0.47" };
|
|
44
44
|
table;
|
|
45
45
|
constructor(scope, id, props) {
|
|
46
46
|
super(scope, id);
|
|
@@ -75,7 +75,7 @@ class DynamoDbPartitionedConstruct extends constructs_1.Construct {
|
|
|
75
75
|
}
|
|
76
76
|
exports.DynamoDbPartitionedConstruct = DynamoDbPartitionedConstruct;
|
|
77
77
|
class DynamoDbNonPartitionedConstruct extends constructs_1.Construct {
|
|
78
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.dynamodb.DynamoDbNonPartitionedConstruct", version: "0.0.
|
|
78
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.dynamodb.DynamoDbNonPartitionedConstruct", version: "0.0.47" };
|
|
79
79
|
table;
|
|
80
80
|
constructor(scope, id, props) {
|
|
81
81
|
super(scope, id);
|
package/ecs/index.js
CHANGED
|
@@ -55,7 +55,7 @@ exports.LAMBDA_ARCHITECTURE_MAP = {
|
|
|
55
55
|
['ARM64']: lambda.Architecture.ARM_64
|
|
56
56
|
};
|
|
57
57
|
class EcsFargateTaskConstruct extends constructs_1.Construct {
|
|
58
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.ecs.EcsFargateTaskConstruct", version: "0.0.
|
|
58
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.ecs.EcsFargateTaskConstruct", version: "0.0.47" };
|
|
59
59
|
cluster;
|
|
60
60
|
taskDefinition;
|
|
61
61
|
taskExecutionRole;
|
package/lambda/index.js
CHANGED
|
@@ -56,7 +56,7 @@ function getPythonUvDockerImage() {
|
|
|
56
56
|
return aws_cdk_lib_1.DockerImage.fromBuild(path_1.default.join(__dirname, 'build_python'));
|
|
57
57
|
}
|
|
58
58
|
class PythonUvFunction extends aws_lambda_python_alpha_1.PythonFunction {
|
|
59
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.lambda.PythonUvFunction", version: "0.0.
|
|
59
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.lambda.PythonUvFunction", version: "0.0.47" };
|
|
60
60
|
// Class constructs, to be used for caching the layers
|
|
61
61
|
// This means that if there are multiple lambdas throughout the stack
|
|
62
62
|
// They will all use the same layer
|
|
@@ -59,12 +59,21 @@ def data_sharing_post_request(
|
|
|
59
59
|
)
|
|
60
60
|
|
|
61
61
|
|
|
62
|
+
from .query_helpers import (
|
|
63
|
+
get_package,
|
|
64
|
+
get_push_job
|
|
65
|
+
)
|
|
66
|
+
|
|
62
67
|
from .update_helpers import (
|
|
63
68
|
update_package_status,
|
|
64
69
|
update_push_job_status,
|
|
65
70
|
)
|
|
66
71
|
|
|
67
72
|
__all__ = [
|
|
73
|
+
# Get helpers
|
|
74
|
+
"get_package",
|
|
75
|
+
"get_push_job",
|
|
76
|
+
# Push job helpers
|
|
68
77
|
"update_package_status",
|
|
69
78
|
"update_push_job_status",
|
|
70
79
|
]
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from datetime import datetime
|
|
1
2
|
from typing import Literal, TypedDict, NotRequired, Union
|
|
2
3
|
|
|
3
4
|
PackageStatusType = Literal[
|
|
@@ -17,7 +18,7 @@ PushJobStatusType = Literal[
|
|
|
17
18
|
]
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
class
|
|
21
|
+
class PackageObjectDict(TypedDict):
|
|
21
22
|
id: str
|
|
22
23
|
packageName: str
|
|
23
24
|
stepsExecutionArn: str
|
|
@@ -27,6 +28,18 @@ class PackageObject(TypedDict):
|
|
|
27
28
|
hasExpired: NotRequired[bool]
|
|
28
29
|
|
|
29
30
|
|
|
31
|
+
class PushJobObjectDict(TypedDict):
|
|
32
|
+
id: str
|
|
33
|
+
stepFunctionsExecutionArn: str
|
|
34
|
+
status: PushJobStatusType
|
|
35
|
+
startTime: str
|
|
36
|
+
packageId: str
|
|
37
|
+
shareDestination: str
|
|
38
|
+
logUri: NotRequired[str]
|
|
39
|
+
endTime: NotRequired[str]
|
|
40
|
+
errorMessages: NotRequired[str]
|
|
41
|
+
|
|
42
|
+
|
|
30
43
|
class JobPatchParameters(TypedDict):
|
|
31
44
|
status: Union[PackageStatusType, PushJobStatusType]
|
|
32
45
|
errorMessage: NotRequired[str]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from .globals import PACKAGE_ENDPOINT, PUSH_ENDPOINT
|
|
3
|
+
from .models import PackageObjectDict, PushJobObjectDict
|
|
4
|
+
from . import get_data_sharing_request
|
|
5
|
+
|
|
6
|
+
def get_package(
|
|
7
|
+
package_id: str,
|
|
8
|
+
) -> PackageObjectDict:
|
|
9
|
+
"""
|
|
10
|
+
Add QC stats to a fastq_id.
|
|
11
|
+
|
|
12
|
+
:param package_id: The package id
|
|
13
|
+
:param kwargs: JobPatchParameters to update the package with.
|
|
14
|
+
"""
|
|
15
|
+
return get_data_sharing_request(
|
|
16
|
+
f"{PACKAGE_ENDPOINT}/{package_id}"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def get_push_job(
|
|
21
|
+
push_job_id: str,
|
|
22
|
+
) -> PushJobObjectDict:
|
|
23
|
+
"""
|
|
24
|
+
Add push job status to a push job.
|
|
25
|
+
|
|
26
|
+
:param push_job_id: The push job id
|
|
27
|
+
:param push_job_status: The push job status to set
|
|
28
|
+
:param error_message: Optional error message
|
|
29
|
+
"""
|
|
30
|
+
return get_data_sharing_request(
|
|
31
|
+
f"{PUSH_ENDPOINT}/{push_job_id}",
|
|
32
|
+
)
|
package/lambda/layers/orcabus_api_tools/src/orcabus_api_tools/data_sharing/update_helpers.py
CHANGED
|
@@ -2,13 +2,13 @@ from typing import Unpack
|
|
|
2
2
|
|
|
3
3
|
from . import data_sharing_patch_request
|
|
4
4
|
from .globals import PACKAGE_ENDPOINT, PUSH_ENDPOINT
|
|
5
|
-
from .models import
|
|
5
|
+
from .models import PackageObjectDict, JobPatchParameters, PushJobObjectDict
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def update_package_status(
|
|
9
9
|
package_id: str,
|
|
10
10
|
**kwargs: Unpack[JobPatchParameters]
|
|
11
|
-
) ->
|
|
11
|
+
) -> PackageObjectDict:
|
|
12
12
|
"""
|
|
13
13
|
Add QC stats to a fastq_id.
|
|
14
14
|
|
|
@@ -32,7 +32,7 @@ def update_package_status(
|
|
|
32
32
|
def update_push_job_status(
|
|
33
33
|
push_job_id: str,
|
|
34
34
|
**kwargs: Unpack[JobPatchParameters]
|
|
35
|
-
) ->
|
|
35
|
+
) -> PushJobObjectDict:
|
|
36
36
|
"""
|
|
37
37
|
Add push job status to a push job.
|
|
38
38
|
|
|
@@ -49,10 +49,16 @@ class RawMd5sumCalculationOutputsFastqId(TypedDict):
|
|
|
49
49
|
rawMd5sumByOraFileIngestIdList: List[RawMd5sumCalculationOutputsObjectItem]
|
|
50
50
|
|
|
51
51
|
|
|
52
|
+
class ReadCountCalculationOutputsFastqId(TypedDict):
|
|
53
|
+
fastqId: str
|
|
54
|
+
readCount: int
|
|
55
|
+
|
|
56
|
+
|
|
52
57
|
class DecompressionJobOutputObject(TypedDict):
|
|
53
58
|
# Decompressed file URI by ORA file ingest ID list
|
|
54
59
|
decompressedFileList: List[DecompressionJobOutputObjectFastqId]
|
|
55
60
|
|
|
61
|
+
|
|
56
62
|
class GzipFileSizeCalculationOutputObject(TypedDict):
|
|
57
63
|
# Gzip file size by ORA file ingest ID list
|
|
58
64
|
gzipFileSizeList: List[GzipFileSizeCalculationOutputsFastqId]
|
|
@@ -63,10 +69,16 @@ class RawMd5sumCalculationOutputObject(TypedDict):
|
|
|
63
69
|
rawMd5sumList: List[RawMd5sumCalculationOutputsFastqId]
|
|
64
70
|
|
|
65
71
|
|
|
72
|
+
class ReadCountCalculationOutputObject(TypedDict):
|
|
73
|
+
# Raw md5sum by ORA file ingest ID list
|
|
74
|
+
readCountList: List[ReadCountCalculationOutputsFastqId]
|
|
75
|
+
|
|
76
|
+
|
|
66
77
|
JobOutputType = Union[
|
|
67
78
|
DecompressionJobOutputObject |
|
|
68
79
|
GzipFileSizeCalculationOutputObject |
|
|
69
|
-
RawMd5sumCalculationOutputObject
|
|
80
|
+
RawMd5sumCalculationOutputObject |
|
|
81
|
+
ReadCountCalculationOutputObject
|
|
70
82
|
]
|
|
71
83
|
|
|
72
84
|
class Job(TypedDict):
|
|
@@ -86,6 +98,7 @@ class JobCreateParameters(TypedDict):
|
|
|
86
98
|
maxReads: NotRequired[int]
|
|
87
99
|
outputUriPrefix: NotRequired[str]
|
|
88
100
|
sampling: NotRequired[bool]
|
|
101
|
+
noSplitByLane: NotRequired[bool]
|
|
89
102
|
|
|
90
103
|
|
|
91
104
|
class JobQueryParameters(TypedDict):
|
package/monitored-queue/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const aws_cloudwatch_actions_1 = require("aws-cdk-lib/aws-cloudwatch-actions");
|
|
|
13
13
|
* SNS topic.
|
|
14
14
|
*/
|
|
15
15
|
class MonitoredQueue extends constructs_1.Construct {
|
|
16
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.monitoredQueue.MonitoredQueue", version: "0.0.
|
|
16
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.monitoredQueue.MonitoredQueue", version: "0.0.47" };
|
|
17
17
|
queue;
|
|
18
18
|
deadLetterQueue;
|
|
19
19
|
alarm;
|
|
@@ -7,7 +7,7 @@ const aws_iam_1 = require("aws-cdk-lib/aws-iam");
|
|
|
7
7
|
* A construct which represents a named role that a Lambda function can assume.
|
|
8
8
|
*/
|
|
9
9
|
class NamedLambdaRole extends aws_iam_1.Role {
|
|
10
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.namedLambdaRole.NamedLambdaRole", version: "0.0.
|
|
10
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.namedLambdaRole.NamedLambdaRole", version: "0.0.47" };
|
|
11
11
|
constructor(scope, id, props) {
|
|
12
12
|
super(scope, id, {
|
|
13
13
|
assumedBy: new aws_iam_1.ServicePrincipal("lambda.amazonaws.com"),
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
|
15
15
|
* to the provider framework.
|
|
16
16
|
*/
|
|
17
17
|
class ProviderFunction extends constructs_1.Construct {
|
|
18
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.provider.ProviderFunction", version: "0.0.
|
|
18
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.provider.ProviderFunction", version: "0.0.47" };
|
|
19
19
|
_function;
|
|
20
20
|
_response;
|
|
21
21
|
constructor(scope, id, props) {
|
|
@@ -23,7 +23,7 @@ exports.VPC_LOOKUP_PROPS = {
|
|
|
23
23
|
* Helper for looking up the shared OrcaBus VPC.
|
|
24
24
|
*/
|
|
25
25
|
class OrcaBusVpc {
|
|
26
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.networking.OrcaBusVpc", version: "0.0.
|
|
26
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.networking.OrcaBusVpc", version: "0.0.47" };
|
|
27
27
|
/**
|
|
28
28
|
* The shared VPC that is used by OrcaBus.
|
|
29
29
|
* @param scope
|
|
@@ -42,7 +42,7 @@ exports.SHARED_SECURITY_GROUP_NAME = "OrcaBusSharedComputeSecurityGroup";
|
|
|
42
42
|
* Helper for looking up the shared compute security group by name.
|
|
43
43
|
*/
|
|
44
44
|
class OrcaBusSharedComputeSecurityGroup {
|
|
45
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.networking.OrcaBusSharedComputeSecurityGroup", version: "0.0.
|
|
45
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.networking.OrcaBusSharedComputeSecurityGroup", version: "0.0.47" };
|
|
46
46
|
/**
|
|
47
47
|
* The shared security group that is used by compute resources to access the database.
|
|
48
48
|
* @param scope
|
package/shared-config/slack.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.SLACK_ALERTS_SNS_TOPIC = "AwsChatBotTopic-alerts";
|
|
|
11
11
|
* A helper class to construct the arn for the slack SNS topic.
|
|
12
12
|
*/
|
|
13
13
|
class SlackAlerts {
|
|
14
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.slack.SlackAlerts", version: "0.0.
|
|
14
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@orcabus/platform-cdk-constructs.sharedConfig.slack.SlackAlerts", version: "0.0.47" };
|
|
15
15
|
/**
|
|
16
16
|
* Format the ARN for the slack alerts SNS topic for the current stack.
|
|
17
17
|
* @param stack
|