Skip to content

Commit 47a400b

Browse files
authored
bump remaining version references (#1663)
* bump remaining version references Signed-off-by: Michael Kalantar <[email protected]> * fix lint problems Signed-off-by: Michael Kalantar <[email protected]> * fix lint issues Signed-off-by: Michael Kalantar <[email protected]> --------- Signed-off-by: Michael Kalantar <[email protected]>
1 parent f2c3ffe commit 47a400b

File tree

14 files changed

+32
-35
lines changed

14 files changed

+32
-35
lines changed

abn/service.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type abnServer struct {
3636

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

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

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

abn/service_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func testWriteMetric(t *testing.T, grpcClient *pb.ABNClient, scenario Scenario)
144144
}
145145
}
146146

147-
func setupRoutemaps(t *testing.T, initialroutemaps ...testroutemap) testroutemaps {
147+
func setupRoutemaps(_ *testing.T, initialroutemaps ...testroutemap) testroutemaps {
148148
routemaps := testroutemaps{
149149
nsRoutemap: make(map[string]testroutemapsByName),
150150
}

base/internal/common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const LocalHostPort = "localhost:12345"
1919
// StartServer starts the server.
2020
//
2121
// For testing only.
22-
func StartServer(secure bool) (*helloworld.Greeter, *grpc.Server, error) {
22+
func StartServer(_ bool) (*helloworld.Greeter, *grpc.Server, error) {
2323
lis, err := net.Listen("tcp", LocalHostPort)
2424
if err != nil {
2525
return nil, nil, err

base/internal/helloworld/helloworld/greeter_server.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,12 @@ func (s *Greeter) GetCountByWorker(key CallType) map[string]int {
320320
}
321321

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

327327
// TagConn exists to satisfy gRPC stats.Handler.
328-
func (c *HWStatsHandler) TagConn(ctx context.Context, cti *stats.ConnTagInfo) context.Context {
328+
func (c *HWStatsHandler) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context {
329329
c.mutex.Lock()
330330
c.connCount++
331331
c.mutex.Unlock()
@@ -334,11 +334,11 @@ func (c *HWStatsHandler) TagConn(ctx context.Context, cti *stats.ConnTagInfo) co
334334
}
335335

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

341341
// TagRPC implements per-RPC context management.
342-
func (c *HWStatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context {
342+
func (c *HWStatsHandler) TagRPC(ctx context.Context, _ *stats.RPCTagInfo) context.Context {
343343
return ctx
344344
}

base/notify_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const (
1616
templatePath = "/template"
1717
)
1818

19-
func getNotifyTask(t *testing.T, n notifyInputs) *notifyTask {
19+
func getNotifyTask(_ *testing.T, n notifyInputs) *notifyTask {
2020
// valid collect database task... should succeed
2121
nt := &notifyTask{
2222
TaskMeta: TaskMeta{

base/readiness.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (t *readinessTask) validateInputs() error {
7171
}
7272

7373
// run executes the task
74-
func (t *readinessTask) run(exp *Experiment) error {
74+
func (t *readinessTask) run(_ *Experiment) error {
7575
// validation
7676
err := t.validateInputs()
7777
if err != nil {
@@ -125,7 +125,7 @@ func (t *readinessTask) run(exp *Experiment) error {
125125

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

131131
obj, err := kd.dynamicClient.Resource(gvr(&t.With)).Namespace(*t.With.Namespace).Get(context.Background(), t.With.Name, metav1.GetOptions{})

base/run.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (t *runTask) getCommand() *exec.Cmd {
4444
}
4545

4646
// run the command
47-
func (t *runTask) run(exp *Experiment) error {
47+
func (t *runTask) run(_ *Experiment) error {
4848
err := t.validateInputs()
4949
if err != nil {
5050
return err

base/test_helpers_driver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

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

base/util.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ import (
1919

2020
// MajorMinor is the minor version of Iter8
2121
// set this manually whenever the major or minor version changes
22-
var MajorMinor = "v0.18"
22+
var MajorMinor = "v1.1"
2323

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

2828
const (
2929
toYAMLString = "toYaml"

cmd/krun.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This command is intended for use within the Iter8 Docker image that is used to e
1818
`
1919

2020
// newKRunCmd creates the Kubernetes run command
21-
func newKRunCmd(kd *driver.KubeDriver, out io.Writer) *cobra.Command {
21+
func newKRunCmd(kd *driver.KubeDriver, _ io.Writer) *cobra.Command {
2222
actor := ia.NewRunOpts(kd)
2323
actor.EnvSettings = settings
2424
cmd := &cobra.Command{

controllers/routemap.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -196,22 +196,22 @@ func (s *routemap) getWeightOverrides() []*uint32 {
196196
if r.Namespace != nil {
197197
ns = *r.Namespace
198198
}
199-
if obj, err1 := appInformers[r.GVRShort].Lister().ByNamespace(ns).Get(r.Name); err1 != nil {
199+
obj, err1 := appInformers[r.GVRShort].Lister().ByNamespace(ns).Get(r.Name)
200+
if err1 != nil {
200201
log.Logger.Trace("could not get resource: ", r.Name, " with gvrShort: ", r.GVRShort)
201202
log.Logger.Trace(err1)
202203
continue
203-
} else {
204-
u := obj.(*unstructured.Unstructured)
205-
if weightStr, ok := u.GetAnnotations()[weightAnnotation]; ok {
206-
if weight64, err2 := strconv.ParseUint(weightStr, 10, 32); err2 == nil {
207-
weight32 := uint32(weight64)
208-
override[i] = &weight32
209-
} else {
210-
log.Logger.Error("invalid weight annotation")
211-
}
204+
}
205+
u := obj.(*unstructured.Unstructured)
206+
if weightStr, ok := u.GetAnnotations()[weightAnnotation]; ok {
207+
if weight64, err2 := strconv.ParseUint(weightStr, 10, 32); err2 == nil {
208+
weight32 := uint32(weight64)
209+
override[i] = &weight32
212210
} else {
213-
log.Logger.Trace("no weight annotation for version resource 1")
211+
log.Logger.Error("invalid weight annotation")
214212
}
213+
} else {
214+
log.Logger.Trace("no weight annotation for version resource 1")
215215
}
216216
}
217217
}
@@ -491,7 +491,7 @@ func getObservedGeneration(obj *unstructured.Unstructured, condition map[string]
491491
}
492492

493493
// validate routemap CM
494-
func validateRoutemapCM(confMap *corev1.ConfigMap) error {
494+
func validateRoutemapCM(_ *corev1.ConfigMap) error {
495495
return nil
496496
}
497497

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ COPY --from=build-stage /app/bin/iter8 /bin/iter8
2222

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

driver/kubedriver.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,7 @@ func (kd *KubeDriver) Init() error {
122122
if err := kd.initHelm(); err != nil {
123123
return err
124124
}
125-
if err := kd.initRevision(); err != nil {
126-
return err
127-
}
128-
return nil
125+
return kd.initRevision()
129126
}
130127

131128
// getLastRelease fetches the last release of an Iter8 experiment

metrics/server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ func getHTTPHistogram(fortioHistogram []fstats.Bucket, decimalPlace float64) gra
468468
return grafanaHistogram
469469
}
470470

471-
func getHTTPStatistics(fortioHistogram *fstats.HistogramData, decimalPlace float64) storage.SummarizedMetric {
471+
func getHTTPStatistics(fortioHistogram *fstats.HistogramData, _ float64) storage.SummarizedMetric {
472472
return storage.SummarizedMetric{
473473
Count: uint64(fortioHistogram.Count),
474474
Mean: fortioHistogram.Avg * 1000,
@@ -593,7 +593,7 @@ func getHTTPDashboard(w http.ResponseWriter, r *http.Request) {
593593
_, _ = w.Write(dashboardBytes)
594594
}
595595

596-
func getGRPCHistogram(ghzHistogram []runner.Bucket, decimalPlace float64) grafanaHistogram {
596+
func getGRPCHistogram(ghzHistogram []runner.Bucket, _ float64) grafanaHistogram {
597597
grafanaHistogram := grafanaHistogram{}
598598

599599
for _, bucket := range ghzHistogram {

0 commit comments

Comments
 (0)