karmada icon indicating copy to clipboard operation
karmada copied to clipboard

Review hashicorp license change impact

Open chaunceyjiang opened this issue 2 years ago • 4 comments

What happened:

Recently hashicorp announced changes to some of its licenses. This issue is a place to assess the impact on Karmada.

CNCF issue: https://github.com/cncf/foundation/issues/617

What you expected to happen:

None of the dependencies Karmada imports have been updated to the Business source license.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

 go mod graph | grep "\s.*hashicorp" 
github.com/karmada-io/karmada github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/consul/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
sigs.k8s.io/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/consul/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
k8s.io/[email protected] github.com/hashicorp/[email protected]
sigs.k8s.io/[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/consul/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/consul/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/armon/[email protected] github.com/hashicorp/[email protected]
github.com/armon/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/consul/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
k8s.io/[email protected] github.com/hashicorp/[email protected]
[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]
[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/consul/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/sagikazarmark/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/consul/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/consul/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/mitchellh/[email protected] github.com/hashicorp/[email protected]
github.com/posener/[email protected] github.com/hashicorp/[email protected]
k8s.io/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
k8s.io/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
github.com/hashicorp/[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]
google.golang.org/[email protected] github.com/hashicorp/[email protected]


Environment:

  • Karmada version:
  • kubectl-karmada or karmadactl version (the result of kubectl-karmada version or karmadactl version):
  • Others:

chaunceyjiang avatar Aug 14 '23 12:08 chaunceyjiang

Thanks @chaunceyjiang, I'm looking at this now. Just trying to state the current situation.

We are using github.com/hashicorp/hcl as an indirect dependency which is introduced by github.com/vektra/mockery.

# go mod why github.com/hashicorp/hcl
# github.com/hashicorp/hcl
github.com/karmada-io/karmada/hack/tools
github.com/vektra/mockery/v2             // requires github.com/spf13/viper   (https://github.com/vektra/mockery/blob/8abb7022eefaf0d424283d8957117e31e6eaa1cf/go.mod#L14C32-L14C32)
github.com/vektra/mockery/v2/cmd
github.com/spf13/viper                         // requires github.com/hashicorp/hcl (https://github.com/spf13/viper/blob/b77f4c19280bab64272eb8dba6c3a15bb2cae0ce/go.mod#L7C13-L7C22)
github.com/spf13/viper/internal/encoding/hcl
github.com/hashicorp/hcl

So the chain is that:

  1. Karmada requires github.com/vektra/mockery
  2. mockery requires github.com/spf13/viper
  3. viper requires github.com/hashicorp/hcl

Let's see if viper could get rid of github.com/hashicorp/hcl, the working issue is https://github.com/spf13/viper/issues/1608.

RainbowMango avatar Aug 17 '23 07:08 RainbowMango

Just a quick update: viper removed the HCL dependency at v1.20.0-alpha.3! See https://github.com/spf13/viper/issues/1608#issuecomment-2186902713. Now we are waiting for the final release to come out.

After that, we still need to wait for mockery to integrate the new version of viper.

RainbowMango avatar Jun 25 '24 02:06 RainbowMango

/kind cleanup

liangyuanpeng avatar Jun 25 '24 02:06 liangyuanpeng

/remove-kind bug

RainbowMango avatar Jun 25 '24 02:06 RainbowMango

Just a quick update: The github.com/spf13/[email protected] removed the HCL dependency.

Next step is waiting for github.com/vektra/mockery to integrate this version.

RainbowMango avatar Mar 17 '25 01:03 RainbowMango

Another update:

The github.com/vektra/mockery updated the github.com/spf13/[email protected] on master.

Now, we are waiting for a new release(v2.53.2+) of mockery, then we can bump mockery to finish this.

RainbowMango avatar Mar 18 '25 02:03 RainbowMango

We can start to bump the github.com/vektra/mockery with version v2.53.3 now.

RainbowMango avatar Mar 19 '25 01:03 RainbowMango

@seanlaii would you like to help?

RainbowMango avatar Mar 19 '25 01:03 RainbowMango

@seanlaii would you like to help?

Sure, I would be happy to.

seanlaii avatar Mar 19 '25 01:03 seanlaii

/assign @seanlaii Thanks.

RainbowMango avatar Mar 19 '25 01:03 RainbowMango

Hi @RainbowMango , I found that we need to upgrade go to 1.23 in order to upgrade mockery to v2.53.3. Also, it seems that sigs.k8s.io/mcs-api v0.1.0 is still using the old controller-tools which contains github.com/hashicorp/[email protected], and the repo has not been released correctly for a while. Maybe we should first release a new mcs-api version? WDYT?

seanlaii avatar Mar 19 '25 05:03 seanlaii

I found that we need to upgrade go to 1.23 in order to upgrade mockery to v2.53.3.

Yeah. I see, [email protected] requires to Go 1.23.

I think we can try to update Go with v1.23.7(the latest version of the 1.23 release, for the time being) first. A similar PR is like https://github.com/karmada-io/karmada/pull/6131. PS: We are going to update Kubernetes dependencies with v1.32.x which requires Go 1.23.

RainbowMango avatar Mar 19 '25 08:03 RainbowMango

Also, it seems that sigs.k8s.io/mcs-api v0.1.0 is still using the old controller-tools which contains github.com/hashicorp/[email protected], and the repo has not been released correctly for a while. Maybe we should first release a new mcs-api version?

Let's focus on bumping mockery for now, please let me know if sigs.k8s.io/mcs-api is a blocker.

RainbowMango avatar Mar 19 '25 08:03 RainbowMango

/reopen

RainbowMango avatar Mar 24 '25 01:03 RainbowMango

@RainbowMango: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

karmada-bot avatar Mar 24 '25 01:03 karmada-bot

Great thanks to @seanlaii. Karmada now does not require hashicorp now:

-bash-5.0# go mod why github.com/hashicorp/hcl
# github.com/hashicorp/hcl
(main module does not need package github.com/hashicorp/hcl)

PS: Even though we can see the hashicorp from go mod graph, but Karmada does not use it to build anything since it has been removed from the vendor.

-bash-5.0# go mod graph | grep "\s.*hashicorp" 
sigs.k8s.io/[email protected] github.com/hashicorp/[email protected]
k8s.io/[email protected] github.com/hashicorp/[email protected]
sigs.k8s.io/[email protected] github.com/hashicorp/[email protected]
k8s.io/[email protected] github.com/hashicorp/[email protected]
[email protected] github.com/hashicorp/[email protected]
k8s.io/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]
k8s.io/[email protected] github.com/hashicorp/[email protected]
github.com/spf13/[email protected] github.com/hashicorp/[email protected]

RainbowMango avatar Mar 24 '25 12:03 RainbowMango