-
Notifications
You must be signed in to change notification settings - Fork 31
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: make namespace for local keys NOT mandatory #1135
Conversation
@srieteja why is this necessary? |
@gkc There was an issue a couple of months ago where the lastReceivedServerCommitId key was not being created if namespace is not set in at_client_preferences(no namespace is set while creating the key). We discussed this on the arch call and concluded that we should not enforce namespace validation on local keys to resolve this issue. I think I remember you were a part of the discussion. more details at: #1075 |
Got it - thanks. |
make the version change in pubspec and AtClientConfig |
@@ -97,14 +97,15 @@ class AtClientValidation { | |||
} | |||
// If key starts with 'cached:' (or) if the metadata of key has isCached set to true; it represent | |||
// a cached key. Prevent client updating the cached key. Hence throw exception. | |||
if (atKey.key!.startsWith('$CACHED:') || | |||
if (atKey.key!.startsWith('${AtConstants.cached}:') || | |||
(atKey.metadata != null && atKey.metadata!.isCached)) { | |||
throw AtKeyException('Cannot create/update a cached key'); | |||
} | |||
// If namespace is not set on key and in preferences, throw exception | |||
if ((atKey.namespace == null || atKey.namespace!.isEmpty) && |
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.
change this condition to
if (((atKey.namespace == null || atKey.namespace!.isEmpty &&) !atKey.isLocal) &&
(atClientPreference.namespace == null ||
atClientPreference.namespace!.isEmpty)
)
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.
change made as part of 27600db
…' into namespace_localkey_not_mandatory
The version has been updated to 3.0.66 in pubspec and at_client_config |
Closes #1075
- What I did
- How I did it
- How to verify it
- Description for the changelog
fix: make namespace for local keys NOT mandatory