Skip to content

Commit 43f1bf7

Browse files
committed
Merge remote-tracking branch 'upstream/main' into rhoai-3.2
2 parents 8dfdd63 + c2250f5 commit 43f1bf7

File tree

11 files changed

+20
-922
lines changed

11 files changed

+20
-922
lines changed

.github/workflows/test-go.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ jobs:
88
generate:
99
name: Generate
1010
runs-on: ubuntu-latest
11-
if: ${{ github.repository == 'kubeflow/trainer' }}
1211
env:
1312
GOPATH: ${{ github.workspace }}/go
1413
defaults:
@@ -48,7 +47,6 @@ jobs:
4847
test:
4948
name: Test
5049
runs-on: ubuntu-latest
51-
if: ${{ github.repository == 'kubeflow/trainer' }}
5250
env:
5351
GOPATH: ${{ github.workspace }}/go
5452
defaults:

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,11 @@ vet: ## Run go vet against the code.
164164
go vet ./...
165165

166166
.PHONY: golangci-lint
167-
golangci-lint: golangci-lint-install golangci-lint-kal ## Run golangci-lint to verify Go files.
167+
# TODO(robell): re-enable golangci-lint-kal once we've pulled in upstream v2.2.
168+
# golangci-lint: golangci-lint-install golangci-lint-kal ## Run golangci-lint to verify Go files.
169+
golangci-lint: golangci-lint-install
168170
golangci-lint run --timeout 5m --go 1.24 ./...
169-
$(GOLANGCI_LINT_KAL) run -v --config $(PROJECT_DIR)/.golangci-kal.yml
171+
#$(GOLANGCI_LINT_KAL) run -v --config $(PROJECT_DIR)/.golangci-kal.yml #
170172

171173
# Instructions to run tests.
172174
.PHONY: test

pkg/rhai/README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ The `rhai/` package provides midstream-specific features that are not part of up
1414
```
1515
pkg/rhai/
1616
├── constants/ # RHAI-specific constants and annotations
17-
├── progression/ # Core progression tracking logic and tests
18-
└── test/ # End-to-end tests
17+
└── progression/ # Core progression tracking logic and tests
18+
19+
pkg/test/e2e/
20+
└── rhai/ # End-to-end tests for rhai functionality
1921
```
2022

2123
## Integration
@@ -64,6 +66,14 @@ watch -n 2 'kubectl get trainjob <job-name> -n <namespace> -o jsonpath="{.metada
6466

6567
## Development
6668

69+
70+
Run unit tests with
71+
```bash
72+
go test ./pkg/rhai/...
73+
```
74+
75+
Run e2e tests with:
6776
```bash
68-
go test ./pkg/rhai/test/... -v -timeout 30m -ginkgo.v -ginkgo.progress
77+
make test-e2e-setup-cluster
78+
go test ./test/e2e/rhai... -v -timeout 30m -ginkgo.v -ginkgo.progress
6979
```

pkg/rhai/progression/progression_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func TestPollTrainingProgress(t *testing.T) {
278278
// Create test server
279279
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
280280
w.WriteHeader(tt.responseStatus)
281-
w.Write([]byte(tt.responseBody))
281+
_, _ = w.Write([]byte(tt.responseBody))
282282
}))
283283
defer server.Close()
284284

@@ -1762,7 +1762,3 @@ func ptrInt(i int) *int {
17621762
func ptrFloat64(f float64) *float64 {
17631763
return &f
17641764
}
1765-
1766-
func ptrString(s string) *string {
1767-
return &s
1768-
}

0 commit comments

Comments
 (0)