Skip to content

Commit

Permalink
bump remaining version references (#1663)
Browse files Browse the repository at this point in the history
* bump remaining version references

Signed-off-by: Michael Kalantar <kalantar@us.ibm.com>

* fix lint problems

Signed-off-by: Michael Kalantar <kalantar@us.ibm.com>

* fix lint issues

Signed-off-by: Michael Kalantar <kalantar@us.ibm.com>

---------

Signed-off-by: Michael Kalantar <kalantar@us.ibm.com>
  • Loading branch information
kalantar authored Dec 22, 2023
1 parent f2c3ffe commit 47a400b
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 35 deletions.
4 changes: 2 additions & 2 deletions abn/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type abnServer struct {

// Lookup identifies a versionNumber (index to list of versions) that should be used for a given user
// This method is exposed to gRPC clients
func (server *abnServer) Lookup(ctx context.Context, appMsg *pb.Application) (*pb.VersionRecommendation, error) {
func (server *abnServer) Lookup(_ context.Context, appMsg *pb.Application) (*pb.VersionRecommendation, error) {
log.Logger.Tracef("Lookup called for application=%s, user=%s", appMsg.GetName(), appMsg.GetUser())
defer log.Logger.Trace("Lookup completed")

Expand Down Expand Up @@ -64,7 +64,7 @@ func (server *abnServer) Lookup(ctx context.Context, appMsg *pb.Application) (*p

// WriteMetric identifies the version with which a metric is associated (from user) and
// writes the metric value
func (server *abnServer) WriteMetric(ctx context.Context, metricMsg *pb.MetricValue) (*emptypb.Empty, error) {
func (server *abnServer) WriteMetric(_ context.Context, metricMsg *pb.MetricValue) (*emptypb.Empty, error) {
log.Logger.Trace("WriteMetric called")
defer log.Logger.Trace("WriteMetric completed")

Expand Down
2 changes: 1 addition & 1 deletion abn/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func testWriteMetric(t *testing.T, grpcClient *pb.ABNClient, scenario Scenario)
}
}

func setupRoutemaps(t *testing.T, initialroutemaps ...testroutemap) testroutemaps {
func setupRoutemaps(_ *testing.T, initialroutemaps ...testroutemap) testroutemaps {
routemaps := testroutemaps{
nsRoutemap: make(map[string]testroutemapsByName),
}
Expand Down
2 changes: 1 addition & 1 deletion base/internal/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const LocalHostPort = "localhost:12345"
// StartServer starts the server.
//
// For testing only.
func StartServer(secure bool) (*helloworld.Greeter, *grpc.Server, error) {
func StartServer(_ bool) (*helloworld.Greeter, *grpc.Server, error) {
lis, err := net.Listen("tcp", LocalHostPort)
if err != nil {
return nil, nil, err
Expand Down
8 changes: 4 additions & 4 deletions base/internal/helloworld/helloworld/greeter_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@ func (s *Greeter) GetCountByWorker(key CallType) map[string]int {
}

// HandleConn handle the connection
func (c *HWStatsHandler) HandleConn(ctx context.Context, cs stats.ConnStats) {
func (c *HWStatsHandler) HandleConn(_ context.Context, _ stats.ConnStats) {
// no-op
}

// TagConn exists to satisfy gRPC stats.Handler.
func (c *HWStatsHandler) TagConn(ctx context.Context, cti *stats.ConnTagInfo) context.Context {
func (c *HWStatsHandler) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context {
c.mutex.Lock()
c.connCount++
c.mutex.Unlock()
Expand All @@ -334,11 +334,11 @@ func (c *HWStatsHandler) TagConn(ctx context.Context, cti *stats.ConnTagInfo) co
}

// HandleRPC implements per-RPC tracing and stats instrumentation.
func (c *HWStatsHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
func (c *HWStatsHandler) HandleRPC(_ context.Context, _ stats.RPCStats) {
// no-op
}

// TagRPC implements per-RPC context management.
func (c *HWStatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context {
func (c *HWStatsHandler) TagRPC(ctx context.Context, _ *stats.RPCTagInfo) context.Context {
return ctx
}
2 changes: 1 addition & 1 deletion base/notify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
templatePath = "/template"
)

func getNotifyTask(t *testing.T, n notifyInputs) *notifyTask {
func getNotifyTask(_ *testing.T, n notifyInputs) *notifyTask {
// valid collect database task... should succeed
nt := &notifyTask{
TaskMeta: TaskMeta{
Expand Down
4 changes: 2 additions & 2 deletions base/readiness.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (t *readinessTask) validateInputs() error {
}

// run executes the task
func (t *readinessTask) run(exp *Experiment) error {
func (t *readinessTask) run(_ *Experiment) error {
// validation
err := t.validateInputs()
if err != nil {
Expand Down Expand Up @@ -125,7 +125,7 @@ func (t *readinessTask) run(exp *Experiment) error {

// checkObjectExistsAndConditionTrue determines if the object exists
// if so, it further checks if the requested condition is "True"
func checkObjectExistsAndConditionTrue(t *readinessTask, restCfg *rest.Config) error {
func checkObjectExistsAndConditionTrue(t *readinessTask, _ *rest.Config) error {
log.Logger.Trace("looking for resource (", t.With.Group, "/", t.With.Version, ") ", t.With.Resource, ": ", t.With.Name, " in namespace ", *t.With.Namespace)

obj, err := kd.dynamicClient.Resource(gvr(&t.With)).Namespace(*t.With.Namespace).Get(context.Background(), t.With.Name, metav1.GetOptions{})
Expand Down
2 changes: 1 addition & 1 deletion base/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (t *runTask) getCommand() *exec.Cmd {
}

// run the command
func (t *runTask) run(exp *Experiment) error {
func (t *runTask) run(_ *Experiment) error {
err := t.validateInputs()
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion base/test_helpers_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// initKubeFake initialize the Kube clientset with a fake
func initKubeFake(kd *KubeDriver, objects ...runtime.Object) {
func initKubeFake(kd *KubeDriver, _ ...runtime.Object) {
kd.dynamicClient = dynamicfake.NewSimpleDynamicClient(runtime.NewScheme())
}

Expand Down
4 changes: 2 additions & 2 deletions base/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (

// MajorMinor is the minor version of Iter8
// set this manually whenever the major or minor version changes
var MajorMinor = "v0.18"
var MajorMinor = "v1.1"

// Version is the semantic version of Iter8 (with the `v` prefix)
// Version is intended to be set using LDFLAGS at build time
var Version = "v0.18.0"
var Version = "v1.1.0"

const (
toYAMLString = "toYaml"
Expand Down
2 changes: 1 addition & 1 deletion cmd/krun.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This command is intended for use within the Iter8 Docker image that is used to e
`

// newKRunCmd creates the Kubernetes run command
func newKRunCmd(kd *driver.KubeDriver, out io.Writer) *cobra.Command {
func newKRunCmd(kd *driver.KubeDriver, _ io.Writer) *cobra.Command {
actor := ia.NewRunOpts(kd)
actor.EnvSettings = settings
cmd := &cobra.Command{
Expand Down
24 changes: 12 additions & 12 deletions controllers/routemap.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,22 @@ func (s *routemap) getWeightOverrides() []*uint32 {
if r.Namespace != nil {
ns = *r.Namespace
}
if obj, err1 := appInformers[r.GVRShort].Lister().ByNamespace(ns).Get(r.Name); err1 != nil {
obj, err1 := appInformers[r.GVRShort].Lister().ByNamespace(ns).Get(r.Name)
if err1 != nil {
log.Logger.Trace("could not get resource: ", r.Name, " with gvrShort: ", r.GVRShort)
log.Logger.Trace(err1)
continue
} else {
u := obj.(*unstructured.Unstructured)
if weightStr, ok := u.GetAnnotations()[weightAnnotation]; ok {
if weight64, err2 := strconv.ParseUint(weightStr, 10, 32); err2 == nil {
weight32 := uint32(weight64)
override[i] = &weight32
} else {
log.Logger.Error("invalid weight annotation")
}
}
u := obj.(*unstructured.Unstructured)
if weightStr, ok := u.GetAnnotations()[weightAnnotation]; ok {
if weight64, err2 := strconv.ParseUint(weightStr, 10, 32); err2 == nil {
weight32 := uint32(weight64)
override[i] = &weight32
} else {
log.Logger.Trace("no weight annotation for version resource 1")
log.Logger.Error("invalid weight annotation")
}
} else {
log.Logger.Trace("no weight annotation for version resource 1")
}
}
}
Expand Down Expand Up @@ -491,7 +491,7 @@ func getObservedGeneration(obj *unstructured.Unstructured, condition map[string]
}

// validate routemap CM
func validateRoutemapCM(confMap *corev1.ConfigMap) error {
func validateRoutemapCM(_ *corev1.ConfigMap) error {
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ COPY --from=build-stage /app/bin/iter8 /bin/iter8

# Set Iter8 version from build args
ARG TAG
ENV TAG=${TAG:-v0.18.0}
ENV TAG=${TAG:-v1.1.0}

5 changes: 1 addition & 4 deletions driver/kubedriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ func (kd *KubeDriver) Init() error {
if err := kd.initHelm(); err != nil {
return err
}
if err := kd.initRevision(); err != nil {
return err
}
return nil
return kd.initRevision()
}

// getLastRelease fetches the last release of an Iter8 experiment
Expand Down
4 changes: 2 additions & 2 deletions metrics/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ func getHTTPHistogram(fortioHistogram []fstats.Bucket, decimalPlace float64) gra
return grafanaHistogram
}

func getHTTPStatistics(fortioHistogram *fstats.HistogramData, decimalPlace float64) storage.SummarizedMetric {
func getHTTPStatistics(fortioHistogram *fstats.HistogramData, _ float64) storage.SummarizedMetric {
return storage.SummarizedMetric{
Count: uint64(fortioHistogram.Count),
Mean: fortioHistogram.Avg * 1000,
Expand Down Expand Up @@ -593,7 +593,7 @@ func getHTTPDashboard(w http.ResponseWriter, r *http.Request) {
_, _ = w.Write(dashboardBytes)
}

func getGRPCHistogram(ghzHistogram []runner.Bucket, decimalPlace float64) grafanaHistogram {
func getGRPCHistogram(ghzHistogram []runner.Bucket, _ float64) grafanaHistogram {
grafanaHistogram := grafanaHistogram{}

for _, bucket := range ghzHistogram {
Expand Down

0 comments on commit 47a400b

Please sign in to comment.