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

Backport ModelRegistry Component #329

Merged

Conversation

ykaliuta
Copy link

@ykaliuta
Copy link
Author

ykaliuta commented Aug 28, 2024

From the log https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/red-hat-data-services_rhods-operator/329/pull-ci-red-hat-data-services-rhods-operator-main-rhods-operator-e2e/1828679610703810560/artifacts/rhods-operator-e2e/gather-extra/artifacts/pods/redhat-ods-operator_redhat-ods-operator-controller-manager-d5f8fbcbd-dmfq4_manager.log

{"level":"error","ts":"2024-08-28T07:13:25Z","logger":"opendatahub.controllers.DSCInitialization","msg":"error to set networkpolicy in operator namespace","path":"/opt/manifests/monitoring/networkpolicy","error":"networkpolicies.networking.k8s.io \"redhat-ods-operator\" is forbidden: cannot set blockOwnerDeletion in this case because cannot find RESTMapping for APIVersion dscinitialization.opendatahub.io/v1 Kind DSCInitialization: no matches for kind \"DSCInitialization\" in version \"dscinitialization.opendatahub.io/v1\"","stacktrace":"github.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization.(*DSCInitializationReconciler).reconcileDefaultNetworkPolicy\n\t/workspace/controllers/dscinitialization/utils.go:202\ngithub.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization.(*DSCInitializationReconciler).createOdhNamespace\n\t/workspace/controllers/dscinitialization/utils.go:121\ngithub.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization.(*DSCInitializationReconciler).Reconcile\n\t/workspace/controllers/dscinitialization/dscinitialization_controller.go:180\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:122\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:323\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235"}
{"level":"error","ts":"2024-08-28T07:15:34Z","logger":"opendatahub.controllers.DSCInitialization","msg":"failed applying service mesh resources","error":"2 errors occurred:\n\t* failed applying FeatureHandler features. cause: 1 error occurred:\n\t* failed to get resource istio-system/data-science-smcp: no matches for kind \"ServiceMeshControlPlane\" in version \"maistra.io/v2\"\n\n\n\t* failed applying FeatureHandler features. cause: 1 error occurred:\n\t* 2 errors occurred:\n\t* failed to find Service Mesh Control Plane: no matches for kind \"ServiceMeshControlPlane\" in version \"maistra.io/v2\"\n\t* service mesh control plane is not ready\n\n\n\n\n\n","stacktrace":"github.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization.(*DSCInitializationReconciler).configureServiceMesh\n\t/workspace/controllers/dscinitialization/servicemesh_setup.go:44\ngithub.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization.(*DSCInitializationReconciler).Reconcile\n\t/workspace/controllers/dscinitialization/dscinitialization_controller.go:296\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:122\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:323\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235"}

Sounds weird

@ykaliuta
Copy link
Author

/test rhods-operator-e2e

@ykaliuta
Copy link
Author

ykaliuta commented Sep 2, 2024

Finally e2e passed :)

@VaishnaviHire
Copy link

@dhirajsb Should we go ahead with adding Model registry as component for 2.14?

@zdtsw
Copy link

zdtsw commented Sep 14, 2024

@dhirajsb Should we go ahead with adding Model registry as component for 2.14?

should we wait for a weeek before merge this PR?
we can have downstream nightly on pure webhook first and give odh nightly one week to test modelreg.

@dhirajsb
Copy link

I'll leave it up to platform team. We (MR and Dashboard teams) can test on nightly builds and 2.18 release this week.
@tonyxrmdavidson cc

@ykaliuta
Copy link
Author

/test rhods-operator-e2e

dhirajsb and others added 5 commits September 25, 2024 12:35
…tasciencecluster.opendatahub.io_datascienceclusters.yaml

Co-authored-by: Wen Zhou <[email protected]>
…tasciencecluster.opendatahub.io_datascienceclusters.yaml

Co-authored-by: Wen Zhou <[email protected]>
…ahub.io_datascienceclusters.yaml

Co-authored-by: Wen Zhou <[email protected]>
Copy link

@dhirajsb dhirajsb left a comment

Choose a reason for hiding this comment

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

Added more changes to use rhoai MR namespace rhoai-model-registries and to enable testing model registry reconcile.

