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: remove genai from experimental feature list and enable via /master feature switches [GAS-1016] #9435

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

hkang1
Copy link
Contributor

@hkang1 hkang1 commented May 28, 2024

Nav Bar
Screenshot 2024-05-28 at 3 19 52 PM

Tab Bar
Screenshot 2024-06-03 at 4 44 56 PM

Removed genai from Experimentals list of features.
Screenshot 2024-05-29 at 4 19 04 PM

Ticket

GAS-1016

Description

Removes the user control of turning on/off genai from the Experimental list of features under user settings. The noUserControl flag makes the feature purely controlled by the backend featureSwitches, where if it is included in there, then it is enabled.

Test Plan

  • Check that the GenAI feature does NOT show up on the Experimentals list of features under user settings.
  • Check that url query param f_genai=true does not turn GenAI on in an MLDE cluster that does not have genai enabled.
  • Check that if the cluster has genai returned by the /master endpoint (featureSwitches) then it appears in the sidebar.
  • Also check that if the cluster does NOT have genai returned by the /aster endpoint (featureSwitches) then it does NOT appear in the side bar.

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

@cla-bot cla-bot bot added the cla-signed label May 28, 2024
Copy link

netlify bot commented May 28, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 51c5dfc
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/665e5bc85fe26200085d66b6
😎 Deploy Preview https://deploy-preview-9435--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 59.57447% with 19 lines in your changes missing coverage. Please review.

Project coverage is 43.78%. Comparing base (d50433d) to head (51c5dfc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9435      +/-   ##
==========================================
- Coverage   51.06%   43.78%   -7.29%     
==========================================
  Files         747      423     -324     
  Lines      111167    71219   -39948     
  Branches     2778     2781       +3     
==========================================
- Hits        56772    31182   -25590     
+ Misses      54220    39862   -14358     
  Partials      175      175              
Flag Coverage Δ
harness ?
web 44.12% <59.57%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
webui/react/src/hooks/useFeature.ts 94.69% <100.00%> (+0.19%) ⬆️
webui/react/src/components/UserSettings.tsx 83.90% <85.71%> (+0.09%) ⬆️
webui/react/src/components/NavigationTabbar.tsx 0.00% <0.00%> (ø)

... and 324 files with indirect coverage changes

@hkang1 hkang1 marked this pull request as ready for review May 28, 2024 22:29
@hkang1 hkang1 requested a review from a team as a code owner May 28, 2024 22:29
@hkang1 hkang1 requested a review from johnkim-det May 28, 2024 22:29
@johnkim-det
Copy link
Contributor

should this also be added to the mobile NavigationTabBar?

@hkang1 hkang1 force-pushed the enable-gas-permanently branch 2 times, most recently from cabc4b7 to 0644c04 Compare May 29, 2024 22:17
Copy link
Contributor

@johnkim-det johnkim-det left a comment

Choose a reason for hiding this comment

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

also see comment re: adding to NavigationTabbar

@@ -37,6 +38,7 @@ export const FEATURES: Record<ValidFeature, FeatureDescription> = {
defaultValue: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

also want defaultValue to be true, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually we don't want this always on, because we still want featureSwitches from /api/v1/master to be able to return and control whether genai is supported or not. If the deployment does not support genai, then featureSwitches will not have genai in the list and the UI will not show the corresponding link either. Having it on makes it always appear no matter what for me.

@hkang1
Copy link
Contributor Author

hkang1 commented Jun 3, 2024

should this also be added to the mobile NavigationTabBar?

Good call with the tab bar, added to the tabbar as well

@hkang1 hkang1 changed the title feat: remove genai from feature list and enable permanently [GAS-1016] feat: remove genai from experimental feature list and enable via /master feature switches [GAS-1016] Jun 3, 2024
@hkang1 hkang1 requested a review from johnkim-det June 3, 2024 22:49
Copy link
Contributor

@johnkim-det johnkim-det left a comment

Choose a reason for hiding this comment

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

Nothing blocking but please see comments

Comment on lines 92 to 93
featureSwitches.includes(feature) && (isOn = true);
featureSwitches.includes(`-${feature}`) && (isOn = false);
Copy link
Contributor

Choose a reason for hiding this comment

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

re: previous comment about defaultValue

I thought the intent was to enable the feature by default, but still be able to disable it via config. According to this check here, disabling via config would be accomplished by including -genai in featureSwitches, not by omitting it (omitting defers to default)

but if the intent is actually to have it disabled by default and only enabled via config, then this does seem to accomplish that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yeah great point, since I wasn't aware of the -genai possibility. I confirmed with the team that genai will still be off by default on the config side and that it has to be explicitly turned on to enable it. So on the featureSwitches side it should only ever come through as genai (without the minus prefix).

Comment on lines +299 to +302
<Select searchable={false}>
<Option value={true}>On</Option>
<Option value={false}>Off</Option>
</Select>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: ET team has discussed wanting to replace these Selects with Toggles. definitely outside the scope of this PR but thought I'd bring it up since we're making changes to this area anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, the toggle definitely makes more sense here for these binary options!

@hkang1 hkang1 assigned hkang1 and unassigned johnkim-det Jun 4, 2024
@hkang1 hkang1 merged commit 8d64508 into main Jun 4, 2024
83 of 97 checks passed
@hkang1 hkang1 deleted the enable-gas-permanently branch June 4, 2024 18:17
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.

2 participants