lapce-extensions icon indicating copy to clipboard operation
lapce-extensions copied to clipboard

Implement publish, update and unpublish plugins

Open coffeeispower opened this issue 3 years ago • 26 comments

This is a work in progress implementation of the publish, update and unpublish plugin APIs.

Closes #5

coffeeispower avatar Oct 14 '22 21:10 coffeeispower

@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

coffeeispower avatar Oct 15 '22 22:10 coffeeispower

@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 avatar Oct 16 '22 11:10 dzhou121

@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.

coffeeispower avatar Oct 16 '22 12:10 coffeeispower

50x50...2000x2000 should be enough

coffeeispower avatar Oct 16 '22 12:10 coffeeispower

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.

coffeeispower avatar Oct 16 '22 12:10 coffeeispower

I've just drafted a File System implementation of the repo, can you take a look at it?

coffeeispower avatar Oct 18 '22 22:10 coffeeispower

it still doesn't implement the read operation, will do that soon.

coffeeispower avatar Oct 18 '22 22:10 coffeeispower

Looks good to me so far 👍

dzhou121 avatar Oct 19 '22 08:10 dzhou121

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.

coffeeispower avatar Oct 19 '22 08:10 coffeeispower

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?

coffeeispower avatar Oct 19 '22 08:10 coffeeispower

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.

coffeeispower avatar Oct 19 '22 08:10 coffeeispower

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.

dzhou121 avatar Oct 19 '22 08:10 dzhou121

If you have anything you think should be changed, don't be afraid to say it.

coffeeispower avatar Oct 19 '22 09:10 coffeeispower

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.

coffeeispower avatar Oct 19 '22 20:10 coffeeispower

And it already found a bug 🪲

coffeeispower avatar Oct 19 '22 21:10 coffeeispower

Houston we have a problem, it's too slow @dzhou121

coffeeispower avatar Oct 20 '22 19:10 coffeeispower

Its taking 4 seconds for the test to run

coffeeispower avatar Oct 20 '22 19:10 coffeeispower

Is it still slow?

dzhou121 avatar Oct 21 '22 11:10 dzhou121

I reduced it to a second, that second is the time its taking to connect to the db. I saw it on flamegraph.

coffeeispower avatar Oct 21 '22 14:10 coffeeispower

it was slow bcs it was creating a 5000x5000 image at runtime to test if publish would accept it

coffeeispower avatar Oct 21 '22 14:10 coffeeispower

So i replaced it with a file on the repo in test_assets/

coffeeispower avatar Oct 21 '22 14:10 coffeeispower

@dzhou121 So I can consider I solved it.

coffeeispower avatar Oct 21 '22 14:10 coffeeispower

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.

coffeeispower avatar Oct 21 '22 14:10 coffeeispower

now i can say some stuff is working, will continue adding tests and fixing bugs i find with them

coffeeispower avatar Oct 23 '22 00:10 coffeeispower

after that i will write the s3 impl and the api

coffeeispower avatar Oct 23 '22 00:10 coffeeispower

@dzhou121 i'm done with fs implementation (and the tests)!

coffeeispower avatar Oct 23 '22 16:10 coffeeispower