type ModelRegistry struct {
components.Component `json:""`

// Namespace for model registries to be installed, configurable only once when model registry is enabled, defaults to "odh-model-registries"

Choose a reason for hiding this comment

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

Suggested change
// Namespace for model registries to be installed, configurable only once when model registry is enabled, defaults to "odh-model-registries"
// Namespace for model registries to be installed, configurable only once when model registry is enabled, defaults to "rhoai-model-registries"

Copy link

Choose a reason for hiding this comment

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

i think the reason we keep it as odh-* is to ensure the source code is the same for upstream and downstream. to only config it with different values from csv etc

Copy link
Author

Choose a reason for hiding this comment

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

that could be just revert to the previous version instead of all that suggestions.

@@ -168,6 +168,11 @@ func setupDSCInstance(name string) *dscv1.DataScienceCluster {
ManagementState: operatorv1.Removed,
},
},
ModelRegistry: modelregistry.ModelRegistry{
Component: components.Component{
ManagementState: operatorv1.Removed,

Choose a reason for hiding this comment

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

Suggested change
ManagementState: operatorv1.Removed,
ManagementState: operatorv1.Managed,

Choose a reason for hiding this comment

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

Enable testing model registry reconcile in e2e tests.

Copy link

Choose a reason for hiding this comment

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

we can keep it as Removed as other non-GA component,

@VaishnaviHire
Copy link

@dhirajsb @ykaliuta We probably need to update the api-docs here -

make generate manifests api-docs

@ykaliuta
Copy link
Author

@dhirajsb @ykaliuta We probably need to update the api-docs here -

make generate manifests api-docs

So, it now

 % git grep odh-model-registries
components/modelregistry/modelregistry.go:      // Namespace for model registries to be installed, configurable only once when model registry is enabled, defaults to "odh-model-registries"
docs/upgrade-testing.md:      registriesNamespace: "odh-model-registries"

After api update it is

% git grep odh-model-registries   
components/modelregistry/modelregistry.go:      // Namespace for model registries to be installed, configurable only once when model registry is enabled, defaults to "odh-model-registries"
config/crd/bases/datasciencecluster.opendatahub.io_datascienceclusters.yaml:                          to "odh-model-registries"
docs/api-overview.md:| `registriesNamespace` _string_ | Namespace for model registries to be installed, configurable only once when model registry is enabled, defaults to "odh-model-registries" | rhoai-model-registries | MaxLength: 63 <br />Pattern: `^([a-z0-9]([-a-z0-9]*[a-z0-9])?)?$` <br /> |
docs/upgrade-testing.md:      registriesNamespace: "odh-model-registries"

I already lost what modelregistry want and were, so @dhirajsb , please update it up to your requirements.

odh-model-registries -> rhoai-model-registries like it is mentioned
below:

	// +kubebuilder:default="rhoai-model-registries"

Signed-off-by: Yauheni Kaliuta <[email protected]>
@ykaliuta
Copy link
Author

@dhirajsb @ykaliuta We probably need to update the api-docs here -

make generate manifests api-docs

forget my last comment. I updated the 2 entries I had if it's what is required (will revert, if not). But about the generated files, the tree is clean after the command.

@VaishnaviHire
Copy link

VaishnaviHire commented Sep 26, 2024

/hold

@dhirajsb If the changes look good to you, please add your lgtm

@VaishnaviHire
Copy link

/lgtm

Copy link

@dhirajsb dhirajsb left a comment

Choose a reason for hiding this comment

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

Need to change the model registry SOP doc url.

config/monitoring/prometheus/apps/prometheus-configs.yaml Outdated Show resolved Hide resolved
config/monitoring/prometheus/apps/prometheus-configs.yaml Outdated Show resolved Hide resolved
config/monitoring/prometheus/apps/prometheus-configs.yaml Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot removed the lgtm label Sep 26, 2024
@openshift-ci openshift-ci bot added the lgtm label Sep 26, 2024
Copy link

openshift-ci bot commented Sep 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ykaliuta, zdtsw

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

The pull request process is described 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

@VaishnaviHire
Copy link

/hold cancel

@openshift-merge-bot openshift-merge-bot bot merged commit 166cc19 into red-hat-data-services:main Sep 26, 2024
8 checks passed
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.

5 participants