-
Notifications
You must be signed in to change notification settings - Fork 1.5k
KMS Retry support #1999
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
base: main
Are you sure you want to change the base?
KMS Retry support #1999
Changes from all commits
df2a759
5bff2ae
68115e8
226b0f7
bf0140f
3f6a2ce
4a5c864
38a268f
26152ec
9dbeaa0
341efdb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -o errexit # Exit the script with error if any of the commands fail | ||
|
|
||
| # Supported/used environment variables: | ||
| # MONGODB_URI Set the suggested connection MONGODB_URI (including credentials and topology info) | ||
|
|
||
| ############################################ | ||
| # Main Program # | ||
| ############################################ | ||
| RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE:-$0}")" | ||
| . "${RELATIVE_DIR_PATH}/setup-env.bash" | ||
| echo "Running KMS Retry tests" | ||
|
|
||
| cp ${JAVA_HOME}/lib/security/cacerts mongo-truststore | ||
| ${JAVA_HOME}/bin/keytool -importcert -trustcacerts -file ${DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem -keystore mongo-truststore -storepass changeit -storetype JKS -noprompt | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
readonly KMS_TLS_CERT_PATH="${DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem"I implemented the proposed change in stIncMale@189a6d6, tested here.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good shout
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used your approach from stIncMale@189a6d6
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [informational comment] The file |
||
|
|
||
| export GRADLE_EXTRA_VARS="-Pssl.enabled=true -Pssl.trustStoreType=jks -Pssl.trustStore=`pwd`/mongo-truststore -Pssl.trustStorePassword=changeit" | ||
|
|
||
| ./gradlew -version | ||
|
|
||
| # Disable errexit so both suites run and their exit codes can be captured below. | ||
| set +o errexit | ||
|
|
||
| ./gradlew --stacktrace --info ${GRADLE_EXTRA_VARS} -Dorg.mongodb.test.uri=${MONGODB_URI} \ | ||
| -Dorg.mongodb.test.kms.retry.run="true" \ | ||
| driver-sync:cleanTest driver-sync:test --tests ClientSideEncryptionKmsRetryProseTest | ||
| first=$? | ||
| echo "sync exit code: $first" | ||
|
|
||
| ./gradlew --stacktrace --info ${GRADLE_EXTRA_VARS} -Dorg.mongodb.test.uri=${MONGODB_URI} \ | ||
| -Dorg.mongodb.test.kms.retry.run="true" \ | ||
| driver-reactive-streams:cleanTest driver-reactive-streams:test --tests ClientSideEncryptionKmsRetryProseTest | ||
| second=$? | ||
| echo "reactive exit code: $second" | ||
|
|
||
| if [ $first -ne 0 ]; then | ||
| exit $first | ||
| elif [ $second -ne 0 ]; then | ||
| exit $second | ||
| else | ||
| exit 0 | ||
| fi | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes in this file are all CSOT-related, and @dariakp confirmed that we should not do any more CSOT-related work (except for removing CSOT, or making sure the code still compiles and works). Thus, I think we should remove all the CSOT-related changes from the PR, including CSOT-related tests in
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm going to keep them in for now - again we haven't removed CSOT yet and the process of removing it is not set. Eg. deprecation for a major release before another major release or straight removal as its alpha |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[informational comment]
This function runs
${DRIVERS_TOOLS}/.evergreen/csfle/setup.sh, which starts the KMS failpoint server required by the prose test. One can see that${DRIVERS_TOOLS}/.evergreen/csfle/setup.shindeed starts it at https://github.com/mongodb-labs/drivers-evergreen-tools/blob/18aed4f176dab1ed505c9a2a53466ddf3f4796ec/.evergreen/csfle/start-servers.sh#L70-L74: