You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many downstream packages are using the lxd/response package. #13252 removed the import of lxd/db from lxd/response so that downstream package can avoid additional imports, but if the package is being used externally it should be moved under shared. This is a little tricky because lxd/response also imports lxd/ucred and lxd/util. lxd/ucred imports lxd/endpoints/listeners and so on. So we'll need to evaluate which utils are specific to LXD and which could be used externally.
We have experienced issues with downstream packages using lxd/response. See #14408
In that PR, we decided not to move the package as it would require all downstreams to update their import path. I'm going to close this for now as we will be evaluating all libraries used by downstreams separately.
Many downstream packages are using the
lxd/response
package. #13252 removed the import oflxd/db
fromlxd/response
so that downstream package can avoid additional imports, but if the package is being used externally it should be moved undershared
. This is a little tricky becauselxd/response
also importslxd/ucred
andlxd/util
.lxd/ucred
importslxd/endpoints/listeners
and so on. So we'll need to evaluate which utils are specific to LXD and which could be used externally.Additionally, we can think about moving some nice utils from LXD cloud into the shared package. E.g. the request parser in LXD Cloud provides a clean way to extract request info: https://github.com/canonical/lxd-cloud/blob/main/internal/rest/request/parser.go
After this is done, we should evaluate the imports of e.g. microcluster and microcloud to ensure they are only importing from
shared
orclient
.The text was updated successfully, but these errors were encountered: