elasticio / maester-client

The official object-storage client library for sailor-nodejs.
Apache License 2.0
0 stars 0 forks source link

V4 #29

Closed EmptyInfinity closed 2 years ago

PaulAnnekov commented 2 years ago

Platform team requirements:

  1. Nightly tests in CI.
  2. Disable dev dependencies check during audit.
  3. Version should adhere to semver rules. Breaking change - new major version.
  4. All tests from object-storage-client must be present here. Especially which cover some edge cases (like passing the same stream on retry).
  5. Exponential back-off like in object-storage-client.
  6. All errors should be handled like in latest object-storage-client. Now they don't. E.g. I don't see Client error handler.

Now related to how our services are using the lib (I didn't check you PR in details and not sure you saved these features, most likely you did):

  1. We should be able to create an instance to make add/update/delete requests. The instance should accept maester uri and jwtSecret.
  2. Each method that modifies DB object should accept ttl. ttl can have -1 value.
  3. There should be ability to add stream for encrypt/decrypt.
  4. There should be ability to GET object as stream with specified jwt payload.
  5. There should be ability to PUT as stream with retries: 0.
  6. There should be ability to PUT with custom ttl and contentType (we get it from webhook request headers).
  7. There should be ability to POST a json object.
  8. There should be ability to GET object as json object.
  9. There should be ability to DELETE an object by ID.
EmptyInfinity commented 2 years ago

Platform team requirements:

  • [x] 1. Nightly tests in CI.
  • [x] 2. Disable dev dependencies check during audit.
  • [x] 3. Version should adhere to semver rules. Breaking change - new major version.
  • [x] 4. All tests from object-storage-client must be present here. Especially which cover some edge cases (like passing the same stream on retry). (Passing same stream could be covered only with positive test)
  • [x] 5. Exponential back-off like in object-storage-client. (Because of having ability to config "delay on retry" was implemented logic like this)
  • [ ] 6. All errors should be handled like in latest object-storage-client. Now they don't. E.g. I don't see Client error handler. (Error handling were left as it is, you may familiar with handling approach in integration-tests)

Now related to how our services are using the lib

PaulAnnekov commented 2 years ago

Can you provide an example on how to override Content-Type for update?

EmptyInfinity commented 2 years ago

Can you provide an example on how to override Content-Type for update?

there is no way to pass custom contentType, because it's calculated automatically And here is integration tests examples