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
The introduced /api sub-module makes vendoring for depending parties unnecessarily complex and there is no easy way to improve this situation. Therefore, I propose to remove the sub-module again and instead work with one and simple module.
Describe the bug: #169 added a nested sub-module api to etcd-druid in order to make dependency management more efficient.
After experiencing with this approach the opposite turned out.
At the moment, components depending on github.com/gardener/etcd-druid/api need to maintain their go.mod file as the following:
Please note, in case etcd-druid is a transient dependency, the replace configuration must be added again because it's not automatically taken over from the direct dependency.
Why it is not possible to depend on an API sub-module version directly:
The configuration above will lead to an ambiguous import error. There are versions (< v0.6.0) which only contain one module (with /api/... packages inside) and versions (>= v0.6.0) that serve /api as a sub-module.
Adding a sub-module to an existing repository with earlier releases implies extra actions that have not been tackled yet - see here for more information.
In addition, there is the complexity that the outer module has a dependency to the inner /api module and because we don't want to maintain pre-release tags locally, we work with the pseudo version v0.0.0-00010101000000-000000000000. So, even if we tackled the missing actions mentioned above, the depending parties still have to configure their replace directives accordingly because the pseudo version v0.0.0-00010101000000-000000000000 is not resolvable.
We needed to add some cyclic dependency procedure to our development and release flow in order to solve this issue as well (see this comment).
For the mentioned reasons, we better remove the /api sub-module again and instead have one simple module as it was the case before v0.6.0. The advantage of having a separate and nested-module is entirely eliminated by the complexity and problems it entails.
Expected behavior:
Modules having a (direct or indirect) dependency to https://github.com/gardener/etcd-druid should not need to configure replace directives in their go.mod files.
TL;DR:
The introduced
/api
sub-module makes vendoring for depending parties unnecessarily complex and there is no easy way to improve this situation. Therefore, I propose to remove the sub-module again and instead work with one and simple module.Describe the bug:
#169 added a nested sub-module
api
toetcd-druid
in order to make dependency management more efficient.After experiencing with this approach the opposite turned out.
At the moment, components depending on
github.com/gardener/etcd-druid/api
need to maintain theirgo.mod
file as the following:Please note, in case
etcd-druid
is a transient dependency, thereplace
configuration must be added again because it's not automatically taken over from the direct dependency.Why it is not possible to depend on an
API
sub-module version directly:The configuration above will lead to an
ambiguous import
error. There are versions (<v0.6.0
) which only contain one module (with/api/...
packages inside) and versions (>=v0.6.0
) that serve/api
as a sub-module.Adding a sub-module to an existing repository with earlier releases implies extra actions that have not been tackled yet - see here for more information.
In addition, there is the complexity that the outer module has a dependency to the inner
/api
module and because we don't want to maintain pre-release tags locally, we work with the pseudo version v0.0.0-00010101000000-000000000000. So, even if we tackled the missing actions mentioned above, the depending parties still have to configure theirreplace
directives accordingly because the pseudo versionv0.0.0-00010101000000-000000000000
is not resolvable.We needed to add some cyclic dependency procedure to our development and release flow in order to solve this issue as well (see this comment).
For the mentioned reasons, we better remove the
/api
sub-module again and instead have one simple module as it was the case beforev0.6.0
. The advantage of having a separate and nested-module is entirely eliminated by the complexity and problems it entails.Expected behavior:
Modules having a (direct or indirect) dependency to
https://github.com/gardener/etcd-druid
should not need to configurereplace
directives in theirgo.mod
files./area dev-productivity
/cc @abdasgupta @shreyas-s-rao @timebertt @plkokanov
The text was updated successfully, but these errors were encountered: