Open VAveryanov8 opened 3 days ago
As far as I understand v3/* contains go modules (and packages) that can be used not only by Scylla Manager, but by some other projects (siren?).
Correct - although I believe that we only care for the managerclient
module to be exposed.
Note that managerclient
is importing the swagger
module as well.
@karol-kokoszka could you describe why we have separate swagger
and utils
modules?
SM can use different version of v3/* packages (Do we need it?)
We don't.
Similar method is used in kubernetes project:
I see that they are also using the go workspaces alongside manual replace directives - I don't really know why - I will try to learn a little bit more about that.
But in general I agree that working on cross module changes is really annoying - right now I'm using local go workspaces, but it would be nicer to have a solution that's integrated with the repository.
As far as I understand
v3/*
contains go modules (and packages) that can be used not only by Scylla Manager, but by some other projects (siren?).Current integration with Scylla Manager is done as with any regular external dependency - entry in go.mod that points to repository url.
Advantages:
v3/*
packages (Do we need it?)Disadvantages:
v3/*
package and use your changes right away in SM, then it's required to complete two steps in general. Here is an example: imaging you need to use new api from scylla db, thenv3/swagger
from master branchv3/*
dependency may force automatic update of other transitive dependencies (minimal version selection)What we can do differently:
use
replace
directive in go.mod pointing to a local version ofv3/*
packages, e.g.Then SM is always using local(latest) version of
v3/swagger
, but other projects are relying on versioning of SM.What do you think? Maybe I'm mussing some context here
P.S. Similar method is used in kubernetes project: https://github.com/kubernetes/kubernetes/blob/6b031e50b2abfe15434beef6c7e01056091a26ea/go.mod#L225 https://github.com/kubernetes/kubernetes/tree/master/staging#external-repository-staging-area