Implement publish, update and unpublish plugins
This is a work in progress implementation of the publish, update and unpublish plugin APIs.
Closes #5
@dzhou121 What do you think about enforcing the icons to have 1:1 aspect ratio? or at least a aspect ratio close to a square 0.8 < w/h < 1.2
@coffee-is-power I don't think that's needed. We can still put it on the right place even if it's not 1:1 aspect ratio.
@dzhou121 what about the size? we can't allow icons to be too big because that would be pretty bad for people with bad internet and us.
50x50...2000x2000 should be enough
we need to balance the limits so people don't abuse. it's important to always verify what's being uploaded, because we're gonna pay for the storage, and it's not cheap.
I've just drafted a File System implementation of the repo, can you take a look at it?
it still doesn't implement the read operation, will do that soon.
Looks good to me so far 👍
I added the get methods in the Repository trait in the morning, I didn't have time to implement them because I went to school.
Also, after I finish the file system Implementation and the API, I want you to get a S3 bucket from AWS, can you do that?
Also, after I finish the file system I plementation and the API, I want you to get a S3 bucket from AWS, can you do that? The free tier should be enough.
Also, after I finish the file system Implementation and the API, I want you to get a S3 bucket from AWS, can you do that?
Sure. I've got an s3 bucket ready.
If you have anything you think should be changed, don't be afraid to say it.
I'm adding some tests now to make sure everything is working, because I still don't have an API to test in insomnia or something, and even if I had I wouldn't want to do that.
And it already found a bug 🪲
Houston we have a problem, it's too slow @dzhou121
Its taking 4 seconds for the test to run
Is it still slow?
I reduced it to a second, that second is the time its taking to connect to the db. I saw it on flamegraph.
it was slow bcs it was creating a 5000x5000 image at runtime to test if publish would accept it
So i replaced it with a file on the repo in test_assets/
@dzhou121 So I can consider I solved it.
on Heroku, it shouldn't take that long to connect. I hope it's because it's the first connection. /api/v1/user is taking like 300ms to return, so it mustn't be a problem.
now i can say some stuff is working, will continue adding tests and fixing bugs i find with them
after that i will write the s3 impl and the api
@dzhou121 i'm done with fs implementation (and the tests)!