Skip to content

Commit c352fe4

Browse files
committed
RHOAIENG-9374: 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 b1945d4 commit c352fe4

File tree

8 files changed

+11
-4
lines changed

8 files changed

+11
-4
lines changed

.github/workflows/notebook_controller_integration_test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- v1.10-branch
88
paths:
99
- .github/workflows/notebook_controller_integration_test.yaml
10+
- components/common/**
1011
- components/notebook-controller/**
1112
workflow_dispatch:
1213

.github/workflows/notebook_controller_unit_test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- v1.10-branch
88
paths:
99
- .github/workflows/notebook_controller_unit_test.yaml
10+
- components/common/**
1011
- components/notebook-controller/**
1112
workflow_dispatch:
1213

.github/workflows/odh_notebook_controller_integration_test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- v1.10-branch
88
paths:
99
- .github/workflows/odh_notebook_controller_integration_test.yaml
10+
- components/common/**
1011
- components/notebook-controller/**
1112
- components/odh-notebook-controller/**
1213
workflow_dispatch:

.github/workflows/odh_notebook_controller_unit_test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- v1.10-branch
88
paths:
99
- .github/workflows/odh_notebook_controller_unit_test.yaml
10+
- components/common/**
11+
- components/notebook-controller/**
1012
- components/odh-notebook-controller/**
1113
workflow_dispatch:
1214

components/notebook-controller/go.mod

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

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

components/notebook-controller/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
7575
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
7676
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
7777
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
78-
github.com/kubeflow/kubeflow/components/common v0.0.0-20220218084159-4ad0158e955e h1:Ud6a+mkZ5pj+QqZnsIPPBk1WrABz1wYcd1n9CYjMMBA=
79-
github.com/kubeflow/kubeflow/components/common v0.0.0-20220218084159-4ad0158e955e/go.mod h1:uj1ImonZ+hHqWKfzZGWjuxl1uODjubBNrg4W8c38/ts=
8078
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
8179
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
8280
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=

components/odh-notebook-controller/go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,7 @@ require (
8888
sigs.k8s.io/yaml v1.4.0 // indirect
8989
)
9090

91+
// use sibling kubeflow packages from this repo
92+
replace github.com/kubeflow/kubeflow/components/notebook-controller => ../notebook-controller
93+
9194
replace google.golang.org/grpc => google.golang.org/grpc v1.56.3

components/odh-notebook-controller/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
7878
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
7979
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
8080
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
81-
github.com/kubeflow/kubeflow/components/notebook-controller v0.0.0-20220728153354-fc09bd1eefb8 h1:IPD3fr1CTTtpT5Z7udPfQgawCyHsWK9vytFHaBLjIUI=
82-
github.com/kubeflow/kubeflow/components/notebook-controller v0.0.0-20220728153354-fc09bd1eefb8/go.mod h1:ROs2it0U7gdZQGoUNHG5XfhfBmkb5FV2uaJD2Sr8E+Y=
8381
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
8482
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
8583
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=

0 commit comments

Comments
 (0)