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

[AD-1017] Implement single-instance SSH tunnel. #453

Merged
merged 29 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8defee1
[AD-1017] Implement single-instance SSH tunnel.
Dec 6, 2022
832f60b
[AD-1017] Attempt to debug multi-process test.
Dec 6, 2022
b03a8f1
[AD-1017] Attempt to debug multi-process test.
Dec 7, 2022
5ba2566
[AD-1017] Attempt to debug multi-process test - #3.
Dec 7, 2022
99bfe35
Commit Code Coverage Badge
birschick-bq Dec 7, 2022
b41d16d
[AD-1017] Attempt to find correct location for test source file.
Dec 7, 2022
4e63d3b
Merge branch 'birschick-bq/ad-1017/ssh-tunnel' of https://github.com/…
Dec 7, 2022
92cbd58
[AD-1017] Attempt to find correct location for test source file - #2.
Dec 7, 2022
b97ea23
[AD-1017] Fix spotBugs error; code review improvements.
Dec 7, 2022
0c937e3
[AD-1017] Ignore IO exceptions when reading spawned processes.
Dec 7, 2022
4040c19
Commit Code Coverage Badge
birschick-bq Dec 7, 2022
4f3a7dd
[AD-1017] Update dependency for mongo to 4.8.1
Dec 8, 2022
4284bb4
Merge branch 'birschick-bq/ad-1017/ssh-tunnel' of https://github.com/…
Dec 8, 2022
23c7a27
Commit Code Coverage Badge
birschick-bq Dec 8, 2022
775cc67
Merge branch 'develop' into birschick-bq/ad-1017/ssh-tunnel
Dec 13, 2022
8ce5bf4
[AD-1017] Attempt improve stability of SSH Tunnel client tests.
Dec 14, 2022
8b5f393
[AD-1017] Attempt improve stability of multiprocess connection test.
Dec 14, 2022
ee29d7a
Commit Code Coverage Badge
birschick-bq Dec 14, 2022
5fa730e
Update src/main/java/software/amazon/documentdb/jdbc/DocumentDbConnec…
Dec 16, 2022
6700c1e
Merge branch 'develop' into birschick-bq/ad-1017/ssh-tunnel
Dec 16, 2022
c89830e
[AD-1017] Properly rename parameter.
Dec 16, 2022
757ac5b
Commit Code Coverage Badge
birschick-bq Dec 16, 2022
4ecf3a8
[AD-1017] Fix issue with output not being sent to the console (i.e., …
Dec 16, 2022
bc4bacd
Merge branch 'birschick-bq/ad-1017/ssh-tunnel' of https://github.com/…
Dec 16, 2022
eef5271
Commit Code Coverage Badge
birschick-bq Dec 16, 2022
a3b1ed2
[AD-1017] Attempt to increase code coverage.
Dec 16, 2022
b919669
Merge branch 'birschick-bq/ad-1017/ssh-tunnel' of https://github.com/…
Dec 16, 2022
173e8a4
[AD-1017] Fix style issue.
Dec 16, 2022
a2e5675
Commit Code Coverage Badge
birschick-bq Dec 16, 2022
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
2 changes: 1 addition & 1 deletion .github/badges/branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/badges/jacoco.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ Package Artifact: https://repo.maven.apache.org/maven2/com/google/protobuf/proto
Package Artifact: https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.6.1/protobuf-java-3.6.1-sources.jar
Package Artifact: https://github.com/google/protobuf.git
-----------------------
Package ID: com.jcraft:jsch:0.1.55
Package Homepage: http://www.jcraft.com/jsch/
Package ID: com.github.mwiede:jsch:0.2.4
Package Homepage: https://github.com/mwiede/jsch
Package SPDX-License-Identifier: BSD-3-Clause
Package Artifact: https://repo.maven.apache.org/maven2/com/jcraft/jsch/0.1.55/jsch-0.1.55.jar
Package Artifact: https://repo.maven.apache.org/maven2/com/jcraft/jsch/0.1.55/jsch-0.1.55-sources.jar
Package Artifact: http://git.jcraft.com/jsch.git
Package Artifact: https://repo.maven.org/maven2/com/github/mwiede/jsch/0.2.4/jsch-0.2.4.jar
Package Artifact: https://repo.maven.org/maven2/com/github/mwiede/jsch/0.2.4/jsch-0.2.4-sources.jar
Package Artifact: https://github.com/mwiede/jsch.git
-----------------------
Package ID: org.codehaus.janino:commons-compiler:3.1.6
Package Homepage: http://janino-compiler.github.io/commons-compiler/
Expand Down Expand Up @@ -16570,7 +16570,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------

com.jcraft/jsch/0.1.55 LICENSE
github.com/mwiede/jsch/0.2.4 LICENSE

JSch 0.0.* was released under the GNU LGPL license. Later, we have switched
over to a BSD-style license.
Expand Down
31 changes: 20 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'com.github.spotbugs' version '5.0.10'
id 'com.github.spotbugs' version '5.0.13'
id 'checkstyle'
id 'jacoco'
id 'com.github.hierynomus.license' version '0.16.1'
Expand Down Expand Up @@ -92,7 +92,7 @@ shadowJar {
minimize {
exclude(dependency('org.apache.calcite::'))
exclude(dependency('org.slf4j.*::'))
exclude(dependency('com.jcraft::'))
exclude(dependency('com.github.mwiede::'))
birschick-bq marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down Expand Up @@ -145,24 +145,32 @@ spotbugsMain {
// Configure HTML report
reports {
xml {
enabled = true
required.set(true)
destination = file("$buildDir/reports/spotbugs/main.xml")
}
html {
required.set(true)
destination = file("$buildDir/reports/spotbugs/main.html")
}
}
}
spotbugsTest {
// Configure HTML report
reports {
xml {
enabled = true
required.set(true)
destination = file("$buildDir/reports/spotbugs/test.xml")
}
html {
required.set(true)
destination = file("$buildDir/reports/spotbugs/test.html")
}
}
}

task checkSpotBugsMainReport {
doLast {
def xmlReport = spotbugsMain.reports.getByName("XML")
def xmlReport = spotbugsMain.reports.getByName("xml")
def slurped = new groovy.xml.XmlSlurper().parse(xmlReport.destination)
def bugsFound = slurped.BugInstance.size()
slurped.BugInstance.each {
Expand All @@ -179,7 +187,7 @@ task checkSpotBugsMainReport {

task checkSpotBugsTestReport {
doLast {
def xmlReport = spotbugsTest.reports.getByName("XML")
def xmlReport = spotbugsTest.reports.getByName("xml")
def slurped = new XmlSlurper().parse(xmlReport.destination)
def bugsFound = slurped.BugInstance.size()
slurped.BugInstance.each {
Expand Down Expand Up @@ -320,13 +328,14 @@ dependencies {
implementation group: 'com.google.guava', name: 'guava', version: '31.1-jre'
implementation group: 'org.slf4j', name: 'slf4j-log4j12', version: '2.0.5'
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.10.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.19.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.19.0'
implementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.7.2'
implementation group: 'com.jcraft', name: 'jsch', version: '0.1.55'
implementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.8.1'
implementation group: 'com.github.mwiede', name: 'jsch', version: '0.2.4'
implementation group: 'org.apache.calcite', name: 'calcite-core', version: '1.32.0'
implementation group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.4'
implementation 'io.github.hakky54:sslcontext-kickstart:7.4.7'
implementation 'io.github.hakky54:sslcontext-kickstart:7.4.8'

compileOnly group: 'org.immutables', name: 'value', version: '2.9.2'
compileOnly group: 'com.puppycrawl.tools', name: 'checkstyle', version: '10.5.0'
Expand All @@ -339,7 +348,7 @@ dependencies {
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.9.1'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.9.1'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.8.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.9.0'
testRuntimeOnly group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '3.5.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-api:5.9.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
Expand All @@ -350,7 +359,7 @@ dependencies {
testFixturesCompileOnly group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '3.5.3'
testFixturesCompileOnly 'org.junit.jupiter:junit-jupiter-api:5.9.1'
testFixturesImplementation group: 'com.google.guava', name: 'guava', version: '29.0-jre'
testFixturesImplementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.7.2'
testFixturesImplementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.8.1'
testFixturesImplementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.2'
testFixturesImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.2'
}
Expand Down
8 changes: 7 additions & 1 deletion config/spotbugs/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,20 @@
<Bug pattern="ODR_OPEN_DATABASE_RESOURCE"/>
</Match>
<Match>
<Source name="Driver.java"/>
<Or>
<Source name="Driver.java"/>
<Source name="DocumentDbSshTunnelServer.java"/>
</Or>
<Bug pattern="COMMAND_INJECTION"/>
</Match>
<Match>
<Or>
<Source name="DocumentDbConnectionProperties.java"/>
<Source name="DocumentDbConnectionPropertiesTest.java"/>
<Source name="DocumentDbMain.java"/>
<Source name="DocumentDbSshTunnelLock.java"/>
<Source name="DocumentDbSshTunnelServer.java"/>
<Source name="DocumentDbSshTunnelService.java"/>
</Or>
<Bug pattern="PATH_TRAVERSAL_IN"/>
</Match>
Expand Down
Loading