SAME-Project / same-project

https://sameproject.ml/
Apache License 2.0
19 stars 8 forks source link

Prototype implementation of durable functions backend. #154

Closed Bubblyworld closed 2 years ago

Bubblyworld commented 2 years ago

See #123. Implements an azure durable functions backend for SAME, which can be targeted using same run -t functions [...]. Requires credentials to be provided either using environment variables (see azure documentation on service principals), or using cached credentials from running az login (more useful if you have a personal azure account).

The current set of features are:

What is not currently supported:

I've left TODO markers around the codebase to indicate where the missing features can be implemented. Should mostly be quite straightforward, with the exception of custom docker images, as a durable function runs in a single pre-configured container.

What a journey! Took much longer than expected, documentation for the python azure SDK is lacking, to say the least.

Bubblyworld commented 2 years ago

The test suite can be run against durable functions with the --functions flag:

FUNCTIONS_SUBSCRIPTION_ID="<azure subscription ID>" pytest --functions

If the functionapp has already been provisioned, the FUNCTIONS_SKIP_PROVISIONING="true" environment variable can also be set to speed the tests up significantly. An example of running a SAME notebook against the functions backend:

Screenshot 2022-05-27 at 11 56 45

The resulting URL can be cURLed to obtain execution status and results:

Screenshot 2022-05-27 at 11 57 09
github-actions[bot] commented 2 years ago

Unit Test Results

  1 files    1 suites   13m 43s :stopwatch: 95 tests 66 :heavy_check_mark: 29 :zzz: 0 :x:

Results for commit 90a08f84.