feat(ollama): support calling the Ollama local process#2923
feat(ollama): support calling the Ollama local process#2923mdelapenya merged 42 commits intomainfrom
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
0d0ff48 to
8619850
Compare
0146fc5 to
2f2865b
Compare
mdelapenya
left a comment
There was a problem hiding this comment.
This LGTM, waiting for you to mark is as ready. Great job with the process execution handling 🏆
modules/ollama/local.go
Outdated
|
|
||
| // Terminate implements testcontainers.Container interface for the local Ollama binary. | ||
| // It stops the local Ollama process, removing the log file. | ||
| func (c *localProcess) Terminate(ctx context.Context) error { |
There was a problem hiding this comment.
todo: conflict with #2926, so depending on which one is merged first, we need to update it.
There was a problem hiding this comment.
Yer just replied to that PR, I don't think it works in its current form as it breaks the interface separation.
There was a problem hiding this comment.
We merged #2926 so I think we need to update this signature to match the interface
There was a problem hiding this comment.
Added it here: 9be4b71
I did not transfer the options from Terminate to the Stop call (stop duration), do you think we need to extract it from the options and override the default?
9927ad0 to
5e586c8
Compare
Refactor local process handling for Ollama using a container implementation avoiding the wrapping methods. This defaults to running the binary with an ephemeral port to avoid port conflicts. This behaviour can be overridden my setting OLLAMA_HOST either in the parent environment or in the values passed via WithUseLocal. Improve API compatibility with: - Multiplexed output streams - State reporting - Exec option processing - WaitingFor customisation Fix Container implementation: - Port management - Running checks - Terminate processing - Endpoint argument definition - Add missing methods - Consistent environment handling
Refactor local processing to use the new log sub match functionality.
Validate the container request to ensure the user configuration can be processed and no fields that would be ignored are present.
Remove temporary simple test.
Allow the local ollama binary name to be configured using the image name.
Detail the container request supported fields.
Update local process site docs to match recent changes.
Refactor Terminate to support testcontainers.TerminateOption.
9be4b71 to
4c3a06c
Compare
mdelapenya
left a comment
There was a problem hiding this comment.
LGTM, great work with the refactor of the process Start/Wait, thanks for this!
* main: (103 commits) feat(postgres): ssl for postgres (testcontainers#2473) feat(ollama): support calling the Ollama local process (testcontainers#2923) chore(deps): bump jinja2 from 3.1.4 to 3.1.5 (testcontainers#2935) chore(deps): bump sonarsource/sonarcloud-github-action (testcontainers#2933) feat(termination)!: make container termination timeout configurable (testcontainers#2926) chore(deps): bump slackapi/slack-github-action from 1.26.0 to 2.0.0 (testcontainers#2934) chore(deps): bump github/codeql-action from 3.25.15 to 3.28.0 (testcontainers#2932) feat(wait): log sub match callback (testcontainers#2929) fix: Handle nil value in CleanupNetwork (testcontainers#2928) fix: avoid double lock in DockerProvider.DaemonHost() (testcontainers#2900) feat!: build log writer for container request (testcontainers#2925) feat(gcloud)!: add support to seed data when using RunBigQueryContainer (testcontainers#2523) security(deps): bump golang.org/x/crypto from 0.28.0 to 0.31.0 (testcontainers#2916) chore(ci): add Github labels based on PR title (testcontainers#2914) chore(gha): Use official setup-docker-action (testcontainers#2913) chore(ci): enforce conventional commits syntax in PR titles (testcontainers#2911) feat(nats): WithConfigFile - pass a configuration file to nats server (testcontainers#2905) chore: enable implicit default logger only in testing with -v (testcontainers#2877) fix: container binds syntax (testcontainers#2899) refactor(cockroachdb): to use request driven options (testcontainers#2883) ...
* main: (29 commits) deps(fix): include modulegen templates dir in dependabot updates (testcontainers#2956) chore(deps): bump docker/setup-docker-action from 4.0.0 to 4.1.0 (testcontainers#2959) feat: adds Pinecone module (testcontainers#2955) chore(deps): bump actions/setup-go from 5.1.0 to 5.3.0 (testcontainers#2957) chore(deps): bump actions/upload-artifact from 4.4.3 to 4.6.0 (testcontainers#2958) chore: enable unused-parameter from revive (testcontainers#2949) chore: enable use-any from revive (testcontainers#2948) bump golangci-lint to v1.63.4 (testcontainers#2950) chore: enable var-declaration from revive linter (testcontainers#2942) chore: enable context-as-argument from revive linter (testcontainers#2946) chore: enable early-return, indent-error-flow and superfluous-else from revive linter (testcontainers#2947) chore!: rename EnpointSettingsModifier to EndpointSettingsModifier fix(localstack): more reliable legacy tag detection (testcontainers#2936) chore: recover from panic in `SkipIfProviderIsNotHealthy` test helper function (testcontainers#2939) chore: fix typos (testcontainers#2940) deps(compose): bump compose (v2.32.2) and compose-go spec (v2.4.7) (testcontainers#2938) chore: prepare for next minor development cycle (0.36.0) chore: use new version (v0.35.0) in modules and examples feat(postgres): ssl for postgres (testcontainers#2473) feat(ollama): support calling the Ollama local process (testcontainers#2923) ...
Refactor local process handling for Ollama using a container implementation avoiding the wrapping methods.
This defaults to running the binary with an ephemeral port to avoid conflict.
This behaviour can be overridden my setting OLLAMA_HOST either in the parent environment or in the values passed via WithUseLocal.
Improve API compatibility with:
Fix Container implementation: