Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/kaito-project/kaito into ra…
Browse files Browse the repository at this point in the history
…g-standardize-api
  • Loading branch information
ishaansehgal99 committed Jan 14, 2025
2 parents 50fc8bc + c731441 commit cbef599
Show file tree
Hide file tree
Showing 60 changed files with 371 additions and 1,895 deletions.
17 changes: 13 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
run:
deadline: 10m
timeout: 15m

linters-settings:
gci:
skip-generated: true
sections:
- standard
- prefix(github.com/kaito-project)
- default

linters:
disable-all: true
enable:
- deadcode
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- nilerr
- prealloc
- structcheck
- typecheck
- unused
- varcheck
- gci
- gofmt
- goimports
- staticcheck
# Run with --fast=false for more extensive checks
fast: true
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
REGISTRY ?= YOUR_REGISTRY
IMG_NAME ?= workspace
VERSION ?= v0.4.1
GPU_PROVISIONER_VERSION ?= 0.2.1
GPU_PROVISIONER_VERSION ?= 0.3.0
IMG_TAG ?= $(subst v,,$(VERSION))

ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
Expand All @@ -12,7 +12,7 @@ BIN_DIR := $(abspath $(ROOT_DIR)/bin)
TOOLS_DIR := hack/tools
TOOLS_BIN_DIR := $(abspath $(TOOLS_DIR)/bin)

GOLANGCI_LINT_VER := v1.57.2
GOLANGCI_LINT_VER := v1.63.4
GOLANGCI_LINT_BIN := golangci-lint
GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER))

Expand Down Expand Up @@ -130,7 +130,7 @@ GINKGO_SKIP ?=
GINKGO_NODES ?= 2
GINKGO_NO_COLOR ?= false
GINKGO_TIMEOUT ?= 120m
GINKGO_ARGS ?= -focus="$(GINKGO_FOCUS)" -skip="$(GINKGO_SKIP)" -nodes=$(GINKGO_NODES) -no-color=$(GINKGO_NO_COLOR) --output-interceptor-mode=none -timeout=$(GINKGO_TIMEOUT) --fail-fast
GINKGO_ARGS ?= -focus="$(GINKGO_FOCUS)" -skip="$(GINKGO_SKIP)" -nodes=$(GINKGO_NODES) -no-color=$(GINKGO_NO_COLOR) -timeout=$(GINKGO_TIMEOUT) --fail-fast

$(E2E_TEST):
(cd test/e2e && go test -c . -o $(E2E_TEST))
Expand Down
3 changes: 0 additions & 3 deletions api/v1alpha1/condition_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ package v1alpha1
type ConditionType string

const (
// ConditionTypeMachineStatus is the state when checking machine status.
ConditionTypeMachineStatus = ConditionType("MachineReady")

// ConditionTypeNodeClaimStatus is the state when checking nodeClaim status.
ConditionTypeNodeClaimStatus = ConditionType("NodeClaimReady")

Expand Down
5 changes: 3 additions & 2 deletions api/v1alpha1/params_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import (
"reflect"
"strings"

"github.com/kaito-project/kaito/pkg/k8sclient"
"github.com/kaito-project/kaito/pkg/utils"
"gopkg.in/yaml.v2"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
"knative.dev/pkg/apis"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/kaito-project/kaito/pkg/k8sclient"
"github.com/kaito-project/kaito/pkg/utils"
)

type Config struct {
Expand Down
5 changes: 3 additions & 2 deletions api/v1alpha1/ragengine_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import (
"regexp"
"strings"

"github.com/kaito-project/kaito/pkg/utils"
"github.com/kaito-project/kaito/pkg/utils/consts"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog/v2"
"knative.dev/pkg/apis"

"github.com/kaito-project/kaito/pkg/utils"
"github.com/kaito-project/kaito/pkg/utils/consts"
)

func (w *RAGEngine) SupportedVerbs() []admissionregistrationv1.OperationType {
Expand Down
13 changes: 6 additions & 7 deletions api/v1alpha1/workspace_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ import (
"strconv"
"strings"

"github.com/kaito-project/kaito/pkg/k8sclient"
"github.com/kaito-project/kaito/pkg/utils/consts"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/kaito-project/kaito/pkg/utils"
"github.com/kaito-project/kaito/pkg/utils/plugin"

admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand All @@ -27,6 +20,12 @@ import (
"k8s.io/apimachinery/pkg/util/validation"
"k8s.io/klog/v2"
"knative.dev/pkg/apis"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/kaito-project/kaito/pkg/k8sclient"
"github.com/kaito-project/kaito/pkg/utils"
"github.com/kaito-project/kaito/pkg/utils/consts"
"github.com/kaito-project/kaito/pkg/utils/plugin"
)

const (
Expand Down
12 changes: 6 additions & 6 deletions api/v1alpha1/workspace_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import (
"strings"
"testing"

"github.com/kaito-project/kaito/pkg/k8sclient"
"github.com/kaito-project/kaito/pkg/utils/consts"
"github.com/kaito-project/kaito/pkg/utils/plugin"
"k8s.io/apimachinery/pkg/runtime"

"github.com/kaito-project/kaito/pkg/model"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

"github.com/kaito-project/kaito/pkg/k8sclient"
"github.com/kaito-project/kaito/pkg/model"
"github.com/kaito-project/kaito/pkg/utils/consts"
"github.com/kaito-project/kaito/pkg/utils/plugin"
)

const DefaultReleaseNamespace = "kaito-workspace"
Expand Down
Loading

0 comments on commit cbef599

Please sign in to comment.