External Storage: add external_storage_runner to handle core extstore logic#2094
External Storage: add external_storage_runner to handle core extstore logic#2094cconstable wants to merge 3 commits into
Conversation
|
|
||
| await t.throwsAsync(() => runExternalStore({ externalStorage, payloads: [makePayload(1)] }), { | ||
| instanceOf: ExternalStorageSelectorInvalidDriverError, | ||
| message: /TMPRL1109/, |
There was a problem hiding this comment.
Forgot to update these tests. Updating now.
| @SymbolBasedInstanceOfError('ExternalStorageNotConfiguredError') | ||
| export class ExternalStorageNotConfiguredError extends Error { | ||
| constructor(message: string) { | ||
| super(`[TMPRL-SDK-00001] ${message}`); |
There was a problem hiding this comment.
I think this is https://github.com/temporalio/rules/blob/main/rules/TMPRL1105.md
There was a problem hiding this comment.
According to the rules page this should just emit a log... it doesn't look like an error. Regardless, I'll add the log for it when we actually integrate that piece. I preemptively added it here thinking it would be used in this PR.
96233a3 to
570b9c8
Compare
1b6c2b9 to
447552b
Compare
837ddbe to
5d2a055
Compare
| * @experimental | ||
| */ | ||
| @SymbolBasedInstanceOfError('ExternalStorageDriverOperationFailedError') | ||
| export class ExternalStorageDriverOperationFailedError extends Error { |
There was a problem hiding this comment.
I would remove this for now and then apply it across the board to all extstore implementations if we feel the need for it.
| * Thrown when a driver's `store()` or `retrieve()` raises. Wraps the | ||
| * underlying error in `cause` (network, auth, rate-limit, S3 5xx, etc). | ||
| * | ||
| * @experimental |
There was a problem hiding this comment.
@internal if we're keeping this. It isn't user-code catchable.
| await t.throwsAsync(() => readerRunner.retrieve(storedPayloads), { | ||
| instanceOf: ValueError, | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Should have more retrieve tests around checking arity, mixed reference and pass through payloads in a single array, sibling driver abort causes all to abort, multiple references to the same driver are batched together, etc.
What was changed
external_storage_runnerthat handles core external storage logic.Checklist