-
Notifications
You must be signed in to change notification settings - Fork 77
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
Enhance: add entity version number and modify update entity API to work with version #951
Enhance: add entity version number and modify update entity API to work with version #951
Conversation
It sounds like this PR closes #832. Does that sound right? |
721f8ee
to
8c5c79e
Compare
test/integration/api/entities.js
Outdated
})); | ||
|
||
it('should reject if version does not match', testEntities(async (service) => { | ||
// TODO: change logic around force flag and enforcing certain kinds of updates |
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.
can remove this and above TODO comment now?
@@ -1317,7 +1317,7 @@ describe('datasets and entities', () => { | |||
.then(({ headers, text }) => { | |||
headers['content-disposition'].should.equal('attachment; filename="goodone.csv"; filename*=UTF-8\'\'goodone.csv'); | |||
headers['content-type'].should.equal('text/csv; charset=utf-8'); | |||
text.should.equal('name,label,first_name,age\n12345678-1234-4123-8234-123456789abc,Alice (88),Alice,88\n'); | |||
text.should.equal('name,label,version,first_name,age\n12345678-1234-4123-8234-123456789abc,Alice (88),1,Alice,88\n'); |
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.
One thing I noticed when trying to make a form that looked up the version, and based on what we're talking about in the team meeting on Aug 29, name
and label
have to be what they are, but should version
be __version
?
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.
I like version
for the attachment csv
Changes:
forms/attachment/dataset.csv
also returns version numberWhat has been done to verify that this works as intended?
Integration tests and manual testing with frontend
Why is this the best possible solution? Were any other approaches considered?
Other option was to add version in query parameter or body, but version in ETag and If-Match is a cleaner approach
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
None
Does this change require updates to the API documentation? If so, please update docs/api.md as part of this PR.
Will do it in a separate PR
Before submitting this PR, please make sure you have:
make test-full
and confirmed all checks still pass OR confirm CircleCI build passes