Skip to content

Couchbase support #2076

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

Open
wants to merge 27 commits into
base: development
Choose a base branch
from
Open

Couchbase support #2076

wants to merge 27 commits into from

Conversation

olxandr
Copy link
Contributor

@olxandr olxandr commented Jul 19, 2025

Closes #1997

Description:

This PR is adding a native support for Couchbase.
The official github.com/couchbase/gocb/v2 Go Couchbase library is introduced as a dependency for this PR.

Checklist:

  • I have formatted my code using goimport and golangci-lint.
  • All new code is covered by unit tests.
  • This PR does not decrease the overall code coverage.
  • I have reviewed the code comments and documentation for clarity.

@coolwednesday coolwednesday changed the title [GoFr-SOC]: Couchbase support Couchbase support Jul 23, 2025
Copy link
Member

@coolwednesday coolwednesday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @olxandr ! A very well drafted PR. I would like you to also add docs with a docker container and a small code snippet. Refer how it is added for the others.

Other than that I would want you to also add screenshots of...... Logs Traces and metrics for a Db call. Would then test it in local and we will be good to go.

@olxandr
Copy link
Contributor Author

olxandr commented Jul 31, 2025

a docker container

What surprised me is that in order to get the Couchbase ready to use, just spinning up the docker container isn't enough. You also need to go to Couchbase Web Console by visiting http://localhost:8091 and manually setup the cluster. Here is the source.
Should i add this info somwhere too?

@coolwednesday
Copy link
Member

a docker container

What surprised me is that in order to get the Couchbase ready to use, just spinning up the docker container isn't enough. You also need to go to Couchbase Web Console by visiting http://localhost:8091 and manually setup the cluster. Here is the source. Should i add this info somwhere too?

You can add the respective docs link.

Copy link
Member

@coolwednesday coolwednesday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @olxandr !

A bit of info on the datasource setup in the docs would be appreciated.

@olxandr
Copy link
Contributor Author

olxandr commented Aug 1, 2025

also add screenshots of...... Logs Traces and metrics for a Db call.

Sure, here are the screenshots:

Logs:

2025-08-01T18:31:04,578609188+03:00

Trace:

2025-08-01T18:31:57,797531779+03:00

Error: pkg/gofr/container/mock_container.go:51:6: Function 'NewMockContainer' has too many statements (51 > 50) (funlen)

Not sure what i'm supposed to do with this failed check.

@Umang01-hash
Copy link
Member

@olxandr Please resolve the linter issues in your PR. Thankyou!

@olxandr
Copy link
Contributor Author

olxandr commented Aug 4, 2025

The NewMockContainer() inside pkg/gofr/container/mock_container.go has too many statements after adding Couchbase. So like i said:

Not sure what i'm supposed to do with this failed check.

Any suggestions on how to deal with it?
One approach is to breakdown the function into smaller, more focused helper functions. It is also possible to increase the funlen linter limit.

@olxandr olxandr requested a review from coolwednesday August 6, 2025 13:46
Copy link
Member

@coolwednesday coolwednesday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Couchbase support
3 participants