drone-plugins / drone-s3-cache

Caches build artifacts to S3 compatible storage backends
http://plugins.drone.io/drone-plugins/drone-s3-cache
Apache License 2.0
28 stars 30 forks source link

Root default value #61

Closed dsantosmerino closed 1 year ago

dsantosmerino commented 4 years ago

Issue

Not sure about the specific commit that introduced this issue, but recently (last ~14h) we noticed that now is mandatory to inform the root param - validation failed: no aws bucket specified in root or endpoint.

Possible solutions

This could be fine, is that is the intention, but then we need to change the docs here since it says that is optional and set by default with /. I can help if needed either changing the code to set the default value or the docs.

donny-dont commented 4 years ago

Apologies @dsantosmerino I did some refactoring to support different endpoint styles and to make things a bit less error prone. I may have missed a case where not specifying a bucket wasn't required. Could you share your particular configuration, with any sensitive bits anonymized?

donny-dont commented 4 years ago

I took another look at the code and that should only be hit if you're using AWS and you don't specify a root. Is that your setup @dsantosmerino? I had figured that one wouldn't want to create a bucket in AWS for each repository but did I make a wrong assumption here?

dsantosmerino commented 4 years ago

I took another look at the code and that should only be hit if you're using AWS and you don't specify a root. Is that your setup @dsantosmerino?

Yeah, it was our setup, @donny-dont. The thing is that here says that is optional and set as / by default. My question here is if we want to keep it optional with a default (implies changing the code) or keep it mandatory (changing the the docs). What do you think?

donny-dont commented 4 years ago

Is there any reason as an AWS user to want to have a separate bucket for each? I can see it with a minio setup since you can just have a server setup specifically to cache artifacts.

I could add a warning about it but let it go through?