modal-labs / modal-client

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

Fix cls builder functions MOD-3210 #1951

Closed freider closed 3 months ago

freider commented 3 months ago

Largely a revert of #1945

Changelog

freider commented 3 months ago

👍 on the code change but is there a test we could have had that would have blocked this from going in originally?

An integration test for @build would have been the most straight-forward way of catching this. There are client tests too, but they sadly require the test setup to explicitly trigger the function in standalone mode rather than "new style method mode" which we weren't doing.

I'm separately working on fixing them, but we'd need a bit more of an "end to end" test harness in the client to safely do changes like this