Skip to content
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

[Bug] Storage API Versioning #42

Closed
anderslyman opened this issue Oct 27, 2020 · 2 comments
Closed

[Bug] Storage API Versioning #42

anderslyman opened this issue Oct 27, 2020 · 2 comments

Comments

@anderslyman
Copy link

Describe the bug
Storage API does not respect versioning

Steps to reproduce
Get something from storage:

this.mondayClientSdk.storage.instance.getItem(key).then(
    r => {
      const version = r.data.version;
      // Keep track of the version
    }
);

Store a new value:

this.mondayClientSdk.storage.instance.setItem(key, value).then(
  r => console.log(r),
  e => console.error(e)
);

Note that a different version is now in stored.

Now try to store a new value using the version retrieved in the first snippet:

this.mondayClientSdk.storage.instance.setItem(key, value, {previous_version: version}).then(
  r => console.log(r),
  e => console.error(e)
);

This succeeds and does not result in a version_conflict error as described in the docs.

Expected behavior
A version_conflict error.

@anderslyman anderslyman changed the title [Bug] [Bug] Storage API Versioning Oct 27, 2020
@gregra81
Copy link
Collaborator

Hey @anderslyman. I know this is coming two and a half years later (we're doing some cleanup on our issues), but this one is resolved for some time

@anderslyman
Copy link
Author

@gregra81 much appreciated, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants