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
Task description:
After update Kubernetes dependencies to v1.26(#3080), we are able to use the generic set. So the previous hashset , introduced by #2958, cloud be deprecated and removed from the code base.
Solution:
Replace hashset with sets.Set:
diff --git a/pkg/resourceinterpreter/configurableinterpreter/configurable.go b/pkg/resourceinterpreter/configurableinterpreter/configurable.go
index 032fe7f6..131f957e 100644
--- a/pkg/resourceinterpreter/configurableinterpreter/configurable.go+++ b/pkg/resourceinterpreter/configurableinterpreter/configurable.go@@ -6,6 +6,7 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/klog/v2"
configv1alpha1 "github.com/karmada-io/karmada/pkg/apis/config/v1alpha1"
@@ -13,7 +14,6 @@ import (
"github.com/karmada-io/karmada/pkg/resourceinterpreter/configurableinterpreter/configmanager"
"github.com/karmada-io/karmada/pkg/resourceinterpreter/configurableinterpreter/luavm"
"github.com/karmada-io/karmada/pkg/util/fedinformer/genericmanager"
- "github.com/karmada-io/karmada/pkg/util/hashset"
)
// ConfigurableInterpreter interprets resources with resource interpreter customizations.
@@ -153,7 +153,7 @@ func (c *ConfigurableInterpreter) GetDependencies(object *unstructured.Unstructu
return
}
- refs := hashset.Make[configv1alpha1.DependentObjectReference]()+ refs := sets.New[configv1alpha1.DependentObjectReference]()
for _, luaScript := range scripts {
var references []configv1alpha1.DependentObjectReference
references, err = c.luaVM.GetDependencies(object, luaScript)
@@ -164,7 +164,7 @@ func (c *ConfigurableInterpreter) GetDependencies(object *unstructured.Unstructu
}
refs.Insert(references...)
}
- dependencies = refs.List()+ dependencies = refs.UnsortedList()
// keep returned items in the same order between each call.
sort.Slice(dependencies, func(i, j int) bool {
The good first issue is intended for first-time contributors to get started on his/her contributor journey.
After a contributor has successfully completed 1-2 good first issue's,
they should be ready to move on to help wanted items, saving the remaining good first issue for other new contributors.
How to join or take the task:
Just reply on the issue with the message /assign in a separate line.
Then, the issue will be assigned to you.
How to ask for help:
If you need help or have questions, please feel free to ask on this issue.
The issue author or other members of the community will guide you through the contribution process.
The text was updated successfully, but these errors were encountered:
Task description:
After update Kubernetes dependencies to v1.26(#3080), we are able to use the generic set. So the previous hashset , introduced by #2958, cloud be deprecated and removed from the code base.
Solution:
sets.Set
:Who can join or take the task:
The good first issue is intended for
first-time contributors
to get started on his/her contributor journey.After a contributor has successfully completed 1-2 good first issue's,
they should be ready to move on to
help wanted
items, saving the remaininggood first issue
for other new contributors.How to join or take the task:
Just reply on the issue with the message
/assign
in a separate line.Then, the issue will be assigned to you.
How to ask for help:
If you need help or have questions, please feel free to ask on this issue.
The issue author or other members of the community will guide you through the contribution process.
The text was updated successfully, but these errors were encountered: