Closed scala-steward-asf[bot] closed 8 months ago
I has checked website of couchHbase, 2.x is deprecated. https://docs.couchbase.com/java-sdk/current/project-docs/sdk-release-notes.html But Java client2. x and 3. x are not consistent. Should we continue to upgrade and modify the relevant implementation
The problem is the build breaks. Some couchbase classes have moved to new jars or have been removed. I couldn't find good migration notes for couchbase 3.
https://docs.couchbase.com/java-sdk/current/project-docs/migrating-sdk-code-to-3.n.html#installation-and-configuration is the official guide. If anyone has the time and interest to take this on, it would be great.
@laglangyue Would you like to give this a try, thanks.
@laglangyue Would you like to give this a try
yes, I will take some time to learn the datasource and fix it
I have read the official website documentation, and there are some changes to client3 and client2
Bucket ->document
(client2)
Bucket ->scope ->collection
(client3)
And document and collection are not completely equivalent
For this API, jsonDocument will be changed to jsonObject,so api will be change
/**
* Create a sink to update or insert a Couchbase [[com.couchbase.client.java.document.JsonDocument JsonDocument]].
*/
def upsert(sessionSettings: CouchbaseSessionSettings,
writeSettings: CouchbaseWriteSettings,
bucketName: String): Sink[JsonDocument, Future[Done]] =
CouchbaseFlow.upsert(sessionSettings, writeSettings, bucketName).toMat(Sink.ignore)(Keep.right)
And they provided scala sdk, my suggestion is to implement a connector based on scala sdk.
@pjfanning @He-Pin how about using scala-sdk?
I am not against trying the new scala SDK
@laglangyue Nice, but I just back my hometown will not be able to review it on any soon, and happy Spring Festival
Sorry, I retract my previous viewpoint. Couchbase's scala sdk does not support scala3. I wanted to submit a PR(use scala3), but found out that their project is not SBT. Scala on Maven is very painful, so I gave up on providing them with a PR. I still use Java client development
Sorry, I retract my previous viewpoint. Couchbase's scala sdk does not support scala3. I wanted to submit a PR(use scala3), but found out that their project is not SBT. Scala on Maven is very painful, so I gave up on providing them with a PR. I still use Java client development
Indeed, Scala with Maven is painful especially ofr libraries which is why I don't recommend maven for people that use Scala. Afaik maven fundamentally doesn't even have a concept of matrix's for builds, so the only proper way to cross publish is to do hacks like modifying a hardcoded scala version in pom.xml. Using the java client may be a better option,
Also now is the time to do significant changes such as upgrading major versions of underlying libraries (in this case couchbase sdk). Pekko connectors doesn't subscribe to semver and for 1.1.x series of pekko connectors the goal specifically is to use the latest versions of all of the underlying sdk's, spi's etc etc
I ended my the Spring Festival vacation and back today.It's a bit long,I will complete this PR. Report some progress to community. I completed a version of API changes while studying. Except for JavaDSL have been completed.
api like this.
Due to the lack of a document
/jsonDocument
, it may lose document id and body. Through a function, it seems that the design is not general, and I am currently considering a more comprehensive design. Encapsulate a document interface and some case class. But unlike the document in client2, this is the encapsulation of client3, wrapper id, doc body and result.
trait Document[T, R] {
def id: String
// json / object
def doc: T
// getResult / mutationResult etc
def result: R
}
Code had pushed to my repo, welcome any suggestions https://github.com/laglangyue/incubator-pekko-connectors/tree/couchbase3
About this PR
📦 Updates com.couchbase.client:java-client from
2.7.23
to3.5.2
âšUsage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a
.scala-steward.conf
file.Have a fantastic day writing Scala!
âš™ Adjust future updates
Add this to your `.scala-steward.conf` file to ignore future updates of this dependency: ``` updates.ignore = [ { groupId = "com.couchbase.client", artifactId = "java-client" } ] ``` Or, add this to slow down future updates of this dependency: ``` dependencyOverrides = [{ pullRequests = { frequency = "30 days" }, dependency = { groupId = "com.couchbase.client", artifactId = "java-client" } }] ```labels: library-update, early-semver-major, semver-spec-major, commit-count:1