Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHOAIENG-9374: Specify relative paths for sibling Kubeflow dependencies #358

Closed

Conversation

jiridanek
Copy link
Member

@jiridanek jiridanek commented Jun 22, 2024

https://issues.redhat.com/browse/RHOAIENG-9374

Description

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.

In addition, we have two new fields in Notebook status that the previously referenced upstream notebook-controller code did not have,

	// Status is the status of the condition. Can be True, False, Unknown.
	Status string `json:"status"`
...
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

Therefore, also no further changes should be needed.

How Has This Been Tested?

You tell me whether you are even willing to consider this PR and what's required ;P

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

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.
@openshift-ci openshift-ci bot requested review from atheo89 and jstourac June 22, 2024 08:12
Copy link

openshift-ci bot commented Jun 22, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign harshad16 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great initiative,
Similar pattern of replace caused some issue in previous implementation
#303
maybe we should find the root cause and work this as whole.

@jiridanek
Copy link
Member Author

I had a look, so far I could not even find description of the symptoms what broke there.

@harshad16
Copy link
Member

I had a look, so far I could not even find description of the symptoms what broke there.

@jiridanek , here is the following discussion as it took place in slack,
it wasn't linked to the PR.
https://redhat-internal.slack.com/archives/C05NXTEHLGY/p1711957618218119

@jiridanek jiridanek changed the title Specify relative paths for sibling Kubeflow dependencies RHOAIENG-9374: Specify relative paths for sibling Kubeflow dependencies Jul 2, 2024
@jiridanek
Copy link
Member Author

putting this on-hold, pending further refinement and planning in jira https://issues.redhat.com/browse/RHOAIENG-9374

@jiridanek jiridanek closed this Jul 2, 2024
@adrielparedes
Copy link
Member

No need to close, keep the PR open, let's try to triage and get some time for the merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants