informatics-isi-edu / hatrac

Simple object storage for collaborations
Apache License 2.0
3 stars 1 forks source link

Metadata sub-resources #34

Closed karlcz closed 7 years ago

karlcz commented 7 years ago

This generalizes the internal storage and handling of object metadata (sent as HTTP headers with object creation and retrieval) and adds a sub-resource api for managing metadata after the fact.

This is basically read to review and merge if acceptable for the filesystem backend. The S3 backend has been refactored for the same internal changes but not tested at all.

There are two compatibility changes I know about:

  1. Now requiring Postgres 9.5 or later
  2. The JSON representation of an existing upload job is changed to make it more consistent with the rest of the API. I don't think any clients actually look at this, since they usually create a job, send chunks, and finalize without ever needing to GET the upload job description.

@hongsudt please see the REST-API document updates since this covers features you requested @robes or @mikedarcy do you think you can review the code changes at all? @kylechard could you test on S3 and contribute fixes as needed (as well as review the other changes time permitting)?

karlcz commented 7 years ago

Hmm, I see travis is failing so I'll have to look into that next...

OK, the changes to make deployment and schema upgrade idempotent depend on Postgres 9.5 or newer SQL language features (we were previously testing on 9.4). I've changed the travis build environment and readme to reflect this.

I think it is OK since 9.6 is already out and already supported on AWS RDS. There are clear benefits to upgrading Postgres and I don't think we need to cater to older versions here.

karlcz commented 7 years ago

Can someone please review this? @svoinea was just asking for the feature and I had a confusing conversation with him until I realized the PR still isn't merged...