chainloop icon indicating copy to clipboard operation
chainloop copied to clipboard

Unable to change maxSize limits for CAS Backend

Open prog8 opened this issue 1 year ago • 1 comments

I have artifact which is bigger than 100MB so material crafting fails because of too big file.

As far as I can see in https://github.com/chainloop-dev/chainloop/blob/main/app/controlplane/internal/data/casbackend.go#L223-L226 it's impossible to change the limit for max size for CAS backend. Are there plans to make this parameter configurable or maybe it is configurable and I'm looking at wrong part of the code?

Thanks in advance for all suggestions and hints.

prog8 avatar Mar 14 '24 13:03 prog8

Hi @prog8, thanks for reporting the issue.

You are correct, those values are currently hardcoded but changing that should be doable.

Basically we would need to keep these values as defaults but then make sure we

  • Store the limits in the cas-backends DB table since they will be configurable. This can be done in (internal/ent/schemas/casbackend.go)
  • Update the business logic (biz/casbackend.go) and the data logic (data/casbackend.go) to support the new parameter
  • Update the API to support receiving this value in both creation and update, cas_backends.proto
  • Lastly, you'll need to update the CLI to support providing the limit value during creation/update

Does it make sense? Is this something you'd like to work on? I am happy to help, you can find me here in Discord.

Thanks!

migmartri avatar Mar 14 '24 15:03 migmartri