Skip to content

Commit e6206b6

Browse files
Aryexolivrlee
authored andcommitted
Fixed CVE-2022-25647 by updating Looker Kotlin SDK jar
- Updated kotlin sdk jar to latest version and uses gson 2.10.1 - Added some documentations on looker SDK. - Added generated /bin to gitignore
1 parent 06461e8 commit e6206b6

5 files changed

Lines changed: 17 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ settings.xml
2323
/target/
2424
/*/target/
2525
/shaded/*/target/
26+
/bin/
27+
/*/bin/

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ allprojects {
200200
dependencies {
201201
"implementation"(platform(project(":bom")))
202202
// Add the locally bundled LookerSDK fat jar
203-
"implementation"(files("../libs/looker-kotlin-sdk-a48011f.jar"))
203+
"implementation"(files("../libs/looker-kotlin-sdk-100e3c9.jar"))
204204
}
205205
}
206206
if (!skipAutostyle) {

core/src/main/java/org/apache/calcite/avatica/remote/looker/LookerSdkFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ public static String queryEndpoint(Long id) {
7575
/**
7676
* Makes the SDK call and throws any errors as runtime exceptions
7777
*/
78+
@SuppressWarnings("deprecation")
7879
public static <T> T safeSdkCall(LookerSDKCall sdkCall) {
7980
try {
81+
// ok() is deprecated and the suggested Kotlin alternative is not compatible with Java.
82+
// We suppress warning to get pass compilation.
8083
return ok(sdkCall.call());
8184
} catch (Error e) {
8285
SDKErrorInfo error = parseSDKError(e.toString());

looker.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ to publish it in your `~/.m2/` local repository,
3737
then enable the local repo in Calcite by un-commenting the line `enableMavenLocal=true`
3838
in Calcite's `gradle.properties`, and pick the version of Avatica you just built.
3939

40+
### Looker Kotlin SDK
41+
The driver uses Looker Kotlin SDK to interact with Looker's API. Unfortunately the
42+
Kotlin SDK in community support mode so no official releases are available through
43+
package managers.
44+
45+
We import the SDK using a pre-built fat jar under `libs/` folder. To build the SDK,
46+
clone the [repo](https://github.com/looker-open-source/sdk-codegen) and follow the instructions.
47+
Make sure that the fat jar targets Java 8.
48+
49+
The SDK's was built from this [commit](https://github.com/looker-open-source/sdk-codegen/commit/68223e3b4387f985687fbe54ff70e237ae41d266).
50+
4051
## Release
4152

4253
Release will have a name like `1.21.1-looker` (if the most

0 commit comments

Comments
 (0)