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

Upgrade Couchbase support for Spring Boot 2.4 #14184

Closed
wants to merge 36 commits into from

Conversation

mraible
Copy link
Contributor

@mraible mraible commented Mar 5, 2021

Fixes #13544.

Replaces #13770.


Please make sure the below checklist is followed for Pull Requests.

murdos and others added 30 commits August 24, 2020 17:21
These serious bugs are already fixed in 4.1.0-M1 so we used that version until 4.0.2 is released
Solves CI error:

'dependencies.dependency.version' for com.couchbase.client:encryption:jar is missing. @ line 151, column 21
Co-authored-by: Marcelo Shima <marceloshima@gmail.com>
Co-authored-by: Marcelo Shima <marceloshima@gmail.com>
@mraible
Copy link
Contributor Author

mraible commented Mar 5, 2021

I tested this PR in JHipster Daily Builds and it fails to compile.

Error:  /home/runner/app/src/main/java/io/github/jhipster/app/config/couchbase/CustomCouchbaseRepositoryQuery.java:[16,9] constructor CouchbaseRepositoryQuery in class org.springframework.data.couchbase.repository.query.CouchbaseRepositoryQuery cannot be applied to given types;
  required: org.springframework.data.couchbase.core.CouchbaseOperations,org.springframework.data.couchbase.repository.query.CouchbaseQueryMethod,org.springframework.data.repository.core.NamedQueries,org.springframework.data.repository.query.QueryMethodEvaluationContextProvider
  found: org.springframework.data.couchbase.core.CouchbaseOperations,org.springframework.data.couchbase.repository.query.CouchbaseQueryMethod,org.springframework.data.repository.core.NamedQueries
  reason: actual and formal argument lists differ in length
Error:  /home/runner/app/src/main/java/io/github/jhipster/app/config/couchbase/CustomN1qlRepositoryQueryExecutor.java:[48,17] constructor StringN1qlQueryCreator in class org.springframework.data.couchbase.repository.query.StringN1qlQueryCreator cannot be applied to given types;
  required: org.springframework.data.repository.query.ParameterAccessor,org.springframework.data.couchbase.repository.query.CouchbaseQueryMethod,org.springframework.data.couchbase.core.convert.CouchbaseConverter,java.lang.String,org.springframework.expression.spel.standard.SpelExpressionParser,org.springframework.data.repository.query.QueryMethodEvaluationContextProvider,org.springframework.data.repository.core.NamedQueries
  found: org.springframework.data.repository.query.ParameterAccessor,org.springframework.data.couchbase.repository.query.CouchbaseQueryMethod,org.springframework.data.couchbase.core.convert.CouchbaseConverter,java.lang.String,org.springframework.data.repository.query.QueryMethodEvaluationContextProvider,org.springframework.data.repository.core.NamedQueries

I'm able to reproduce it locally. It seems that CouchbaseRepositoryQuery is deprecated, but I'm not sure what replaces it.

Any ideas @mmonti?

@mraible
Copy link
Contributor Author

mraible commented Mar 5, 2021

It looks like Spring Data 2020.0.5 has breaking changes in Couchbase that might be causing this.

@pascalgrimaud
Copy link
Member

Cc @tchlyah who is the one who proposed Couchbase option in JHipster

@mmonti
Copy link

mmonti commented Mar 5, 2021

Ey!.. @mraible, a couple weeks ago @mikereiche merged my PR right before the spring-data release so the changes I added to jhipster to make it work are no longer needed.
I can work on JHipster this weekend and try to fix it to make it work with Spring Data 2020.0.5
I also took a look at the reactive implementation, and I don't think that will work for now (It was unstable when I tried to work on it a couple weeks ago), not sure how it is in the latest release.

@mikereiche
Copy link

mikereiche commented Mar 5, 2021

I'm looking into this. @mraible. @mmonti
It looks like some misguided changes occurred. The replacement class/constructor is

public PartTreeCouchbaseQuery(CouchbaseQueryMethod method, CouchbaseOperations operations,
SpelExpressionParser expressionParser, QueryMethodEvaluationContextProvider evaluationContextProvider)

@mikereiche
Copy link

mikereiche commented Mar 6, 2021

@mmonti @mraible - I've opened this issue. I will roll-back the changes to CouchbaseRepositoryQuery and ReactiveCouchbaseRepositoryQuery for that issue.
spring-projects/spring-data-couchbase#1092

@mikereiche
Copy link

@mmonti @mraible I've merged the fix. spring-projects/spring-data-couchbase#1093
My apologies.

@mraible
Copy link
Contributor Author

mraible commented Mar 11, 2021

Just to keep everyone in the loop, we've removed Couchbase as an option for JHipster 7. Using it with JDL should still work. We can add it back in if/when everything is working again.

@mraible mraible added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $500 https://www.jhipster.tech/bug-bounties/ labels Mar 12, 2021
@mraible
Copy link
Contributor Author

mraible commented Mar 12, 2021

Added some juice to the mix. 🤑

gkysaad added a commit to gkysaad/generator-jhipster that referenced this pull request Jul 14, 2021
gkysaad added a commit to gkysaad/generator-jhipster that referenced this pull request Jul 14, 2021
@github-actions github-actions bot added the Stale label Jul 26, 2021
@mraible
Copy link
Contributor Author

mraible commented Aug 5, 2021

Closing in favor of #15645.

@mraible mraible closed this Aug 5, 2021
gkysaad added a commit to gkysaad/generator-jhipster that referenced this pull request Aug 13, 2021
@pascalgrimaud pascalgrimaud added this to the 7.2.0 milestone Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $500 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Couchbase tests are failing
6 participants