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

[Service Mesh] General Improvements #1959

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

cam-garrison
Copy link

Closes #1958

Description

How Has This Been Tested?

Built and used image quay.io/maistra-dev/odh-dashboard:gen-improve for testing.

Changes here are pretty minimal, just tested that when a notebook is created/started from the jupyter tile + from a DS project with ODHDashboardConfig.spec.disableServiceMesh=false, the user is routed to the notebook correctly through the mesh.

Verified the same when ODHDashboardConfig.spec.disableServiceMesh=true`, that the user is routed to the old route using oauth-proxy.

Credited @christianvogt as a co-author on the commit as these 3 changes came directly from Christian's review + suggestions on #1088 so I didn't want that to be lost to the sands of time.

Test Impact

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit tests & storybook for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

Co-authored-by: christianvogt <[email protected]>
@cam-garrison cam-garrison linked an issue Oct 11, 2023 that may be closed by this pull request
Comment on lines 29 to 31
const getRoutePromise = !enableServiceMesh
? getRoute(notebookName, projectName).then((route) => route?.spec.host)
? getRoute(notebookName, projectName).then((route) => route.spec.host)
: getServiceMeshGwHost(projectName);
Copy link
Contributor

Choose a reason for hiding this comment

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

If enableServiceMesh is true, but getServiceMeshGwHost fails to return a route, should it fallback to getRoute ?

Copy link
Author

Choose a reason for hiding this comment

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

I don't think so. Since if a notebook has been created or restarted with enableServiceMesh=true, the notebook should not have oauth-proxy injected into it, so even if a route was successfully fetched with the getRoute call, I don't think that it would be functional.

Potentially a user could start a notebook, leave it running and then install service mesh + enable the feature flag, and then be in a state where this scenario could apply. But from previous conversations, I don't think the goal is to support this partial Oauth/Istio state, the user should just restart the notebook in this case.

@christianvogt
Copy link
Contributor

/lgtm
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt

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-ci openshift-ci bot merged commit 08bc71d into opendatahub-io:f/ossm Oct 18, 2023
4 checks passed
/**
* Feature flags are required in the config -- but upgrades can be mixed and omission of the property
* usually ends up being enabled. This will prevent that as a general utility.
*/
export const featureFlagEnabled = (disabledSettingState?: boolean): boolean =>
Copy link
Member

Choose a reason for hiding this comment

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

This function is going away in #2010 -- what is the OSSM need here? You just work or not work based on the feature flag? Do you have any backend component stack (in the DSC) that we can look at?

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.

OSSM: General Improvements
3 participants