80 Commits

Author SHA1 Message Date
Hammad Bashir
896822231e [ENH] Pulsar Producer & Consumer (#921)
## Description of changes

*Summarize the changes made by this PR.*
 - New functionality
- Adds a basic pulsar producer, consumer and associated tests. As well
as a docker compose for the distributed version of chroma.

## Test plan
We added bin/cluster-test.sh, which starts pulsar and allows
test_producer_consumer to run the pulsar fixture.

## Documentation Changes
None required.
2023-09-20 02:03:07 -07:00
Sunil Kumar Dash
6681df91bf Enable manual workflow trigger (#1036)
## Description of changes

*Summarize the changes made by this PR.*
 - Added a workflow_dispatch to manually trigger test workflows
 - will be good for development experience

---------

Signed-off-by: sunilkumardash9 <sunilkumardash9@gmail.com>
2023-09-14 05:13:18 +00:00
Trayan Azarov
831c027f5c [SEC]: Bandit Scan (#1113)
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Added bandit scanning for all pushes to repo

## Test plan
*How are these changes tested?*

Manual testing of the workflow

## Documentation Changes
N/A - unless we want to start a separate security section in the main
docs repo.

---------

Co-authored-by: Hammad Bashir <HammadB@users.noreply.github.com>
2023-09-11 20:49:55 -07:00
Jeff Huber
7d412aef8c [ENH] initial CLI (#1032)
This proposes an initial CLI

The CLI is installed when you installed `pip install chromadb`.

You then call the CLI with

`chroma run --path <persist_dir> --port <port>` where path and port are
optional.

This also adds `chroma help` and `chroma docs` as convenience links -
but I'm open to removing those.

To make this easy - I added `typer` (by the author of FastAPI). I'm not
sure this is the tool that we want to commit to for a fuller featured
CLI, but given the extremely minimal footprint of this - I don't think
it's a one way door.

<img width="1477" alt="Screenshot 2023-08-23 at 4 59 54 PM"
src="https://github.com/chroma-core/chroma/assets/891664/30374228-d303-41e1-8e9e-188b7f8532d4">

***

#### TODO
- [x] test in fresh env - i think i need to add `typer` as a req
- [ ] consider expanding the test to make sure the service is actually
running
- [x] hide the test option from the typer UI
- [x] linking to a getting started guide could be interesting at the top
of the logs
2023-09-11 20:49:25 -07:00
Hammad Bashir
237b3e3c96 [BLD] Add dockerhub support (#1112)
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Pushes images to dockerhub

## Test plan
*How are these changes tested?*
Will have to be tested on main as part of CI/CD
- [x] Tests pass locally with `pytest` for python, `yarn test` for js

## Documentation Changes
None required.
2023-09-06 23:13:29 -07:00
hammadb
747f7c6457 [BLD] Update release workflow tag check 2023-09-05 22:26:52 -07:00
hammadb
3e83d174eb [BLD] Make python release processes add a check tag step 2023-09-05 19:04:06 -07:00
hammadb
2acc057d85 [BLD] Switch to version prefixed tags to be able to use github filter patterns on actions. v0.4.9 instead of 0.4.9 2023-09-05 16:49:47 -07:00
hammadb
3729885376 [BLD] JS release token fix. 2023-09-05 16:43:38 -07:00
hammadb
27ece76d36 [BLD] JS release token fix. Python tag push fix 2023-09-05 16:41:13 -07:00
hammadb
b0e75e677d [BLD] js_release workflow fix chroma port 2023-09-05 16:29:56 -07:00
hammadb
096e52280e [BLD] js_release workflow fix chroma port 2023-09-05 16:23:40 -07:00
hammadb
07aa62e098 [BLD] fix run typo 2023-09-05 16:11:33 -07:00
Hammad Bashir
347b8be4a9 [BLD] Add npm run db:run to run docker-compose up (#1097)
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Add npm run db:run to run docker-compose up
 - New functionality
	 - ...

## Test plan
Will be tested manually. This is an iteration on #1095 .
- [x] Tests pass locally with `pytest` for python, `yarn test` for js

## Documentation Changes
None
2023-09-05 16:02:50 -07:00
Hammad Bashir
687375ae86 [BLD] Add install deps to JS release workflow (#1095)
Add install deps to JS release workflow
2023-09-05 15:51:19 -07:00
Hammad Bashir
d7e3d82d6f [BLD] Release env vars save to GITHUB_ENV (#1094)
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Properly use github_env to pass env vars across steps 
-
https://docs.github.com/en/github-ae@latest/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable


## Test plan
Will be manually tested, this is an iteration on #1093 
- [ ] Tests pass locally with `pytest` for python, `yarn test` for js

## Documentation Changes
None
2023-09-05 15:42:46 -07:00
Hammad Bashir
8b41722b34 [BLD] Prevent python release from running on js tag pushes (#1093)
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Prevent python release from running on js tag pushes

## Test plan
Manually on main via triggering

## Documentation Changes
None
2023-09-05 15:16:25 -07:00
hammadb
2c8a11f7b2 [BLD] Add working directory to npm run js 2023-09-05 15:07:45 -07:00
Hammad Bashir
986fc38c98 [BLD] Add release automation for JS client (#1091)
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Adds release automation for JS client. 

## Test plan
They will have to be tested after merging this PR

## Documentation Changes
Update the js client Develop guide for how to use this automation.
2023-09-05 15:04:31 -07:00
Jeff Huber
59761c872c multiplatform docker release builds (#857)
Currently our ghrc (and future dockerhub) builds will not run on Mac. 

This should build `linux/amd64` and `linux/arm64` in serial. 

In the future, we can add ` linux/amd64/v2, linux/amd64/v3` and
parallelize the builds.
https://docs.docker.com/build/ci/github-actions/multi-platform/

Plan
1. let tests pass
2. merge into `main` and see if `latest` release branch works
2023-08-29 15:29:19 -04:00
Hammad Bashir
4b6f41b580 Add LRU cache FD management (#891)
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- Adds an LRU cache for segment file handle management to make sure we
respect OS file handle limits
 - New functionality
	 - ...

## Test plan
Added a stress test which creates many collections and forces them to
open index files by writing to them

## Documentation Changes
We should add a troubleshooting section about filesystem limits so that
users can set max limits more appropriately - similar to
https://www.mongodb.com/docs/manual/reference/ulimit/
2023-07-27 19:28:17 -07:00
Hammad Bashir
ae8c453d62 Add windows tests (#892)
## Description of changes

Addresses #887

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Adds windows to github test runners
 - New functionality
	 - ...

## Test plan
These are tests.

## Documentation Changes
None required.
2023-07-27 08:59:55 -07:00
Hammad Bashir
46de47945a SQLite Release PR (#808)
## Description of changes
Base PR to release sqlite refactor, which spans many stacked PRs.

Remaining
- [x] Merge this to main
- [x] Layered Persistent Index #761 
- [x] Remove old impls (In #781 )
- [x] Remove persist() API (In #787)
- [x] Add telemetry to SegmentAPI, it was not included. (#788)
- [x] New clients #805 
- [x] locking and soak tests for thread-safety 
- [x] Migration tool
- [x] Fix #739 
- [x] Fix metadata None vs empty
- [x] Fix persist directory (addressed in #761)
- [x] Leave files open in #761 (merge stacked PR)

Post Release
- [ ] Un xfail cross version tests once we cut the release
- [x] Documentation updates for new silent ADD failure.
- [x] Update all documentation for new API instantiation
- [x] Update all documentation for settings changes
- [ ] Update terraform deployment
- [ ] Update cloudformation deployment

---------

Co-authored-by: Luke VanderHart <luke@vanderhart.net>
Co-authored-by: Jeffrey Huber <jeff@trychroma.com>
Co-authored-by: Anton Troynikov <atroyn@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Sosa <37946988+CakeCrusher@users.noreply.github.com>
Co-authored-by: Russell Pollari <russell@sharpestminds.com>
Co-authored-by: russell-pollari <pollarir@mgail.com>
2023-07-17 14:21:34 -07:00
Luke VanderHart
13bf3e070f API implementation for segment-based architecture (#662)
## Description of changes

New API implementation backed by the segment-based architecture. Should
be extensible to a full distributed architecture.

---------

Co-authored-by: Jeffrey Huber <jeff@trychroma.com>
Co-authored-by: hammadb <hammad@trychroma.com>
Co-authored-by: Anton Troynikov <atroyn@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Hammad Bashir <HammadB@users.noreply.github.com>
2023-07-05 11:56:39 -07:00
Hammad Bashir
bdc1841e22 Add a thin client (#610)
## Description of changes
*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Typing cleanup
- Changes embedding function defaults to work through the default params
as opposed to via None so that None now means - NO embedding function as
opposed to use the default. This is technically a breaking change.
 - New functionality
- Adds a thin client that restricts what you can create to the REST api
client and builds it separately so it can be published to its own pypi
package. The thin client restricts the default embedding function to be
None always - forcing manual specification of the embedding function
while using the thin client.
- The thin client is built with its own pyproject.toml with a limited
set of dependencies and a is_thin_client.py file that acts as a compile
flag. The build script stages the toml, places the two files in the
right place, performs the build and then tears down the changes.
	 
Addresses #289 

## Test plan
The existing tests should cover this configuration. We can add CI for
the thin-client in the future.

## Documentation Changes
We will add a section on the docs that explains the thin client and its
limitations.
2023-05-31 14:23:10 -07:00
Hammad Bashir
c17249b818 Add precommit hooks (#483)
Adds precommit hooks based on #433 to our repository. Only one file here is new - the configuration for the hooks, everything else is linting/formatting fixes. We do not run the typechecker globally since that would be quite lengthy to clean up - instead we will have to incrementally clean up type check issues as we go.
2023-05-10 05:52:12 +00:00
Hammad Bashir
f9b8f7c3b7 Team/hypothesis tests (#474)
Merges the team/hypothesis-tests branch to main. Which adds a robust property-based testing suite to Chroma. lfg.
2023-05-05 21:03:15 -07:00
Jeffrey Huber
eb5475c50d new line diff 2023-04-07 15:31:52 -07:00
Jeffrey Huber
82c2f20b7b moved to a different PR 2023-04-07 15:31:33 -07:00
Jeffrey Huber
41936047fa bump 2023-04-04 20:39:23 -07:00
Jeffrey Huber
da33dab36f bump 2023-04-04 15:48:16 -07:00
Jeffrey Huber
7af98eb908 bump 2023-04-04 15:31:33 -07:00
Jeffrey Huber
757c2886c4 try gh actions js tests' 2023-04-04 15:07:46 -07:00
Hammad Bashir
fa847be5e9 Release 0.3.13 (#240)
* Add release process and autogenerate release notes
2023-03-27 11:58:28 -07:00
Luke VanderHart
e657fa7b22 permission tweak 2023-02-18 23:34:33 -05:00
Luke VanderHart
42dd67fc39 push only tagged releases & use 'latest' dir 2023-02-18 22:56:18 -05:00
Luke VanderHart
5607bed8f0 make gh actions permissions explicit 2023-02-18 22:10:26 -05:00
Luke VanderHart
d4a9347035 add GH action to deploy CloudFormation template to S3 2023-02-18 16:15:00 -05:00
Luke VanderHart
d90f3f6826 Add latest tag to docker releases
For tagged releases, add the `latest` tag to the Docker image as well.
2023-02-15 15:01:31 -08:00
Luke VanderHart
2d65e94bf0 add pypi deploy to GH actions 2023-02-14 16:00:45 -08:00
Luke VanderHart
5812dd8465 check package before release 2022-12-05 14:00:50 -05:00
Luke VanderHart
ab8934bd63 fix name of requirements_dev.txt in release script 2022-12-05 12:12:29 -05:00
Luke VanderHart
d2dedd9f6a update release Action to reflect merged codebase 2022-12-03 22:24:36 -05:00
Luke VanderHart
5b6a97d270 actually remove macos from test targets 2022-12-03 22:10:48 -05:00
Luke VanderHart
4be1601fe5 remove macos from test targets 2022-12-03 22:08:40 -05:00
Luke VanderHart
ee5dced6e0 run integration tests in CI 2022-12-03 20:57:19 -05:00
Luke VanderHart
81b3b54ec6 drop windows support 2022-11-27 18:56:11 -05:00
Luke VanderHart
707c83296a scope compatibility to python 3.10 2022-11-27 18:48:34 -05:00
Luke VanderHart
a57f58c1a9 Fix github workflows for unified codebase 2022-11-27 13:14:46 -05:00
Luke VanderHart
3e7fb13757 Use correct path for test script 2022-11-10 13:07:07 -05:00