Skip to content

Commit

Permalink
Specify relative paths for sibling Kubeflow dependencies
Browse files Browse the repository at this point in the history
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/common@v0.0.0-20220218084159-4ad0158e955e
$ idea diff ../common ~/go/pkg/mod/github.com/kubeflow/kubeflow/components/common@v0.0.0-20220218084159-4ad0158e955e

```
diff ../common ~/go/pkg/mod/github.com/kubeflow/kubeflow/components/common@v0.0.0-20220218084159-4ad0158e955e
diff ../common/go.mod /home/jdanek/go/pkg/mod/github.com/kubeflow/kubeflow/components/common@v0.0.0-20220218084159-4ad0158e955e/go.mod
3c3
< go 1.19
---
> go 1.12
Only in /home/jdanek/go/pkg/mod/github.com/kubeflow/kubeflow/components/common@v0.0.0-20220218084159-4ad0158e955e: LICENSE
Common subdirectories: ../common/reconcilehelper and /home/jdanek/go/pkg/mod/github.com/kubeflow/kubeflow/components/common@v0.0.0-20220218084159-4ad0158e955e/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/notebook-controller@v0.0.0-20220728153354-fc09bd1eefb8
$ idea diff ../notebook-controller ~/go/pkg/mod/github.com/kubeflow/kubeflow/components/notebook-controller@v0.0.0-20220728153354-fc09bd1eefb8

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.
  • Loading branch information
jiridanek committed Jun 22, 2024
1 parent 9dcf43d commit d8ab4e8
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
pull_request:
paths:
- components/common/**
- components/notebook-controller/**
workflow_dispatch:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/notebook_controller_unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
pull_request:
paths:
- components/common/**
- components/notebook-controller/**
workflow_dispatch:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
pull_request:
paths:
- components/common/**
- components/notebook-controller/**
- components/odh-notebook-controller/**
workflow_dispatch:

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/odh_notebook_controller_unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
pull_request:
paths:
- components/common/**
- components/notebook-controller/**
- components/odh-notebook-controller/**
workflow_dispatch:

Expand Down
5 changes: 5 additions & 0 deletions components/notebook-controller/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,9 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

// use sibling kubeflow packages from this repo
replace (
github.com/kubeflow/kubeflow/components/common => ../common
)

replace google.golang.org/grpc => google.golang.org/grpc v1.56.3
5 changes: 5 additions & 0 deletions components/odh-notebook-controller/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,9 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

// use sibling kubeflow packages from this repo
replace (
github.com/kubeflow/kubeflow/components/notebook-controller => ../notebook-controller
)

replace google.golang.org/grpc => google.golang.org/grpc v1.56.3

0 comments on commit d8ab4e8

Please sign in to comment.