Commit Graph

131 Commits

Author SHA1 Message Date
Tim Visée
50ec5ffbae Disable manual workflow dispatch on Docker release image job (#5117) 2024-09-23 12:01:33 +02:00
xzfc
a75d51fc9c Unclutter repo root (#4678)
* Move CODE_OF_CONDUCT.md to docs

* Move CONTRIBUTING.md to docs

* Drop QUICK_START_GRPC.md

* Drop docs/favicon.ico as being unused

* Move QUICK_START.md to docs
2024-07-17 09:24:35 +02:00
xzfc
cf08ac68dc Switch to poetry (#4518)
* Use poetry for openapi tests

* Use poetry for consensus tests

* Use poetry for gen_storage_compat_data/populate_db.py

* Make consensus_tests scripts executable

* Use poetry for test-consensus-compose

* Cleanup

* Don't call poetry run in scripts
2024-07-08 18:17:43 +00:00
tellet-q
c88f10c19f Add test for OOD during indexing (#4267)
* Add test for OOD during indexing

* Start indexing right after 1st OOD message

* Only send search request after insert loop

* Fail early when encountering out-of-storage during optimization (#4578)

* fs4@0.8.4

* fail early on low storage

* move `dir_size` to `common`

* move the ood bailout to `SegmentOptimizer::optimized_segment_builder`

* drop dead code

* move dir_size to common subcrate

---------

Co-authored-by: generall <andrey@vasnetsov.com>

---------

Co-authored-by: xhjkl <xhjkl@users.noreply.github.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-06-29 22:40:18 +02:00
dependabot[bot]
50f8db8d97 Bump docker/build-push-action from 5 to 6 (#4487)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:43:39 +02:00
Tim Visée
774334e179 Re-enable Windows CI (#4461)
This reverts commit c36b4793e0.
2024-06-13 13:41:39 +02:00
xzfc
c36b4793e0 Allow failures on Windows CI (#4421) 2024-06-10 15:49:02 +02:00
Arnaud Gourlay
bfc4b1930a Add optional post WAL data consistency check (#4359)
* Add optional post WAL data consistency check

* fix multi features build
2024-05-30 21:28:30 +02:00
Kumar Shivendu
3a4e830e29 fix: Replace with space (#4316) 2024-05-24 14:39:35 +05:30
Tim Visée
8bbec6b3a5 Exclude code of conduct from codespell check (#4315) 2024-05-24 10:52:28 +02:00
Arnaud Gourlay
7441993d27 Use Python 3.11 on CI for consensus tests (#4284) 2024-05-21 12:42:29 +02:00
Kenshin Tanaka
a02dd9293a Handle Out-Of-Disk gracefully (#4165)
* tests: Add test on low disk

* Remove redundant assertion

* keep container after failure and print latest logs in console

* Add fs2 crate as a dependency and ensure sufficient disk space in LocalShard operations

* small fix

* Update test

* small fix

* use available_space

* Use `fs2` -> `fs4` and offload sync IO with `tokio::task::spawn_blocking`

* create DiskUsageWathcer

* chore: Remove unnecessary println statement in update_handler.rs

* chore: Fix typo in DiskUsageWatcher struct name

* chore: Refactor DiskUsageWatcher to improve disk usage tracking and update logic

---------

Co-authored-by: tellet-q <elena.dubrovina@qdrant.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-05-13 11:36:56 +02:00
Andrey Vasnetsov
f8c46251e3 combine local and s3 tests (#4218) 2024-05-13 10:55:49 +02:00
Kenshin Tanaka
0d46aeb460 Implement S3 snapshot manager (#4150)
* Add SnapshotsStorageConfig enum(Local or S3) and deserialize implementation

* [refactor]  use snapshots_config instead of s3_config

* update config

* add AWS official`aws-sdk-s3`

* implement store_file() WITHOUT error handling

* implement list_snapshots

* implement delete_snapshot

* run `cargo +nightly fmt`

* delete println

* implement get_stored_file

* Add error handlings

* Refactor AWS S3 configuration and error handling

* fix bugs

* create an empty test file

* fix `alias_test.rs` for StorageConfig type

* tempolary delete some test and try s3 test

* Update integration-tests.yml to use snap instead of apt-get for installing yq

* Update integration-tests.yml to use sudo when installing yq

* add sudo

* make (full/non-full) snapshots downloadable

* debug

* small fix

* Add S3 endpoint URL configuration option

* fix

* fix

* debug

* fix endpoint

* update to http://127.0.0.1:9000/

* update

* fix

* fix `#[get("/collections/{collection}/shards/{shard}/snapshots/{snapshot}")]` for s3

* put original tests back

* refactor

* small fix (delete println & echo)

* use object_store and refactor

* create snapshot_storage_ops and implement

* Refactor get_appropriate_chunk_size function to adjust chunk size based on service limits and file size

* cargo +nightly fmt --all

* make it more abstract

* Refactor SnapshotsStorageConfig deserialization in SnapShotsConfig

* small update

* small fix

* Update dependencies in Cargo.lock

* Update minio image to satantime/minio-server

* Refactor snapshot storage paths in snapshots_manager.rs and snapshot_storage_ops.rs

* Fix issue with downloaded file size not matching expected size in download_snapshot function

* add flush

* Use Streaming instead of donloading once

* apply `cargo +nightly fmt --all`

* Fix issue with opening file in SnapshotStream::LocalFS variant

* Fix error handling in SnapshotStream::LocalFS variant

* Add integration test for Shard Snapshot API with S3 storage (#7)
2024-05-10 16:54:23 +02:00
Kumar Shivendu
8a5df15a1b fix: Replace newline with spaces to find docker resources to remove (#4215)
* fix: Replace newline with spaces to find docker resources to remove

* fix: Use xargs instead of tr

* fix: Avoid quotes to pass multiple args

* fix: Use tr -d
2024-05-10 15:44:41 +05:30
xzfc
cb31c533bf Introduce Cargo feature "testing" (#4192) 2024-05-07 16:14:46 +00:00
Kumar Shivendu
452c1a32a4 ci: Force delete all existing buildx resources before building image (#4166) 2024-05-03 16:00:05 +05:30
Kumar Shivendu
1086335c6d feat: Build any branch using GH workflow (#4120)
* feat: Allow building any branch with GH dev image builder workflow

* fix: Trim feat, fix, etc

* fix: Replace all / with -
2024-04-26 16:06:19 +05:30
Luis Cossío
3064ed99e3 Remove api-key path matching (#4046)
* remove api-key path matching

* remove deprecated test suite

* require management access for stacktrace api

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-04-16 12:54:11 -04:00
Luis Cossío
82511e65fa RBAC: [tests] exhaustive access tests (#3961)
* create exhaustive access test (missing body stubs)

* use json body in rest requests

* use better stubs

* green test for create_shard_key

* make it work for delete_shard_key

* make it work for list_collections

* make it work for get_collection

* make it work for create_collection

* make it work for update_collection_params

* make it work for delete_collection

* make it work for update_aliases

* make it work for create_index

* make it work for collection_exists

* make it work for delete_index

* make it work for get_collection_cluster_info

* don't build grpcio and use `uv` for faster deps installation

* partially prepare for update cluster ops

* make it work for list_collection_aliases

* make it work for list_aliases

* make it work for list_collection_snapshots

* make it work for create_collection_snapshot

* huge refactor + make it work for delete_collection_snapshot

* make it work for download_collection_snapshot

* test_upload_collection_snapshot

* test_recover_collection_snapshot

* test_recover_collection_snapshot

* test_upload_shard_snapshot

* test_recover_shard_snapshot

* test_list_shard_snapshots

* test_create_shard_snapshot

* test_delete_shard_snapshot

* test_download_shard_snapshot

* test_list_snapshots and test_create_snapshot

* test_delete_snapshot

* test_download_full_snapshot

* test_get_cluster

* test_recover_raft_state

* test_delete_peer

* prepare for splitting into another PR

* skip api exhaustiveness checks

* lil cleanup

* fix integration tests workflow

* test search api

* test recommend api

* test discover api

* test count and scroll

* test get and upsert points

* test update points batch

* test update and delete vectors

* test set, overwrite, delete, and clear payload

* test service level actions

* finish testing (with errors), introduce not needing success

* make tests much faster

* simplify delete tests

* complete collection cluster operations

* cleanup

* update after rebase

* change permissions for create and delete shard keys

* review fixes

* add newline
2024-04-11 12:42:59 -04:00
Kumar Shivendu
03190e833d fix: Dev container build workflow (#3967) 2024-04-04 14:46:49 +05:30
Kumar Shivendu
7dc6ad03cb feat: Remove existing buildx containers before building dev branch (#3959)
* feat: Remove existing buildx containers before building dev branch

* fix: Typo
2024-04-02 15:55:18 +05:30
Luis Cossío
8a01c7e13c RBAC: stateful validation with value_exists (#3874) 2024-03-21 13:52:32 -03:00
Kumar Shivendu
cf9f5aab98 fix: Include git commit id while building docker image if possible (#3640)
* feat: Print commit id in dev container build workflow

* fix: Keep .git while building Qdrant binary in docker

* fix: Remove redundant printing of git commit id

* fix: Copy only git files first

* fix: Docker build should have commit id if present

* refactor: Use fewer lines of code

* feat: Use git commit id from build arg

* refactor: Use cleaner code

* Fix string reference issue

* fix: Dont print info log if commit is not set

* fix: Include git commit id in release containers

---------

Co-authored-by: timvisee <tim@visee.me>
2024-02-22 21:26:44 +05:30
dependabot[bot]
6cd1e7f6cd Bump arduino/setup-protoc from 2 to 3 (#3536)
Bumps [arduino/setup-protoc](https://github.com/arduino/setup-protoc) from 2 to 3.
- [Release notes](https://github.com/arduino/setup-protoc/releases)
- [Commits](https://github.com/arduino/setup-protoc/compare/v2...v3)

---
updated-dependencies:
- dependency-name: arduino/setup-protoc
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 10:01:24 +01:00
Arnaud Gourlay
f510fb151f Remove doctest usage (#3475) 2024-01-29 10:21:10 +01:00
Andrey Vasnetsov
5afe7defc4 Revert "fix: Include git commit id while building docker image if possible" (#3468) 2024-01-26 00:29:20 +01:00
Kumar Shivendu
85a08adcb8 fix: Include git commit id while building docker image if possible (#3419)
* feat: Print commit id in dev container build workflow

* fix: Keep .git while building Qdrant binary in docker

* fix: Remove redundant printing of git commit id

* fix: Copy only git files first

* fix: Docker build should have commit id if present

* refactor: Use fewer lines of code
2024-01-25 23:24:19 +05:30
Kumar Shivendu
fed3262048 fix: ghcr image name should be just qdrant (#3416) 2024-01-17 19:39:14 +05:30
Kumar Shivendu
f16bf879c1 fix: Update main dev image tag in ghcr (#3411)
* fix: Update main dev image tag in ghcr

* fix: Improve name of the workflow
2024-01-17 17:30:02 +05:30
Dhanus
7740656e4b build: AppImage release (#3343)
* fix: formatting

* build: AppImage release

* chore: add x86_64 in file name

* chore: appimage issues fix

* chore: remove chmod

* build: appimage on ubuntu 20.04

* fix: formatting

* build: AppImage release

* chore: add x86_64 in file name

* chore: appimage issues fix

* chore: remove chmod

* build: appimage on ubuntu 20.04

* include web ui

* fix: linux build

* fix: use UI files within appimage instead of copying

* chore: cleanup
2024-01-16 13:26:20 +01:00
Kumar Shivendu
ea32150b0e feat: Expose git commit id in the health check endpoint (#3346)
* feat: Expose git commit id in the health check endpoint

* fix: CI errors

* test: Add test for health check api

* feat: Add / endpoint to openapi schema

* Make git commit hash optional

* ci: Enable debugging setup-protoc action

* Install later protobuf compiler through GitHub Action

* Disable debug mode for setup-protoc job

* refactor: Use commit instead of commit_id

* fix: Use commit instead of commit_id gRPC docs

* test: Update ping API test

* refactor: Rename ping api to root api

---------

Co-authored-by: timvisee <tim@visee.me>
2024-01-09 16:14:08 +05:30
neo773
3818e459d6 Add debian package build step (#3344) 2024-01-08 11:19:14 +00:00
Dhanus
daeccc3253 feat: musl release (#3342) 2024-01-06 22:00:31 +00:00
Kumar Shivendu
8cd3c4a82f fix: Prune containers and volumes in self hosted gh runner (#3316) 2024-01-04 18:47:08 +05:30
generall
ba42d4ceb6 replace docker.pkg.github.com with ghcr.io 2023-12-27 14:52:14 +00:00
generall
2490e6ed0d add dokcerx prune 2023-12-27 13:17:01 +00:00
generall
783ecee3f1 almost empty commit to dev to trigger CI build 2023-12-27 12:55:26 +00:00
Kumar Shivendu
8d8e2ddfac ci: Preserve images from the dev branch (#3199)
* ci: Preserve images from the dev branch

* fix: Trigger build for dev containers on dev branch merge

* refactor: Rename jobs and remove unused code

* recover dockerhub credentials from the dev build CI

* fix typo

* add workflow dispatch

* switch to github token [skip ci]

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-12-27 18:19:16 +05:30
dependabot[bot]
0e4e6ed2ba Bump actions/upload-artifact from 3 to 4 (#3238)
* Bump actions/upload-artifact from 3 to 4

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* bump download/artifact as well

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2023-12-20 10:56:23 +01:00
dependabot[bot]
bd9ca77773 Bump actions/setup-python from 4 to 5 (#3209)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-13 11:38:09 +00:00
Tim Visée
10649f881b Explicitly update rustup toolchain (#3214) 2023-12-12 17:34:59 +01:00
Tim Visée
ac82526cc7 Fix release artifacts for macOS (#3194)
* Install latest stable Rust version on macOS and Linux for release builds

* Rustup is already available on macOS, don't install it
2023-12-11 13:06:56 +01:00
Wesley
8b806f90de Read-Only API keys (#2979)
* Read-only API keys

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>

Correct placement of OpenAPI security

Place regex dep with actix/tonic

* Read-only API keys

* Replace with pytests

* API Key tests run on the same job

* Drop allow dead-code

* Rename setting key

* Containerized tests

* No special config files

* DRY

* refactor: re-use can_write method

* refactor: replace static by constants

* refactor: get PID from `$!`

* refactor: use explicit brackets on boolean condition

* style: fix identation

* small fixes + account for new APIs

* specify security in openapi

* small fix + chmod for .sh testfile

* add best-efford check for api consistency

---------

Co-authored-by: Amr Hassan <amr.hassan@gmail.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2023-11-23 21:58:35 +01:00
Roman Titov
f2d2a06eb5 Add custom TLS certificate support for remote snapshot downloads to snapshot recover APIs (#2895)
* WIP: Add proper HTTPS support for remote snapshot downloads to snapshot recover APIs

* Implement HTTPS client configuration

* fixup! Implement HTTPS client configuration

Move HTTPS client configuration from `actix/certificate_helpers.rs` to
`common/http_client.rs`

* Initialize and propagate HTTPS client to shard snapshot API

* Use reqwest client reference where possible

* Add integration test

* Simplify HTTP(S) client initialization

* fixup! Simplify HTTP(S) client initialization

* Fix lifetime conflicts after rebase on dev

* Add comment to elaborate on PEM concatenation

* fixup! Add integration test

Add `test_tls_snapshot_shard_transfer.sh` run to the existing TLS test job
instead of creating a new one

---------

Co-authored-by: timvisee <tim@visee.me>
2023-11-10 09:56:49 +01:00
Arnaud Gourlay
d135fbb441 Fix cargo test doc (#2856)
* fix cargo test doc

* run doc test on CI

* try re-ordering tests execution to check if it takes less time
2023-10-20 16:45:37 +02:00
Luis Cossío
de3a4f4560 CI: improve automatic issue creation (#2706)
* improve automatic issue creation
- restrict to only create automatic issues on PRs of authors of the org, or on dev/main
- modify link to failed job, currently this only applies to the issue reporting job, because it's hard to link them to the actual flaky failure run, but it already improves it.
- reduce retries to only 2. Having 3 tries in total feels more than enough.

* debug author association

* ignore issue updating failure

* cleanup
2023-09-22 09:45:17 -03:00
dependabot[bot]
5012799077 Bump docker/build-push-action from 4 to 5 (#2686)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 10:40:42 +02:00
dependabot[bot]
159a12936b Bump docker/setup-buildx-action from 2 to 3 (#2685)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 08:40:59 +02:00
Luis Cossío
7e28613240 reference PR in flaky test template. (#2679)
Also separate build and test stages
2023-09-18 15:36:22 +02:00