Open marckhouzam opened 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
)
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
)
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 modulegithub.com/vmware-tanzu/tanzu-framework/cli/runtime
will not find a released version. Consumers will instead get the latest version off themain
branch. This is a quality issue.We can confirm the situation in
pkg.go.dev
as shown below:v0.27.0
version ofgithub.com/vmware-tanzu/tanzu-framework
at https://pkg.go.dev/github.com/vmware-tanzu/tanzu-frameworkgithub.com/vmware-tanzu/tanzu-framework/cli/runtime
at https://pkg.go.dev/github.com/vmware-tanzu/tanzu-framework/cli/runtimeFrom 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/tagsAffected 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:
go.mod
file to use tanzu framework v0.26.0go mod tidy
github.com/vmware-tanzu/tanzu-framework/cli/runtime v0.0.0-20221114195246-1db2c7ce587b
gets added into thego.mod
file (the entry is the latest available on themain
branch at the momentgo mod tidy
is run) - This is not okVersion (include the SHA if the version is not obvious)
Environment where the bug was observed (cloud, OS, etc)
Relevant Debug Output (Logs, manifests, etc)