-
Notifications
You must be signed in to change notification settings - Fork 5
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
Sample API update #329
Sample API update #329
Conversation
0422437
to
51a4b85
Compare
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.
Looks good Dave. Thanks for the provenance changes too btw, although I was curious: Would there not be cases where there might be a valid provenance change that we would now miss out on? It might be worth the extra logic to look exclusively at the timestamp.
My thought was that if the only thing changing is the provenance, then the record's actual data is not changing, so the update isn't needed and the new provenance isn't really relevant. |
Allow `access_role` value to be set via warehouse/sample POST endpoint. This column is used in the table's row-level security policy to restrict access to specific database roles as needed.
When detecting data changes in sample upsert function, timestamp changes in the `_provenance` were causing otherwise unchanged records to be updated. Removing this value for comparison purposes in a copy of the dict, and retaining the original for insert and update.
7bb6147
to
c2126ad
Compare
Ah ok, that seems fair wrt provenance- Thanks! |
Deployed. |
Updates to warehouse/sample POST endpoint to allow
access_role
value to be passed. A database constraint will ensure this value is set correctly based on thesample_origin
which can be used to identify data from a project that should have restricted access.