Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
caf4801
feat: implement full delete feature
borisarzentar Oct 12, 2025
c438be7
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Oct 12, 2025
dc64dd5
fix: use new delete in API and cli
borisarzentar Oct 13, 2025
4d1cf53
fix: failing tests
borisarzentar Oct 13, 2025
77732d8
fix: usage of delete feature in tests
borisarzentar Oct 14, 2025
0df22fe
fix: correct mock paths
borisarzentar Oct 14, 2025
f83fa12
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Oct 14, 2025
344b057
fix: change the way datasets import is mocked
borisarzentar Oct 14, 2025
ed27277
fix: import datasets directly in delete cli command
borisarzentar Oct 14, 2025
82daeee
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Oct 14, 2025
2ea24da
fix: move datasets import in delete cli command
borisarzentar Oct 14, 2025
3f0eb3b
Merge branch 'dev' into feature/cog-3014-refactor-delete-feature
hajdul88 Oct 14, 2025
fdc6113
fix: get_graph_from_model added nodes and edges default values
borisarzentar Oct 14, 2025
e6166d2
fix: lint error
borisarzentar Oct 14, 2025
5a05002
fix: update poetry.lock
borisarzentar Oct 14, 2025
fda0edc
fix: pass context to distributed cognee tasks
borisarzentar Oct 14, 2025
310d713
fix: Dataset import
borisarzentar Oct 14, 2025
a062ecb
fix: use Dataset instead of dataset_id
borisarzentar Oct 15, 2025
4899191
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Oct 16, 2025
d9995a8
fix: check delete permissions before deleting dataset data
borisarzentar Oct 16, 2025
a46b501
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Oct 16, 2025
cd8b952
fix: unit tests
borisarzentar Oct 16, 2025
b2c632c
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Oct 18, 2025
423e49c
Merge branch 'dev' into feature/cog-3014-refactor-delete-feature
borisarzentar Oct 21, 2025
efb57ee
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Oct 30, 2025
d8703aa
fix: add migration and backwards compatibility
borisarzentar Oct 30, 2025
ae17187
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Oct 30, 2025
1864fc8
fix: unit tests
borisarzentar Oct 30, 2025
737b6dc
fix: revert dataset fetching in run_tasks
borisarzentar Oct 31, 2025
94d2ca0
fix: memify coding agent pipeline
borisarzentar Oct 31, 2025
4b067be
fix: add delete tests
borisarzentar Oct 31, 2025
98551c4
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 1, 2025
b0d1b92
test: move deletion tests to e2e_tests
borisarzentar Nov 1, 2025
42eb898
fix: properly delete vector collection items
borisarzentar Nov 3, 2025
5efd0a4
fix: check vector collections in delete tests
borisarzentar Nov 3, 2025
79983c2
fix: handle data deletion with backwards compatibility
borisarzentar Nov 4, 2025
e29e53d
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 4, 2025
ba4e5c3
fix: improve llm output mock
borisarzentar Nov 4, 2025
01a4430
fix: lint errors
borisarzentar Nov 4, 2025
81c2797
fix: remove edge_text edges from vector store
borisarzentar Nov 5, 2025
8309003
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 5, 2025
add1556
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 5, 2025
a081f8b
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 7, 2025
2e234e1
fix: move access control check to infra
borisarzentar Nov 7, 2025
183852b
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 9, 2025
4198ee0
fix: legacy data deletion tests doesn't require auth
borisarzentar Nov 10, 2025
72a6a2a
fix: remove operating systems from e2e_tests
borisarzentar Nov 10, 2025
142db02
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 10, 2025
80359ed
Merge branch 'dev' into feature/cog-3014-refactor-delete-feature
borisarzentar Nov 11, 2025
47c3c90
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 13, 2025
9f46934
fix: fix mistake in multi_user_support_possible
borisarzentar Nov 13, 2025
8562eec
fix: change down revision for graph tables migration
borisarzentar Nov 13, 2025
fa450fa
fix: remove unused set_current_user and add missing delete test to e2…
borisarzentar Nov 13, 2025
698d832
fix: remove old import
borisarzentar Nov 13, 2025
03934fd
fix: make tests work with neo4j and fix get_graph_data in neo4j
borisarzentar Nov 13, 2025
468205f
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 13, 2025
17632a5
fix: add delete support for single db graphs
borisarzentar Nov 13, 2025
fd6c04e
fix: add delete_dataset test for kuzu and neo4j
borisarzentar Nov 13, 2025
9a14388
fix: remove unused test
borisarzentar Nov 13, 2025
81aca0d
fix: send owner_id to set`set_database_global_context_variables` in d…
borisarzentar Nov 14, 2025
7858e3f
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 14, 2025
0c2eeb8
fix: revert neo4j get_graph_data change
borisarzentar Nov 14, 2025
9315f3f
fix: set context properly before running cognee methods tests
borisarzentar Nov 14, 2025
07c28c0
fix: fallback parsing of metadata in delete test
borisarzentar Nov 14, 2025
c4525d8
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 14, 2025
77b3e73
fix: lint errors
borisarzentar Nov 14, 2025
a89dad3
fix: add detailed tests for delete
borisarzentar Nov 17, 2025
43459ee
fix: improve delete tests
borisarzentar Nov 19, 2025
e6baaf8
fix: lint errors and improve delete tests
borisarzentar Nov 19, 2025
7c5466f
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 19, 2025
bf977d4
fix: add two new tests for delete
borisarzentar Nov 20, 2025
05cb967
fix: get data from dataset in datasets.delete
borisarzentar Nov 20, 2025
b8dff54
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 20, 2025
663dd16
fix: neo4j support in test_delete_default_graph_non_mocked.py
borisarzentar Nov 22, 2025
cb380e5
fix: add attributes to edges
borisarzentar Nov 22, 2025
bc4eb9f
fix: legacy delete backwards compatibility for neo4j
borisarzentar Nov 23, 2025
6fb28d4
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 23, 2025
01da7c4
fix: remove unused param for record_data_in_legacy_ledger
borisarzentar Nov 23, 2025
e17e39f
Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refac…
borisarzentar Nov 25, 2025
8eaf558
Merge branch 'dev' into feature/cog-3014-refactor-delete-feature
borisarzentar Nov 27, 2025
2ff8224
merge done
Vasilije1990 Jan 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
316 changes: 314 additions & 2 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ jobs:
- name: Run Deduplication Example
env:
ENV: 'dev'
ENABLE_BACKEND_ACCESS_CONTROL: 'false'
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} # Test needs OpenAI endpoint to handle multimedia
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
Expand Down Expand Up @@ -288,7 +287,7 @@ jobs:
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run pytest cognee/tests/test_permissions.py -v --log-level=INFO
run: uv run python ./cognee/tests/test_permissions.py

