Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

[BUG] API submodule is pain #92

@timebertt

Description

@timebertt

/kind bug
/area dev-productivity

Describe the bug:

Similar to gardener/etcd-druid#243.

With gardener/gardener#5610 g/g is upgraded to hvpa-controller@v0.4.0 which introduces the /api submodule (#85).
When upgrading the g/g dependency to the latest release (v1.44.0) in provider-aws, I get:

github.com/gardener/gardener-extension-provider-aws/pkg/controller/bastion imports
	github.com/gardener/gardener/pkg/client/kubernetes imports
	github.com/gardener/hvpa-controller/api/v1alpha1: ambiguous import: found package github.com/gardener/hvpa-controller/api/v1alpha1 in multiple modules:
	github.com/gardener/hvpa-controller v0.3.1 (/Users/timebertt/go/pkg/mod/github.com/gardener/hvpa-controller@v0.3.1/api/v1alpha1)
	github.com/gardener/hvpa-controller/api v0.4.0 (/Users/timebertt/go/pkg/mod/github.com/gardener/hvpa-controller/api@v0.4.0/v1alpha1)

I can workaround this by adding replace directives as mentioned in gardener/etcd-druid#243

replace (
	github.com/gardener/hvpa-controller => github.com/gardener/hvpa-controller v0.4.0
	github.com/gardener/hvpa-controller/api => github.com/gardener/hvpa-controller/api v0.4.0
)

Note that this has to be added to every project that transiently depends on hvpa-controller.

Expected behaviour:

Projects having a transient dependency on hvpa-controller shouldn't need to add replace directives, which is prone to error, unneeded complexity and simply annoying.

Anything else we need to know?:

As said in gardener/etcd-druid#243 (comment), I would vote for removing the /api submodule again (ref gardener/etcd-druid#244) and never introduce it anywhere again to spare us the pain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/dev-productivityDeveloper productivity related (how to improve development)kind/bugBuglifecycle/rottenNobody worked on this for 12 months (final aging stage)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions