Skip to content

Conversation

@miparnisari
Copy link
Contributor

Fix error message that appears when trying to run datastore gc or datastore repair on datastores that don't support them.

Before

$ docker run --name cockroachdb -d --rm -p 26257:26257 -p 8080:8080 cockroachdb/cockroach:latest start-single-node --insecure --max-offset=50ms 

$  go run ./cmd/spicedb/main.go datastore gc \
--datastore-engine cockroachdb \
--datastore-conn-uri "postgresql://root@localhost:26257/defaultdb?sslmode=disable"
...

ERR terminated with errors error="datastore of type *datastore.ctxProxy does not support garbage collection"                                                                                                     
exit status 1

After

$ docker run --name cockroachdb -d --rm -p 26257:26257 -p 8080:8080 cockroachdb/cockroach:latest start-single-node --insecure --max-offset=50ms 

$  go run ./cmd/spicedb/main.go datastore gc \
--datastore-engine cockroachdb \
--datastore-conn-uri "postgresql://root@localhost:26257/defaultdb?sslmode=disable"
...

ERR terminated with errors error="datastore of type 'cockroachdb' does not support garbage collection"
exit status 1

@github-actions github-actions bot added area/cli Affects the command line area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels Oct 11, 2025
@miparnisari miparnisari force-pushed the fix-err-msg-type-of-datastore branch from ea3b4ed to a144bfb Compare October 11, 2025 01:33
@codecov
Copy link

codecov bot commented Oct 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.07%. Comparing base (c39bf5f) to head (1c0b6cc).

❌ Your project check has failed because the head coverage (59.07%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (c39bf5f) and HEAD (1c0b6cc). Click for more details.

HEAD has 28 uploads less than BASE
Flag BASE (c39bf5f) HEAD (1c0b6cc)
54 26
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2609       +/-   ##
===========================================
- Coverage   79.42%   59.07%   -20.35%     
===========================================
  Files         455      413       -42     
  Lines       47156    43729     -3427     
===========================================
- Hits        37448    25827    -11621     
- Misses       6950    15411     +8461     
+ Partials     2758     2491      -267     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@miparnisari
Copy link
Contributor Author

TO DO: the tests aren't running 🫠

@miparnisari miparnisari force-pushed the fix-err-msg-type-of-datastore branch from 0cc3ae3 to 1c0b6cc Compare October 30, 2025 01:28
@github-actions github-actions bot removed the area/datastore Affects the storage system label Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli Affects the command line area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants