Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix: explicitly pin neptune engine version to 1.2.0.1 (#962)
Browse files Browse the repository at this point in the history
* fix: explicitly pin neptune version to 1.2.0.1

* chore: self mutation

Signed-off-by: github-actions <[email protected]>

Signed-off-by: github-actions <[email protected]>
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
zxkane and github-actions authored Nov 20, 2022
1 parent b652f6e commit bad5114
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 50 deletions.
12 changes: 6 additions & 6 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const cdkAlphaDeps = [
'@aws-cdk/aws-glue-alpha',
'@aws-cdk/aws-lambda-python-alpha',
'@aws-cdk/aws-neptune-alpha',
].map(dep => `${dep}@2.0.0-alpha.11`);
].map(dep => `${dep}@^2.51.1-alpha.0`);
const awsSDKDeps = [
'@aws-sdk/client-glue',
'@aws-sdk/client-secrets-manager',
Expand Down
12 changes: 6 additions & 6 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions src/lib/dashboard-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
HttpMethod,
HttpStage,
} from '@aws-cdk/aws-apigatewayv2-alpha';
import { LambdaProxyIntegration } from '@aws-cdk/aws-apigatewayv2-integrations-alpha';
import { HttpLambdaIntegration } from '@aws-cdk/aws-apigatewayv2-integrations-alpha';
import {
GraphqlApi,
Schema,
Expand Down Expand Up @@ -538,7 +538,7 @@ export class TransactionDashboardStack extends NestedStack {
'GeneratorStartIntegration',
{
apiId: httpApi.httpApiId,
integrationType: HttpIntegrationType.LAMBDA_PROXY,
integrationType: HttpIntegrationType.AWS_PROXY,
integrationSubtype: 'StepFunctions-StartExecution',
connectionType: HttpConnectionType.INTERNET,
credentialsArn: apiRole.roleArn,
Expand Down Expand Up @@ -595,8 +595,7 @@ export class TransactionDashboardStack extends NestedStack {
},
],
});
const tokenFnIntegration = new LambdaProxyIntegration({
handler: tokenFn,
const tokenFnIntegration = new HttpLambdaIntegration('TokenInteg', tokenFn, {
payloadFormatVersion: PayloadFormatVersion.VERSION_2_0,
});
httpApi.addRoutes({
Expand Down
5 changes: 4 additions & 1 deletion src/lib/stack.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClusterParameterGroup, ParameterGroup, DatabaseCluster, InstanceType, IDatabaseCluster } from '@aws-cdk/aws-neptune-alpha';
import { ClusterParameterGroup, ParameterGroup, DatabaseCluster, InstanceType, IDatabaseCluster, EngineVersion, ParameterGroupFamily } from '@aws-cdk/aws-neptune-alpha';
import { RemovalPolicy, Stack, StackProps, Duration, CfnParameter, CfnOutput, CfnResource } from 'aws-cdk-lib';
import { GatewayVpcEndpointAwsService, Vpc, FlowLogDestination, SubnetType, IVpc, SecurityGroup } from 'aws-cdk-lib/aws-ec2';
import { Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam';
Expand Down Expand Up @@ -177,13 +177,15 @@ export class FraudDetectionStack extends Stack {
neptune_enable_audit_log: '1',
neptune_streams: '1',
},
family: ParameterGroupFamily.NEPTUNE_1_2,
});

const dbParams = new ParameterGroup(this, 'DBParamGroup', {
description: 'Neptune DB Param Group',
parameters: {
neptune_query_timeout: '600000',
},
family: ParameterGroupFamily.NEPTUNE_1_2,
});

const neptuneRole = new Role(this, 'NeptuneBulkLoadRole', {
Expand Down Expand Up @@ -224,6 +226,7 @@ export class FraudDetectionStack extends Stack {
removalPolicy: RemovalPolicy.DESTROY,
backupRetention: Duration.days(7),
securityGroups: [graphDBSG],
engineVersion: new EngineVersion('1.2.0.1'),
});
graphDBCluster.node.findAll().filter(c => (c as CfnDBInstance).cfnOptions)
.forEach(c => (c as CfnDBInstance).autoMinorVersionUpgrade = true);
Expand Down
7 changes: 6 additions & 1 deletion test/stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,16 @@ describe('fraud detection stack test suite', () => {
test('Neptune cluster and dbs created', () => {

Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBClusterParameterGroup', {
Family: 'neptune1',
Family: 'neptune1.2',
Parameters: {
neptune_enable_audit_log: '1',
},
});

Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBParameterGroup', {
Family: 'neptune1.2',
});

Template.fromStack(stack).hasResource('AWS::Neptune::DBCluster', {
Properties: {
AssociatedRoles: [
Expand All @@ -116,6 +120,7 @@ describe('fraud detection stack test suite', () => {
Port: 8182,
BackupRetentionPeriod: 7,
StorageEncrypted: true,
EngineVersion: '1.2.0.1',
VpcSecurityGroupIds: [
{
'Fn::GetAtt': [
Expand Down
2 changes: 0 additions & 2 deletions test/training-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ describe('training stack test suite', () => {
Statement: [
{
Action: [
'glue:BatchDeletePartition',
'glue:BatchGetPartition',
'glue:GetPartition',
'glue:GetPartitions',
Expand Down Expand Up @@ -692,7 +691,6 @@ describe('training stack test suite', () => {
},
{
Action: [
'glue:BatchDeletePartition',
'glue:BatchGetPartition',
'glue:GetPartition',
'glue:GetPartitions',
Expand Down
48 changes: 24 additions & 24 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bad5114

Please sign in to comment.