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

feat: add support for Workbenches component #1349

Conversation

mlassak
Copy link
Contributor

@mlassak mlassak commented Nov 6, 2024

Description

JIRA ref: RHOAIENG-13176

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

codecov bot commented Nov 6, 2024

Codecov Report

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

Please upload report for BASE (feature-operator-refactor@8e9be7b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...atasciencecluster/datasciencecluster_controller.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##             feature-operator-refactor    #1349   +/-   ##
============================================================
  Coverage                             ?   27.15%           
============================================================
  Files                                ?       60           
  Lines                                ?     4806           
  Branches                             ?        0           
============================================================
  Hits                                 ?     1305           
  Misses                               ?     3349           
  Partials                             ?      152           

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

// Go through each manifest and set the overlays if defined
// first on odh-notebook-controller and kf-notebook-controller last to notebook-images
if len(workbenches.Spec.DevFlags.Manifests) != 0 {
for _, subcomponent := range workbenches.Spec.DevFlags.Manifests {
Copy link
Contributor

Choose a reason for hiding this comment

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

in this loop, you should amend the rr.Manifesst path, otherwhise the changes won't be taken into account, simlat to https://github.com/opendatahub-io/opendatahub-operator/blob/feature-operator-refactor/controllers/components/dashboard/dashboard_controller_actions.go#L49-L59

Scheme *runtime.Scheme
}
// NewComponentReconciler creates a ComponentReconciler for the Workbenches API.
func NewComponentReconciler(ctx context.Context, mgr ctrl.Manager) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, the respective actions added

I assume the pod security role binding action will be affected by the change introduced in #1354 later

@mlassak
Copy link
Contributor Author

mlassak commented Nov 20, 2024

/retest

}
NotebookControllerPath = filepath.Join(odhdeploy.DefaultManifestPath, "odh-notebook-controller/odh-notebook-controller", defaultKustomizePathNbc)

rr.Manifests[i].Path = odhdeploy.DefaultManifestPath
Copy link
Contributor

@lburgazzoli lburgazzoli Nov 20, 2024

Choose a reason for hiding this comment

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

The index here may cause an our of bound issues i.e. if there are 4 entries in the devFlags array.
The order may also cause issues as i.e. if you have only 1 entry in the devFLags, the you may override the wrong entry in the manifests.

True also for the same logic in the below conditions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had an incorrect assumption previously, it should be fixed now. Leaving this conversation open for now to check

@mlassak mlassak changed the title [WIP] feat: add support for Workbenches component feat: add support for Workbenches component Nov 21, 2024
@lburgazzoli lburgazzoli requested review from zdtsw and removed request for adelton November 25, 2024 08:38
@lburgazzoli
Copy link
Contributor

LGTM , @zdtsw can you have a look ?

Copy link
Member

@zdtsw zdtsw left a comment

Choose a reason for hiding this comment

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

in general i am fine with the changes

controllers/components/workbenches/workbenches.go Outdated Show resolved Hide resolved
controllers/components/workbenches/workbenches.go Outdated Show resolved Hide resolved
Copy link
Member

@grdryn grdryn left a comment

Choose a reason for hiding this comment

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

LGTM, couple of optional suggestions inline.

controllers/components/workbenches/workbenches_support.go Outdated Show resolved Hide resolved
tests/e2e/workbenches_test.go Outdated Show resolved Hide resolved
Copy link
Member

@zdtsw zdtsw left a comment

Choose a reason for hiding this comment

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

need rebase and fix changed for workbench

controllers/components/workbenches/workbenches.go Outdated Show resolved Hide resolved
Copy link
Member

@zdtsw zdtsw left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

openshift-ci bot commented Nov 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@openshift-merge-bot openshift-merge-bot bot merged commit a5756b9 into opendatahub-io:feature-operator-refactor Nov 28, 2024
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.

6 participants