-
Notifications
You must be signed in to change notification settings - Fork 30
Remove Datastore config reportUsedStorage.enabled. Set in DB instead #9024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThis PR removes the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
test/db/dataStores.csvis excluded by!**/*.csv
📒 Files selected for processing (6)
app/controllers/WKRemoteDataStoreController.scala(1 hunks)app/models/dataset/DataStore.scala(0 hunks)conf/application.conf(1 hunks)unreleased_changes/9024.md(1 hunks)webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/DSRemoteWebknossosClient.scala(2 hunks)webknossos-datastore/conf/standalone-datastore.conf(0 hunks)
💤 Files with no reviewable changes (2)
- app/models/dataset/DataStore.scala
- webknossos-datastore/conf/standalone-datastore.conf
🧰 Additional context used
🧬 Code graph analysis (1)
webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/DSRemoteWebknossosClient.scala (1)
webknossos-datastore/app/com/scalableminds/webknossos/datastore/rpc/RPCRequest.scala (1)
patchJson(232-236)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: backend-tests
- GitHub Check: frontend-tests
- GitHub Check: build-smoketest-push
🔇 Additional comments (4)
conf/application.conf (1)
99-99: LGTM! Helpful clarification added.The inline comment clearly documents that storage scanning is controlled by the PostgreSQL
reportUsedStorageEnabledflag, which aligns with the PR's objective of moving this configuration to the database.app/controllers/WKRemoteDataStoreController.scala (1)
156-164: LGTM! Simplified status update logic.The removal of the
updateReportUsedStorageEnabledByNamecall correctly implements the PR objective: the datastore status update no longer overwrites the database value on every ping. ThereportUsedStorageEnabledflag is now managed exclusively through direct database updates.webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/DSRemoteWebknossosClient.scala (2)
78-81: Patch payload correctly updated.The status report now sends only the essential fields (
okandurl), which aligns with the simplifiedDataStoreStatustype and the controller's streamlined handling logic.
31-34: Verification complete: DataStoreStatus removal is consistent and correct.The verification confirms that
reportUsedStorageEnabledhas been successfully removed fromDataStoreStatusin the webknossos-datastore module with no breaking references. The field is properly retained in the main application'sDataStoremodel (app/models/dataset/DataStore.scala), which aligns with the PR objective of managing this flag exclusively in the database. The DataStoreStatus constructor at line 81 uses only the simplified 2-field structure (ok, url), confirming the change is complete.
This config option overwrote the value in postgres with every datastore ping. We want to be able to set it in the db permanently.
In fact, we set it to true in the test DB. This will be tested in the libs tests.
Steps to test
$PR_NUMBER.mdfile inunreleased_changesor use./tools/create-changelog-entry.py)