test-multi-tenancy:
name: Test multi tenancy with different situations in Cognee
Expand Down Expand Up @@ -340,6 +339,319 @@ jobs:
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run python ./cognee/tests/test_custom_data_label.py

test-delete-permission:
name: Test delete permission assigned from dataset owner
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: '3.11.x'

- name: Run delete persmission test
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run python ./cognee/tests/test_delete_permission.py

test-deletion-on-default-graph:
name: Delete default graph data test ${{ matrix.python-version }} on ubuntu-22.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ${{ fromJSON(inputs.supported-python-versions) }}
fail-fast: false
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: ${{ matrix.python-version }}

- name: Run deletion on default graph
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run python ./cognee/tests/test_delete_default_graph.py

test-deletion-on-default-graph-non-mocked:
name: Delete default graph data test ${{ matrix.python-version }} on ubuntu-22.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ${{ fromJSON(inputs.supported-python-versions) }}
fail-fast: false
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: ${{ matrix.python-version }}

- name: Run deletion on default graph non mocked
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run python ./cognee/tests/test_delete_default_graph_non_mocked.py

test-deletion-on-custom-graph:
name: Delete custom graph data test ${{ matrix.python-version }} on ubuntu-22.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ${{ fromJSON(inputs.supported-python-versions) }}
fail-fast: false
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: ${{ matrix.python-version }}

- name: Run deletion on custom graph
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run python ./cognee/tests/test_delete_custom_graph.py

test-deletion-on-default-graph_with_legacy_data_1_default:
name: Delete default graph with legacy data test 1 in Kuzu case
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: '3.11.x'

- name: Run deletion on custom graph
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run python ./cognee/tests/test_delete_default_graph_with_legacy_data_1.py

test-deletion-on-default-graph_with_legacy_data_1_neo4j:
name: Delete default graph with legacy data test 1 in Neo4j case
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@master

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: '3.11.x'

- name: Setup Neo4j with GDS
uses: ./.github/actions/setup_neo4j
id: neo4j

- name: Run delete dataset test in Neo4j case
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
GRAPH_DATABASE_PROVIDER: "neo4j"
GRAPH_DATABASE_URL: ${{ steps.neo4j.outputs.neo4j-url }}
GRAPH_DATABASE_USERNAME: ${{ steps.neo4j.outputs.neo4j-username }}
GRAPH_DATABASE_PASSWORD: ${{ steps.neo4j.outputs.neo4j-password }}
run: uv run python ./cognee/tests/test_delete_default_graph_with_legacy_data_1.py

test-deletion-on-default-graph_with_legacy_data_2:
name: Delete default graph with legacy data test 2
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: '3.11.x'

- name: Run deletion on custom graph
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run python ./cognee/tests/test_delete_default_graph_with_legacy_data_2.py

test-delete-two-users-with-legacy-data:
name: Delete data from two users operating on different datasets
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@master

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: '3.11.x'

- name: Run delete test with two users with legacy data
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run python ./cognee/tests/test_delete_two_users_with_legacy_data.py

test-delete-two-users-on-same-dataset:
name: Delete data from two users operating on same dataset
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@master

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: '3.11.x'

- name: Run delete test with two users operating on same dataset
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run python ./cognee/tests/test_delete_two_users_same_dataset.py

test-delete-dataset-default:
name: Delete dataset in Kuzu graph case
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@master

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: '3.11.x'

- name: Run delete dataset test in Kuzu case
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
run: uv run python ./cognee/tests/test_delete_dataset_kuzu.py

test-delete-dataset-neo4j:
name: Delete dataset in Neo4j graph case
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@master

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: '3.11.x'

- name: Setup Neo4j with GDS
uses: ./.github/actions/setup_neo4j
id: neo4j

- name: Run delete dataset test in Neo4j case
env:
ENV: 'dev'
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
GRAPH_DATABASE_PROVIDER: "neo4j"
GRAPH_DATABASE_URL: ${{ steps.neo4j.outputs.neo4j-url }}
GRAPH_DATABASE_USERNAME: ${{ steps.neo4j.outputs.neo4j-username }}
GRAPH_DATABASE_PASSWORD: ${{ steps.neo4j.outputs.neo4j-password }}
run: uv run python ./cognee/tests/test_delete_dataset_neo4j.py

test-graph-edges:
name: Test graph edge ingestion
runs-on: ubuntu-22.04
Expand Down
Loading
Loading