-
Notifications
You must be signed in to change notification settings - Fork 115
Added new reserved char and fixing studio tests #1196
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
Reviewer's GuideThis PR adds the '@' character to the reserved character sets for dataset, namespace, and project names, and adjusts the CI tests-studio workflow to use the correct environment variable for namespace. Class diagram for reserved character changes in Dataset, Namespace, and ProjectclassDiagram
class Dataset {
+DATASET_NAME_RESERVED_CHARS = [".", "@"]
+DATASET_NAME_REPLACEMENT_CHAR = "_"
}
class Namespace {
+NAMESPACE_NAME_RESERVED_CHARS = [".", "@"]
}
class Project {
+PROJECT_NAME_RESERVED_CHARS = [".", "@"]
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Deploying datachain-documentation with
|
Latest commit: |
acd27c4
|
Status: | ✅ Deploy successful! |
Preview URL: | https://8008966f.datachain-documentation.pages.dev |
Branch Preview URL: | https://ilongin-11817-change-default.datachain-documentation.pages.dev |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1196 +/- ##
=======================================
Coverage 88.72% 88.72%
=======================================
Files 152 152
Lines 13575 13575
Branches 1889 1889
=======================================
Hits 12044 12044
Misses 1088 1088
Partials 443 443
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Hey @ilongin - I've reviewed your changes - here's some feedback:
- Add unit tests to verify that names containing '@' now correctly trigger validation errors for datasets, namespaces, and projects.
- Consider centralizing the reserved-character lists into a shared constant or utility to avoid duplication across dataset, namespace, and project modules.
- Double-check handling or migration strategy for any existing resources with '@' in their names, as this change tightens name validation and may be breaking.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Add unit tests to verify that names containing '@' now correctly trigger validation errors for datasets, namespaces, and projects.
- Consider centralizing the reserved-character lists into a shared constant or utility to avoid duplication across dataset, namespace, and project modules.
- Double-check handling or migration strategy for any existing resources with '@' in their names, as this change tightens name validation and may be breaking.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -6,7 +6,7 @@ | |||
from datachain.error import InvalidNamespaceNameError | |||
|
|||
N = TypeVar("N", bound="Namespace") | |||
NAMESPACE_NAME_RESERVED_CHARS = ["."] | |||
NAMESPACE_NAME_RESERVED_CHARS = [".", "@"] |
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.
just to make sure - are those replaced / escaped automatically if username contains them? do we check it when we create the default namespace from the username?
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.
They are replaced automatically for default namespace and validated when creating random namespace (error is thrown if name contains some of those)
Adding
@
to reserved chars and fixing studio tests due to Studio companion PR changes: https://github.com/iterative/studio/pull/11823Summary by Sourcery
Add '@' to reserved characters for dataset, namespace, and project names, and update the CI workflow variable to fix Studio tests.
Enhancements:
CI: