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

fix: when app ns and monitoring ns are the same, createorupdate wont work #1537

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

zdtsw
Copy link
Member

@zdtsw zdtsw commented Jan 21, 2025

  • monitoring should be only for rhoai and we only support fixed name for now
  • but in upstream odh, we just set all namespace to the same one,
  • in old code, it was a "err = r.Patch(ctx, foundMonitoringNamespace, client.RawPatch(types.MergePatchType, []byte(labelPatch)))" call
    but for some reason this is not 100% reproduciable
    i have it passed in clean new cluster
    i have it failed with error
    {"level":"error","ts":"2025-01-21T15:42:30Z","msg":"error patch monitoring namespace for managed cluster","controller":"dscinitialization","controllerGroup":"dscinitialization.opendatahub.io","controllerKind":"DSCInitialization","DSCInitialization":{"name":"e2e-test-dsci"},"namespace":"","name":"e2e-test-dsci","reconcileID":"105251cf-09d0-4ae6-a552-4333d540a581","error":"namespaces \"opendatahub\" already exists","stacktrace":"github.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization.(*DSCInitializationReconciler).createOperatorResource\n\t/workspace/controllers/dscinitialization/utils.go:57\ngithub.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization.(*DSCInitializationReconciler).Reconcile\n\t/workspace/controllers/dscinitialization/dscinitialization_controller.go:177\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:119\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:316\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:266\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:227"}

Description

How Has This Been Tested?

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • 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

@zdtsw zdtsw requested review from lburgazzoli and AjayJagan and removed request for StevenTobin and jackdelahunt January 21, 2025 16:52
@AjayJagan
Copy link
Contributor

/lgtm

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 19.94%. Comparing base (614fea1) to head (a78e867).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
controllers/dscinitialization/utils.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1537      +/-   ##
==========================================
- Coverage   19.94%   19.94%   -0.01%     
==========================================
  Files         160      160              
  Lines       11033    11032       -1     
==========================================
- Hits         2201     2200       -1     
  Misses       8601     8601              
  Partials      231      231              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@AjayJagan AjayJagan left a comment

Choose a reason for hiding this comment

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

Thanks @zdtsw

Copy link

openshift-ci bot commented Jan 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AjayJagan

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

@openshift-merge-bot openshift-merge-bot bot merged commit 2258161 into opendatahub-io:main Jan 22, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants