-
-
Notifications
You must be signed in to change notification settings - Fork 351
Open
Description
Problem
`--clean` is documented as wiping the database, but it silently does nothing unless `--update-graph` is also passed.
The implementation gates `clean_database()` inside `if update_graph:`:
```python
if update_graph:
...
with connect_memgraph(...) as ingestor:
if clean:
ingestor.clean_database()
```
So `cgr start --clean --repo-path /some/repo` connects to nothing and exits successfully, giving the user no indication that the database was not wiped.
Expected behaviour
Either:
- `--clean` works independently of `--update-graph` (wipe the database without re-indexing), or
- A clear error/warning is emitted when `--clean` is passed without `--update-graph`
Option 1 is more useful and allows separating the "wipe" step from the "index" step in scripts.
Workaround
Always combine the flags: `cgr start --clean --update-graph --repo-path ...`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
No status