Skip to content

Commit d8ab4e8

Browse files
committed
Specify relative paths for sibling Kubeflow dependencies
Previously, notebook-controller downloaded kubflow/common from the net, similarly, odh-notebook-controller dowloaded a version of kubeflow/notebook-controller from the net. With this change, all Kubeflow code comes from the components/ directory in this repo. This gives us more control over the Kubeflow code we use. --- # Reconciling changes ## kubeflow/components/common $ go install golang.org/dl/go1.20.14@latest $ ~/go/bin/go1.20.14 download kubeflow/components/notebook-controller$ ~/go/bin/go1.20.14 get github.com/kubeflow/kubeflow/components/[email protected] $ idea diff ../common ~/go/pkg/mod/github.com/kubeflow/kubeflow/components/[email protected] ``` diff ../common ~/go/pkg/mod/github.com/kubeflow/kubeflow/components/[email protected] diff ../common/go.mod /home/jdanek/go/pkg/mod/github.com/kubeflow/kubeflow/components/[email protected]/go.mod 3c3 < go 1.19 --- > go 1.12 Only in /home/jdanek/go/pkg/mod/github.com/kubeflow/kubeflow/components/[email protected]: LICENSE Common subdirectories: ../common/reconcilehelper and /home/jdanek/go/pkg/mod/github.com/kubeflow/kubeflow/components/[email protected]/reconcilehelpe ``` There are no meaningful differences, so no changes necessary. Great. ## kubeflow/components/notebook-controller kubeflow/components/odh-notebook-controller$ ~/go/bin/go1.20.14 get github.com/kubeflow/kubeflow/components/[email protected] $ idea diff ../notebook-controller ~/go/pkg/mod/github.com/kubeflow/kubeflow/components/[email protected] Looking at the usages, it seems clear to me that we want to use what's in our repo in components/notebook-controller/pkg/culler. This is because odh-notebook-controller only imports culler to get at `culler.STOP_ANNOTATION`. This constant is the same in both versions. Therefore, also no further changes are needed.
1 parent 9dcf43d commit d8ab4e8

File tree

6 files changed

+16
-0
lines changed

6 files changed

+16
-0
lines changed

.github/workflows/notebook_controller_integration_test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
pull_request:
55
paths:
6+
- components/common/**
67
- components/notebook-controller/**
78
workflow_dispatch:
89

.github/workflows/notebook_controller_unit_test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
pull_request:
55
paths:
6+
- components/common/**
67
- components/notebook-controller/**
78
workflow_dispatch:
89

.github/workflows/odh_notebook_controller_integration_test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
push:
44
pull_request:
55
paths:
6+
- components/common/**
7+
- components/notebook-controller/**
68
- components/odh-notebook-controller/**
79
workflow_dispatch:
810

.github/workflows/odh_notebook_controller_unit_test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
push:
44
pull_request:
55
paths:
6+
- components/common/**
7+
- components/notebook-controller/**
68
- components/odh-notebook-controller/**
79
workflow_dispatch:
810

components/notebook-controller/go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,9 @@ require (
7373
sigs.k8s.io/yaml v1.4.0 // indirect
7474
)
7575

76+
// use sibling kubeflow packages from this repo
77+
replace (
78+
github.com/kubeflow/kubeflow/components/common => ../common
79+
)
80+
7681
replace google.golang.org/grpc => google.golang.org/grpc v1.56.3

components/odh-notebook-controller/go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,9 @@ require (
7575
sigs.k8s.io/yaml v1.4.0 // indirect
7676
)
7777

78+
// use sibling kubeflow packages from this repo
79+
replace (
80+
github.com/kubeflow/kubeflow/components/notebook-controller => ../notebook-controller
81+
)
82+
7883
replace google.golang.org/grpc => google.golang.org/grpc v1.56.3

0 commit comments

Comments
 (0)