fal-ai / fal

⚡ Fastest way to serve open source ML models to millions
https://fal.ai/docs
Apache License 2.0
509 stars 44 forks source link

fix(toolkit): use random string when uploading to gcp/r2 #257

Closed efiop closed 2 months ago

efiop commented 2 months ago

This fixes the overlap issues in cases where you try to upload 2 files with the same name.

Note that I removed the tests introduced in #115 , because the approach here is super obvious/declarative and it is just not worth the overhead of using real storage providers and maintaining that, every test like that is making our test suit more flaky and slow, forcing us to be more sloppy.

We could add unit tests for something like self._get_key, but again, considering how straightforward this is - probably not worth it.

Regarding the old fal-cdn using file extension - that will come as a revival of https://github.com/fal-ai/fal-cdn/pull/4 in a separate PR (https://github.com/fal-ai/fal-cdn/pull/23)

linear[bot] commented 2 months ago

FEA-2096 Use set extension for download links of GCS

chamini2 commented 2 months ago

I agree the solution is super straightforward but the tests are mostly there to make sure we do not have regressions