-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix legacy support for outdated displayName field of datasets #8263
Fix legacy support for outdated displayName field of datasets #8263
Conversation
Warning Rate limit exceeded@MichaelBuessemeyer has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 23 minutes and 33 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces changes to the Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
withJsonBodyUsing(datasetPublicReads) { | ||
case (description, datasetName, legacyDatasetDisplayName, sortingKey, isPublic, tags, metadata, folderId) => { | ||
val name = if (datasetName.isDefined) datasetName else legacyDatasetDisplayName | ||
val name = if (legacyDatasetDisplayName.isDefined) legacyDatasetDisplayName else datasetName | ||
for { | ||
datasetIdValidated <- ObjectId.fromString(datasetId) | ||
dataset <- datasetDAO.findOne(datasetIdValidated) ?~> notFoundMessage(datasetIdValidated.toString) ~> NOT_FOUND |
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.
This fixes the precedence issue described in the pr description
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: 0
🧹 Outside diff range and nitpick comments (1)
CHANGELOG.unreleased.md (1)
35-35
: Enhance the changelog entry to better describe the fix.The current entry could be more descriptive about the specific issues being fixed. Consider expanding it to:
-Fix read and update dataset route for versions 8 and lower. [#8263](https://github.com/scalableminds/webknossos/pull/8263) +Fixed legacy support for dataset displayName field in read and update routes for API versions 8 and lower, ensuring proper handling of dataset renaming via displayName. [#8263](https://github.com/scalableminds/webknossos/pull/8263)This provides more context about:
- The specific field affected (displayName)
- The nature of the fix (legacy support)
- The impact (proper handling of dataset renaming)
Fixes a compatibility bug introduced in #8075.
wk.Dataset.open_remote("...").display_name = "fancy name"
did not result in any changes due to two bugs:displayName
as "old" clients like wklibs always send the current name of the ds and the updateddisplayName
. Therefore, thedisplayName
should take precedence. Clients using new API version should no longer send the `displayName prop and thus renaming with them should also still work.URL of deployed dev instance (used for testing):
Steps to test:
None
as thedisplayName
is not included in the json format of the dataset. This should be fixed in this pr.Issues:
(Please delete unneeded items, merge only when none are left open)