This looks to be a dev vibecoding their way through "MinIO for Azure" (monetization plans included) and... it does not seem to be going very well?
The whole YOLO-ing signature inputs and storage ops aside, something like this should never pass even cursory code review:
catch (EntityNotFoundException) when (upsert)
It's a red-fag bonanza: 'upsert' is not related to the exception at all (so has no place in an exception filter), no exception details are accessed to begin with, and a new record needing to be created on an upsert does not seem to be an exceptional situation at all?So, yeah, all they're doing here is adding an 'if' that is literally 100s of times more expensive than a regular function call, which isn't great for a database-ish storage system, where you'd expect concepts like 'indexes' and 'table stats' to come into play.
Not trying to be unnecessarily dismissive or anything, but at this rate, this codebase is not going in the direction that matches the ambitions of the project website.
> The role of Copilot in the investigation
It would be more helpful to know which model was used, rather than “Copilot.”
Related tool: https://tinyurl.com/2yqbqz5s — AI specifically trained on off-grid/survival scenarios. Free.