modal-labs / modal-client

Python client library for Modal
https://modal.com/docs
Apache License 2.0
271 stars 35 forks source link

Adjust cls @build test to use standalone function references #1953

Closed freider closed 3 months ago

freider commented 3 months ago

Tests were not representative of how we actually load+trigger builder functions in production. These updated tests failed on v0.63.19, but passes since v0.63.2.

Builder functions aren't using class servicer functions, since that function definition needs to be set to the image we are actually building.

Side note: Need to think about how we can run these tests more "end to end", i.e. first load using the current client and then trigger the container based on the function definition we just loaded. Right now the run_container tests basically mock the "loading" and manually constructs ContainerArgs...