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

[Go] ollama plugin needs live tests #609

Closed
jba opened this issue Jul 12, 2024 · 5 comments · Fixed by #720
Closed

[Go] ollama plugin needs live tests #609

jba opened this issue Jul 12, 2024 · 5 comments · Fixed by #720
Assignees
Labels
bug Something isn't working go

Comments

@jba
Copy link
Contributor

jba commented Jul 12, 2024

go/plugins/ollama has no tests against actual models to demonstrate that the code works.

@jba jba added bug Something isn't working go labels Jul 12, 2024
@eddumelendez
Copy link

eddumelendez commented Jul 16, 2024

Hi, may I suggest to use Testcontainers for Go's Ollama Module

Also, js plugins could use Testcontainers for Node's Chroma Module and Ollama Module

@cabljac
Copy link
Contributor

cabljac commented Aug 1, 2024

@eddumelendez I implemented it with Testcontainers, but we're limited in that we can't use Docker. The solution instead is just to assume the dev has an ollama instance running, and put the test behind a flag (see PR) :)

@eddumelendez
Copy link

HI @cabljac, I think you meant Docker Desktop, right? However, you can use Docker at GitHub workflows without any issues.

@cabljac
Copy link
Contributor

cabljac commented Aug 13, 2024

@eddumelendez I'm not sure to be honest, just reiterating what I was told, check out the PR for what Pavel said if interested :)

@mdelapenya
Copy link

Hey @cabljac, testcontainers-go maintainer here 👋

You don't need Docker Desktop to be installed in your local machines to use testcontainers-go, just a container runtime that is 100% compatible with the Docker engine APIs. If podman or colima or any other satisfy that, then they should work out-of-the-box.

That's what @eddumelendez mentioned about the GH actions: they come with the Docker engine (moby/moby) already installed so your GH workflows will benefit from using testcontainers approach in a transparent manner. For local experience in developers laptop, just having a docker engine running is enough: for Linux users it's fairly simple to install Docker. For MacOS and Windows, you could try the aforementioned container runtimes and you could also give it a try to testcontainers desktop alternative (it's a free app).

The benefits of using the testcontainers approach is that you don't need to share knowledge through a README, or a shell script or a makefile to start the runtime/test-time dependencies of your project. Because everything is in code, you just clone and run your tests. I saw you started with testcontainers-go first, so I'm sure you see the value on this. Please let me know if you need anything else from our side; from OSS project to OSS project, we'd like to support you in the most friendly manner 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working go
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants