vmware-tanzu / tanzu-framework

Tanzu Framework provides a set of building blocks to build atop of the Tanzu platform and leverages Carvel packaging and plugins to provide users with a much stronger, more integrated experience than the loose coupling and stand-alone commands of the previous generation of tools.
Apache License 2.0
196 stars 193 forks source link

tanzu-framework/cli/runtime module is not getting released #3929

Open marckhouzam opened 1 year ago

marckhouzam commented 1 year ago

Bug description

The new github.com/vmware-tanzu/tanzu-framework/cli/runtime sub-module needs to be consumed by plugins outside of tanzu-framework. However, sub-modules in tanzu-framework are not being released according to Go import rules and therefore cannot be cleanly consumed.

The problem is that when tagging the repo with say v0.27.0, it seems submodules are not released along with the main module. This means that consumers that look for the new module github.com/vmware-tanzu/tanzu-framework/cli/runtime will not find a released version. Consumers will instead get the latest version off the main branch. This is a quality issue.

We can confirm the situation in pkg.go.dev as shown below:

From what I can see in this submodule tutorial, submodules need to be tagged with a tag that looks like <submodule name>/v0.27.0 for them to be released e.g. https://github.com/go-modules-by-example/submodules/tags

Affected product area (please put an X in all that apply)

Expected behavior

The github.com/vmware-tanzu/tanzu-framework/cli/runtime module is released at the same time as tanzu-framework and can be imported by consumers.

Steps to reproduce the bug

In a plugin repo outside of Framework:

Version (include the SHA if the version is not obvious)

Environment where the bug was observed (cloud, OS, etc)

Relevant Debug Output (Logs, manifests, etc)

anujc25 commented 1 year ago

We might also need to tag below submodules as well because cli/runtime has dependency on them

replace (
    github.com/vmware-tanzu/tanzu-framework/apis/cli => ../../apis/cli
    github.com/vmware-tanzu/tanzu-framework/apis/config => ../../apis/config
)
mpanchajanya commented 1 year ago

For Using v0.28.0 Runtime sub module we need to import below

require (
         // CommitId of v0.28.0
    github.com/vmware-tanzu/tanzu-framework/cli/runtime v0.0.0-20230214111918-af087107ddc3
)

require (
    github.com/vmware-tanzu/tanzu-framework/apis/cli v0.0.0-20230214111918-af087107ddc3 // indirect
)