You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by bo...@apache.org on 2023/01/29 06:58:33 UTC
[kyuubi] branch master updated: [KYUUBI #4206] Bump scalafmt from 3.6.1 to 3.7.1
This is an automated email from the ASF dual-hosted git repository.
bowenliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 8e9160190 [KYUUBI #4206] Bump scalafmt from 3.6.1 to 3.7.1
8e9160190 is described below
commit 8e916019098b35b8e5bd25d7be51346951b55af8
Author: liangbowen <li...@gf.com.cn>
AuthorDate: Sun Jan 29 14:57:29 2023 +0800
[KYUUBI #4206] Bump scalafmt from 3.6.1 to 3.7.1
### _Why are the changes needed?_
- Bump scalafmt from 3.6.1 to 3.7.1, release notes: https://github.com/scalameta/scalafmt/releases/tag/v3.7.1
- Changes to existing code seem coming from the dependency bump of scalameta 4.7.x in scalafmt 3.7.0+ (https://github.com/scalameta/scalafmt/releases/tag/v3.7.0) used for parsing scala code and looking up the nested constructor usages.
- Notice: `spotless-maven-plugin` is now pinned on 2.30.0 as from 2.31.0 requiring Java 11+, and 2.31.0 is using `scalafmt` 3.7.1 by default, see (https://github.com/diffplug/spotless/blob/main/plugin-maven/CHANGES.md#2310---2023-01-26)
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #4206 from bowenliang123/scalafmt-3.7.1.
Closes #4206
fd7f498e [liangbowen] bump scalafmt from 3.6.1 to 3.7.1
Authored-by: liangbowen <li...@gf.com.cn>
Signed-off-by: liangbowen <li...@gf.com.cn>
---
.scalafmt.conf | 2 +-
.../org/apache/kyuubi/server/api/v1/AdminResource.scala | 12 ++++--------
.../org/apache/kyuubi/server/api/v1/ApiRootResource.scala | 3 +--
.../apache/kyuubi/server/api/v1/OperationsResource.scala | 3 +--
.../apache/kyuubi/server/api/v1/SessionsResource.scala | 6 ++----
.../kyuubi/server/trino/api/v1/ApiRootResource.scala | 3 +--
.../kyuubi/server/trino/api/v1/StatementResource.scala | 15 +++++----------
pom.xml | 2 +-
8 files changed, 16 insertions(+), 30 deletions(-)
diff --git a/.scalafmt.conf b/.scalafmt.conf
index 2ccb453dd..e682a17f7 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,4 +1,4 @@
-version = 3.6.1
+version = 3.7.1
runner.dialect=scala212
project.git=true
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/AdminResource.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/AdminResource.scala
index a92992e66..e3fcc7527 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/AdminResource.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/AdminResource.scala
@@ -45,8 +45,7 @@ private[v1] class AdminResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description = "refresh the Kyuubi server hadoop conf, note that, " +
"it only takes affect for frontend services now")
@POST
@@ -66,8 +65,7 @@ private[v1] class AdminResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description = "refresh the user defaults configs")
@POST
@Path("refresh/user_defaults_conf")
@@ -86,8 +84,7 @@ private[v1] class AdminResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description = "delete kyuubi engine")
@DELETE
@Path("engine")
@@ -121,8 +118,7 @@ private[v1] class AdminResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description = "list kyuubi engines")
@GET
@Path("engine")
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/ApiRootResource.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/ApiRootResource.scala
index 0d91da868..d8b997e86 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/ApiRootResource.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/ApiRootResource.scala
@@ -37,8 +37,7 @@ private[v1] class ApiRootResource extends ApiRequestContext {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description = "Get the version of Kyuubi server.")
@GET
@Path("version")
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/OperationsResource.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/OperationsResource.scala
index b1b84c308..b0d0607ce 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/OperationsResource.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/OperationsResource.scala
@@ -64,8 +64,7 @@ private[v1] class OperationsResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description =
"apply an action for an operation")
@PUT
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala
index 80212faf2..04caa97f9 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala
@@ -135,8 +135,7 @@ private[v1] class SessionsResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description = "Open(create) a session")
@POST
@Consumes(Array(MediaType.APPLICATION_JSON))
@@ -158,8 +157,7 @@ private[v1] class SessionsResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description = "Close a session")
@DELETE
@Path("{sessionHandle}")
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/trino/api/v1/ApiRootResource.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/trino/api/v1/ApiRootResource.scala
index fa0236378..c703d1e20 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/trino/api/v1/ApiRootResource.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/trino/api/v1/ApiRootResource.scala
@@ -37,8 +37,7 @@ private[v1] class ApiRootResource extends ApiRequestContext {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description = "Get the version of Kyuubi server.")
@GET
@Path("version")
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/trino/api/v1/StatementResource.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/trino/api/v1/StatementResource.scala
index 3d149b5f3..122b39ccd 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/trino/api/v1/StatementResource.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/trino/api/v1/StatementResource.scala
@@ -37,8 +37,7 @@ private[v1] class StatementResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description = "test")
@GET
@Path("test")
@@ -60,8 +59,7 @@ private[v1] class StatementResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description =
"Get queued statement status")
@GET
@@ -76,8 +74,7 @@ private[v1] class StatementResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description =
"Get executing statement status")
@GET
@@ -92,8 +89,7 @@ private[v1] class StatementResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description =
"Cancel queued statement")
@DELETE
@@ -108,8 +104,7 @@ private[v1] class StatementResource extends ApiRequestContext with Logging {
@ApiResponse(
responseCode = "200",
- content = Array(new Content(
- mediaType = MediaType.APPLICATION_JSON)),
+ content = Array(new Content(mediaType = MediaType.APPLICATION_JSON)),
description =
"Cancel executing statement")
@DELETE
diff --git a/pom.xml b/pom.xml
index 37d124568..c6c579d5c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -234,7 +234,7 @@
<spotless.java.googlejavaformat.version>1.7</spotless.java.googlejavaformat.version>
<spotless.python.includes></spotless.python.includes>
<spotless.python.black.version>22.3.0</spotless.python.black.version>
- <spotless.scala.scalafmt.version>3.6.1</spotless.scala.scalafmt.version>
+ <spotless.scala.scalafmt.version>3.7.1</spotless.scala.scalafmt.version>
<distMgmtReleaseId>apache.releases.https</distMgmtReleaseId>
<distMgmtReleaseName>Apache Release Distribution Repository</distMgmtReleaseName>