Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Deadline Repo and DocDB; Fix Integration Tests #1221

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class ServiceTier extends cdk.Stack {
version: this.version,
database: props.database,
fileSystem: props.mountableFileSystem,
repositoryInstallationTimeout: cdk.Duration.minutes(20),
repositoryInstallationTimeout: cdk.Duration.minutes(30),
repositoryInstallationPrefix: "/",
secretsManagementSettings: {
enabled: props.enableSecretsManagement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export class StorageTierDocDB extends StorageTier {
masterUser: {
username: 'adminuser',
},
engineVersion: '3.6.0',
engineVersion: '5.0.0',
backup: {
// We recommend setting the retention of your backups to 15 days
// for security reasons. The default retention is just one day.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class SEPStack extends Stack {
const repository = new Repository(this, 'Repository', {
vpc,
version: recipes.version,
repositoryInstallationTimeout: Duration.minutes(20),
repositoryInstallationTimeout: Duration.minutes(30),
// TODO - Evaluate deletion protection for your own needs. These properties are set to RemovalPolicy.DESTROY
// to cleanly remove everything when this stack is destroyed. If you would like to ensure
// that these resources are not accidentally deleted, you should set these properties to RemovalPolicy.RETAIN
Expand Down
2 changes: 1 addition & 1 deletion examples/deadline/Local-Zone/ts/lib/service-tier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class ServiceTier extends Stack {
database: RemovalPolicy.DESTROY,
filesystem: RemovalPolicy.DESTROY,
},
repositoryInstallationTimeout: Duration.minutes(20),
repositoryInstallationTimeout: Duration.minutes(30),
vpcSubnets: repositorySubnets,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class RepositoryTestingTier extends TestingTier {
'cd ~ec2-user',
'mkdir -p testScripts',
'cd testScripts',
'wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem',
'wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably call this out in the release notes / CR description too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add this in

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added mention of this to the commit notes. There's some mention of this in the CR description, since this is the code that uses the new CA cert rather than the expired 2019 one

);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ -d "$CERT" ]; then
# The domain zone for the mongo instance used is hard-coded during setup
DB_ADDRESS="mongo.renderfarm.local:27017"
else
CERT_CA="./testScripts/rds-combined-ca-bundle.pem"
CERT_CA="./testScripts/global-bundle.pem"

# DocDB contains the endpoint address to use in its secret
ENDPOINT=$(jq -r '.host' <<< "$DB_SECRET_STRING")
Expand All @@ -38,7 +38,8 @@ else

fi

# Mongo command to query for "deadline10db" database
mongo --quiet --ssl --host="$DB_ADDRESS" --sslCAFile="$CERT_CA" --username="$DB_USERNAME" --password="$DB_PASS" --eval='printjson( db.adminCommand( { listDatabases: 1, nameOnly: true, filter: { "name": "deadline10db" } } ) )'

# Mongo command to query for "deadline10db" database.
# We delete Timestamp fields from the EJSON result to avoid errors when parsing
# them in Python.
mongo --quiet --ssl --host="$DB_ADDRESS" --sslCAFile="$CERT_CA" --username="$DB_USERNAME" --password="$DB_PASS" --eval='(function(){var output=db.adminCommand({ listDatabases: 1, nameOnly: true, filter: { "name": "deadline10db" } } );delete output.onTime;delete output.operationTime;printjson(output)})()'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is getting rather long and difficult to read. Would it be possible to split it up? I think our style guide for this project recommends a line length of 120 characters.

Also, should we document why we added these delete commands?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with just leaving this given that it's a shell script, and I don't want to jeopardize some sort of weirdness by splitting up the bash command into different lines.

I can add a comment here

exit 0
2 changes: 1 addition & 1 deletion integ/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
transform: {
'^.+\\.tsx?$': 'ts-jest'
},
testTimeout: 60000,
testTimeout: 300000,
setupFilesAfterEnv: [
"<rootDir>/components/deadline/common/jest-matchers.js"
]
Expand Down
2 changes: 1 addition & 1 deletion integ/lib/storage-struct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export class StorageStruct extends Construct {
database: databaseConnection,
fileSystem: deadlineMountableEfs,
version: props.version,
repositoryInstallationTimeout: Duration.minutes(20),
repositoryInstallationTimeout: Duration.minutes(30),
logGroupProps: {
logGroupPrefix: `/${Stack.of(this).stackName}-${id}/`,
retention: RetentionDays.TWO_MONTHS,
Expand Down
Loading