upbound / up

The @upbound CLI
Apache License 2.0
52 stars 41 forks source link

Prevent deferred File.Close and wrap errors while putting CRDs into xpls provider package cache #343

Closed ulucinar closed 1 year ago

ulucinar commented 1 year ago

Description of your changes

Removes the deferred File.Close call in cache.entry.writeObjects to decrease the # of simultaneously open files and wraps the error returned from cache.entry.appendToPackageJSON to provide more context.

I have:

How has this code been tested

Tested with Go 1.18.10 on a test configuration package with the following command:

/tmp/up xpkg dep xpkg.upbound.io/upbound/provider-gcp

(I've initially observed this issue with up@v.17.0, which uses Go 1.18)

sttts commented 1 year ago

🚢