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

Map component versions to RHOAI status for better visibility #1559

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ugiordan
Copy link
Contributor

Description

This Pull Request updates the RHOAI operator to include component versions in its status, improving visibility and tracking.

Key updates:

  • Added logic to map component versions to the operator status.
  • Created a generic action to retrieve release metadata for each component.
  • Ensured compatibility with existing workflows.

Please review and share your feedback!

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

Copy link

openshift-ci bot commented Jan 23, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

openshift-ci bot commented Jan 23, 2025

[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 ask for approval from ugiordan. For more information see the 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
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12933723734

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 70.23810% with 25 lines in your changes missing coverage. Please review.

Project coverage is 20.37%. Comparing base (90a78ea) to head (56114de).

Files with missing lines Patch % Lines
...ns/status/releases/action_fetch_releases_status.go 85.50% 7 Missing and 3 partials ⚠️
pkg/resources/resources.go 0.00% 5 Missing ⚠️
...s/components/workbenches/workbenches_controller.go 0.00% 3 Missing ⚠️
...llers/components/codeflare/codeflare_controller.go 0.00% 1 Missing ⚠️
...ciencepipelines/datasciencepipelines_controller.go 0.00% 1 Missing ⚠️
controllers/components/kueue/kueue_controller.go 0.00% 1 Missing ⚠️
...mponents/modelregistry/modelregistry_controller.go 0.00% 1 Missing ⚠️
controllers/components/ray/ray_controller.go 0.00% 1 Missing ⚠️
...ts/trainingoperator/trainingoperator_controller.go 0.00% 1 Missing ⚠️
...rollers/components/trustyai/trustyai_controller.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1559      +/-   ##
==========================================
+ Coverage   19.98%   20.37%   +0.38%     
==========================================
  Files         159      160       +1     
  Lines       10780    10864      +84     
==========================================
+ Hits         2154     2213      +59     
- Misses       8396     8418      +22     
- Partials      230      233       +3     

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

//
// Returns:
// - An error if the operation fails.
func (a *Action) run(ctx context.Context, rr *types.ReconciliationRequest) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

guess if the process of reading and parsing the file could be done once and then cached, it should not change for the lifecycle of the operator (unless devFlags are set)

Copy link
Contributor

Choose a reason for hiding this comment

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

guess if the process of reading and parsing the file could be done once and then cached, it should not change for the lifecycle of the operator (unless devFlags are set)

Can it be calculated in Init()s into componentHandler{} structure, then stored in the Reconciler{} on NewComponentReconciler(), then propagated to ReconcileRequest{} from Reconcile() and applied by Client.ApplyStatus()?

Copy link
Contributor

Choose a reason for hiding this comment

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

Some caching abstraction experiments #1563

@ugiordan ugiordan force-pushed the RHOAIENG-11648/component-mapping-refactor branch from 0be68df to a6111be Compare January 24, 2025 11:29
Copy link
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12948752246

Copy link
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12948759806

@ugiordan ugiordan force-pushed the RHOAIENG-11648/component-mapping-refactor branch from a6111be to 13eba78 Compare January 24, 2025 11:44
Copy link
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12948979661

@ugiordan ugiordan force-pushed the RHOAIENG-11648/component-mapping-refactor branch from 13eba78 to 3d8aa27 Compare January 24, 2025 11:50
Copy link
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12949054748

@ugiordan ugiordan force-pushed the RHOAIENG-11648/component-mapping-refactor branch 7 times, most recently from 1e08139 to 4b76ca4 Compare January 27, 2025 15:42
Copy link
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12992694058

Copy link
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/12992700715

Copy link
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/13034117014

@ugiordan ugiordan force-pushed the RHOAIENG-11648/component-mapping-refactor branch 3 times, most recently from 5f73611 to 56114de Compare January 29, 2025 16:53
Copy link
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/13036573183

@ugiordan
Copy link
Contributor Author

I've intentionally excluded the Workbenches component from the e2e tests for now, as we need to align the workbenches_test.go file with the structure of the other component tests.

@ugiordan ugiordan force-pushed the RHOAIENG-11648/component-mapping-refactor branch from d36936b to 01eb64e Compare January 29, 2025 17:14
@ugiordan ugiordan marked this pull request as ready for review January 29, 2025 17:14
Copy link
Contributor

This PR can't be merged just yet 😢

Please run make generate manifests api-docs and commit the changes.

For more info: https://github.com/opendatahub-io/opendatahub-operator/actions/runs/13036711717

@ugiordan ugiordan force-pushed the RHOAIENG-11648/component-mapping-refactor branch 2 times, most recently from f972160 to a2e853d Compare January 29, 2025 18:08
@ykaliuta
Copy link
Contributor

/test opendatahub-operator-e2e

@ugiordan ugiordan force-pushed the RHOAIENG-11648/component-mapping-refactor branch 4 times, most recently from ec8e77d to 8e3950d Compare January 31, 2025 14:28
@ugiordan
Copy link
Contributor Author

I've commented out the e2e tests for KServe and MM Serving while waiting for their metadata to be placed in the correct manifest folder.

I'll reintroduce the tests in a separate PR, which will also include some e2e test code optimizations.

@ugiordan ugiordan force-pushed the RHOAIENG-11648/component-mapping-refactor branch from 8e3950d to f8cf83d Compare January 31, 2025 14:31
@ugiordan
Copy link
Contributor Author

/test opendatahub-operator-e2e

commit 8caaedfbbc7da4890f41496275a71e4364730646
Author: Ugo Giordano <[email protected]>
Date:   Wed Jan 29 16:09:34 2025 +0100

    added generated files

commit aedbf41
Merge: 9135927 6e134b1
Author: Ugo Giordano <[email protected]>
Date:   Wed Jan 29 16:00:38 2025 +0100

    Merge branch 'main' into RHOAIENG-11648/component-mapping-refactor

commit 9135927
Author: Ugo Giordano <[email protected]>
Date:   Wed Jan 29 15:28:08 2025 +0100

    removed releases from dashboard since not needed and renamed ComponentReleaseStatus into ComponentRelease

commit 237806d
Author: Ugo Giordano <[email protected]>
Date:   Wed Jan 29 12:56:50 2025 +0100

    removed releases from dashboard since not needed

commit 6e134b1
Author: Wen Zhou <[email protected]>
Date:   Wed Jan 29 12:41:18 2025 +0100

    fix: missing permission to update prometheusrules (opendatahub-io#1581)

    Signed-off-by: Wen Zhou <[email protected]>

commit a044cda
Merge: 2571965 bd00c9b
Author: Ugo Giordano <[email protected]>
Date:   Wed Jan 29 12:13:12 2025 +0100

    Merge branch 'main' into RHOAIENG-11648/component-mapping-refactor

commit 2571965
Author: Ugo Giordano <[email protected]>
Date:   Wed Jan 29 11:42:27 2025 +0100

    Map component versions to RHOAI status for better visibility

    commit 0f1cf7dd9ca20e41c97a1590e18dc888b68e9fd5
    Author: Ugo Giordano <[email protected]>
    Date:   Wed Jan 29 11:40:58 2025 +0100

        fix lint error

    commit 473e86f55fd87e496c5d4251d075dc1082ce6e4c
    Author: Ugo Giordano <[email protected]>
    Date:   Mon Jan 27 16:42:00 2025 +0100

        Map component versions to RHOAI status for better visibility

    commit 3d47679
    Merge: d706b92 bd00c9b
    Author: Ugo Giordano <[email protected]>
    Date:   Wed Jan 29 11:32:16 2025 +0100

        Merge branch 'main' into RHOAIENG-11648/component-mapping-refactor

    commit d706b92
    Author: Ugo Giordano <[email protected]>
    Date:   Tue Jan 28 18:00:29 2025 +0100

        Remove fetch releases action from dashboard & e2e tests

    commit 4e0deb2
    Author: Ugo Giordano <[email protected]>
    Date:   Tue Jan 28 16:10:28 2025 +0100

        unit test

        e2e tests

    commit bd00c9b
    Author: Luca Burgazzoli <[email protected]>
    Date:   Tue Jan 28 23:53:01 2025 +0100

        Improve Kserve's FeatureTraker handing (opendatahub-io#1562)

        * Improve Kserve's FeatureTraker handing

        - Make it possible to set FT's OwnerReference as Controller reference so
          the kubernetes garbage collector can block owner deletion till the FT
          has been deleted
        - Make it possible to set FT's generated resources OwnerReference as
          Controller reference so the kubernetes garbage collector can block
          FT deletion till the resources have been deleted
        - Add an Kserver reconciler action to remove legacy ownership on
          DSCI/DSC is any and related e2e tests

        * Update RBACs

        * Update RBACs

        * Fix findings

        * Update pkg/cluster/meta.go

        Co-authored-by: Gerard Ryan <[email protected]>

        * Fix renaming

        * Remove unrelated methods

        ---------

        Co-authored-by: Gerard Ryan <[email protected]>

    commit df5495e
    Author: Wen Zhou <[email protected]>
    Date:   Tue Jan 28 21:21:23 2025 +0100

        docs: remove duplicated files and update integration docs (opendatahub-io#1575)

        Signed-off-by: Wen Zhou <[email protected]>

    commit ca2f619
    Author: Wen Zhou <[email protected]>
    Date:   Tue Jan 28 21:02:36 2025 +0100

        fix: missing update permission on dashboard object (opendatahub-io#1576)

        - add update on all cases

        Signed-off-by: Wen Zhou <[email protected]>

    commit a996732
    Author: Wen Zhou <[email protected]>
    Date:   Tue Jan 28 20:50:56 2025 +0100

        fix: fix wrong map for DSP images (opendatahub-io#1577)

        - the old images are from 2.15 which have been updated during 2.16

        Signed-off-by: Wen Zhou <[email protected]>

    commit 94095f9
    Author: Dipanshu Gupta <[email protected]>
    Date:   Tue Jan 28 21:57:25 2025 +0530

        Setup admin permissions for hardware profiles (opendatahub-io#1573)

    commit 3056ab4
    Author: Ajay Jaganathan <[email protected]>
    Date:   Tue Jan 28 17:58:06 2025 +0530

        (fix): point to correct path for component integration doc (opendatahub-io#1574)

    commit d538956
    Author: Luca Burgazzoli <[email protected]>
    Date:   Tue Jan 28 10:01:48 2025 +0100

        chore: use constants from the status package where possible (opendatahub-io#1541)

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

    commit 9aed5e0
    Author: Andrew Ballantyne <[email protected]>
    Date:   Mon Jan 27 13:20:04 2025 -0500

        Clarify and update permissions (opendatahub-io#1538)

        * Add readme to explain values of permissions

        * NIM Accounts are namespaced resources

        * Update permissions to fulfill doc design

        * Based on feedback, less hard-fast ruling wording in the README

    commit 5e60591
    Author: Wen Zhou <[email protected]>
    Date:   Mon Jan 27 17:33:51 2025 +0100

        test: disable monitoring config in DSCI for ODH e2e test (opendatahub-io#1570)

        - we do not enable monitoring in ODH logic
        - we should keep it enable for rhoai branch

        Signed-off-by: Wen Zhou <[email protected]>

    commit a8eb6ff
    Author: Ugo Giordano <[email protected]>
    Date:   Mon Jan 27 16:51:31 2025 +0100

        fix lint add updated api doc

    commit 4b76ca4
    Author: Ugo Giordano <[email protected]>
    Date:   Mon Jan 27 16:42:00 2025 +0100

        Map component versions to RHOAI status for better visibility

    commit 48341ff
    Author: Luca Burgazzoli <[email protected]>
    Date:   Mon Jan 27 15:38:21 2025 +0100

        It takes more than 10 minutes for kserve-controller to be created during 2.17 installation (opendatahub-io#1564)

        * It takes more than 10 minutes for kserve-controller to be created during 2.17 installation

        * cleanup

    commit b0a0f87
    Author: Wen Zhou <[email protected]>
    Date:   Mon Jan 27 13:53:40 2025 +0100

        update: clean up old code before refactor (opendatahub-io#1494)

        * update: clean up old code before refactor

        - remove reference we explicilty check on odhdashboardconfig and kserve
        - remove customized config on controller QPS
        - remove RemoveLabel which is not called anywhere

        Signed-off-by: Wen Zhou <[email protected]>

        * update:

        - remove function for upgrade cleanup introduced before 2.8
        - remove flags to main: operator namespace and application namespace
          ( operator namespace is passing as env variable, app namespace is done by DSCI )

        Signed-off-by: Wen Zhou <[email protected]>

        * fix: Auth CR is cluster-scoped no need to set namespace for request

        - application namespace is removed from reconciler of dsci

        Signed-off-by: Wen Zhou <[email protected]>

        * fix: wrong code for upgrade path + rebase error

        Signed-off-by: Wen Zhou <[email protected]>

        ---------

        Signed-off-by: Wen Zhou <[email protected]>

    commit 7b4dfc2
    Author: Wen Zhou <[email protected]>
    Date:   Mon Jan 27 12:01:07 2025 +0100

        fix: for upgrade case we will need update permission on buildconfig to revmoew ownerref from dsc (opendatahub-io#1567)

        Signed-off-by: Wen Zhou <[email protected]>

    commit a00aa61
    Author: Wen Zhou <[email protected]>
    Date:   Mon Jan 27 09:00:32 2025 +0100

        fix: add matchlabel on NWP for customized appliation (opendatahub-io#1566)

        - update README and troubleshooting

        Signed-off-by: Wen Zhou <[email protected]>

    commit eb42450
    Author: Manjunath Kumatagi <[email protected]>
    Date:   Fri Jan 24 19:11:14 2025 +0530

        Build platform independent binary based on the target platform (opendatahub-io#1549)

    commit bc63cfd
    Author: Wen Zhou <[email protected]>
    Date:   Thu Jan 23 21:04:44 2025 +0100

        update: change previous workaround for subscription and add smcp in the list (opendatahub-io#1557)

        - remove subs from client cache
        - add smcp into exclude cache

        Signed-off-by: Wen Zhou <[email protected]>

    commit 63d4eab
    Author: Wen Zhou <[email protected]>
    Date:   Thu Jan 23 18:44:37 2025 +0100

        fix: missing monitoring NS for NWP if user opt customized app NS (opendatahub-io#1558)

        Signed-off-by: Wen Zhou <[email protected]>

    commit 912dcaa
    Author: Ugo Giordano <[email protected]>
    Date:   Thu Jan 23 16:56:32 2025 +0100

        Align get_all_manifests.sh with Kubeflow main branch (opendatahub-io#1550)

    commit ce7b381
    Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    Date:   Thu Jan 23 14:08:54 2025 +0100

        Update version to 2.23.1 (opendatahub-io#1553)

        Co-authored-by: zdtsw <[email protected]>

    commit 9845f7e
    Author: Wen Zhou <[email protected]>
    Date:   Thu Jan 23 14:07:25 2025 +0100

        update: various fix backport from RHOAI (opendatahub-io#1536)

        - fix missing RHOAI monitoring namespace for self-managed
        - fix wrong namespace name in  manifests
        - update hardcode label name
        - fix misleading log message

        Signed-off-by: Wen Zhou <[email protected]>

    commit 871c799
    Author: Wen Zhou <[email protected]>
    Date:   Thu Jan 23 13:21:29 2025 +0100

        fix: as a workaround for getting knative opreator check, set cache (opendatahub-io#1555)

        Signed-off-by: Wen Zhou <[email protected]>

    commit 28d0fa1
    Author: Wen Zhou <[email protected]>
    Date:   Thu Jan 23 11:49:37 2025 +0100

        fix: add missing namespace for console in managed cluster (opendatahub-io#1552)

        - blackbox require this
        - move into const in cluster pkg

        Signed-off-by: Wen Zhou <[email protected]>

    commit 5bcbaba
    Author: Luca Burgazzoli <[email protected]>
    Date:   Wed Jan 22 19:31:20 2025 +0100

        Avoid modelmesh and Kserve loop on updating shared CRDs (opendatahub-io#1547)

        The KServe and ModelMesh are shipping the same CRDs as part of
        their manifests but with different versions, this cause the
        respective component reconcilers to keep trying to install
        their respective version, ending in a infinite loop.

        This commit does not solve the underlying problem of having two
        components shipping the same CRDs with different versions, but
        avoids the infinite reconcile loop. The CRDs that is actually
        installed on the cluster is undefined, the latest one that is
        applied wins

    commit 8c7fef2
    Author: Luca Burgazzoli <[email protected]>
    Date:   Wed Jan 22 15:45:51 2025 +0100

        chore: remove unused code (opendatahub-io#1543)

        * chore: remove unused TrimToRFC1123Name function

        * chore: remove unused pkg/cluster/roles functions

        * chore: remove unused pkg/cluster/resources functions

    commit e83f2fc
    Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    Date:   Wed Jan 22 13:49:00 2025 +0100

        Update version to 2.23.0 (opendatahub-io#1544)

        Co-authored-by: zdtsw <[email protected]>

    commit 21eba1b
    Author: Luca Burgazzoli <[email protected]>
    Date:   Wed Jan 22 12:38:49 2025 +0100

        chore: cleanup Monitoring's initialize action (opendatahub-io#1542)

        The Monitoring controller is initialized only when the platform is
        managed, hence there's no need to conditionally add manifests

    commit 5321b8c
    Author: Luca Burgazzoli <[email protected]>
    Date:   Wed Jan 22 11:05:23 2025 +0100

        fix: use Monitoring.Spec.Namespace instead of the DSCI one (opendatahub-io#1540)

        This reduce the direct dependency from Monitoring to DSCI
@ugiordan ugiordan force-pushed the RHOAIENG-11648/component-mapping-refactor branch from f8cf83d to dced420 Compare January 31, 2025 19:16
Copy link

openshift-ci bot commented Jan 31, 2025

@ugiordan: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/opendatahub-operator-e2e dced420 link true /test opendatahub-operator-e2e

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Successfully merging this pull request may close these issues.

4 participants