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: Use feature flag for streaming updates #9170

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

gt2345
Copy link
Contributor

@gt2345 gt2345 commented Apr 15, 2024

Ticket

MD-369

Description

Sometime the backend may not support streaming updates, so we can create a flag at WebUI to disable and enable streaming updates.
When streaming updates flag is false, we skip connecting to web socket during start up, and at the project list page, we manually update the store when patchProject happens.

Test Plan

With streaming_updates flag on and off, navigate to project list page.
Create/edit/delete project should work as expected.

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.

@gt2345 gt2345 requested a review from a team as a code owner April 15, 2024 21:58
@gt2345 gt2345 requested a review from johnkim-det April 15, 2024 21:59
@cla-bot cla-bot bot added the cla-signed label Apr 15, 2024
@gt2345 gt2345 requested review from ashtonG and removed request for johnkim-det April 15, 2024 21:59
Copy link

netlify bot commented Apr 15, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 90fc2bb
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66202f334cc40b00082a58ab
😎 Deploy Preview https://deploy-preview-9170--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 Apr 15, 2024

Codecov Report

Attention: Patch coverage is 18.09524% with 86 lines in your changes are missing coverage. Please review.

Project coverage is 38.71%. Comparing base (26f5e0b) to head (90fc2bb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9170      +/-   ##
==========================================
- Coverage   40.43%   38.71%   -1.72%     
==========================================
  Files         749      875     +126     
  Lines      105220   108235    +3015     
  Branches     2438     2439       +1     
==========================================
- Hits        42548    41908     -640     
- Misses      62440    66095    +3655     
  Partials      232      232              
Flag Coverage Δ
harness ?
web 35.38% <18.09%> (-0.04%) ⬇️

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

Files Coverage Δ
webui/react/src/hooks/useFeature.ts 94.17% <100.00%> (+0.62%) ⬆️
webui/react/src/stores/projects.tsx 96.98% <100.00%> (+0.05%) ⬆️
webui/react/src/components/ProjectCard.tsx 0.00% <0.00%> (ø)
...bui/react/src/components/ProjectActionDropdown.tsx 0.00% <0.00%> (ø)
webui/react/src/components/ProjectEditModal.tsx 0.00% <0.00%> (ø)
webui/react/src/App.tsx 0.00% <0.00%> (ø)
webui/react/src/stores/stream.ts 46.96% <42.85%> (-18.11%) ⬇️
...t/src/pages/WorkspaceDetails/WorkspaceProjects.tsx 0.00% <0.00%> (ø)

... and 715 files with indirect coverage changes

@gt2345 gt2345 force-pushed the gt/369-streaming-updates-flag branch from e113263 to f3a7536 Compare April 17, 2024 19:39
Copy link
Contributor

@ashtonG ashtonG left a comment

Choose a reason for hiding this comment

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

looks good to me!

@gt2345 gt2345 merged commit 72344e0 into main Apr 18, 2024
72 of 84 checks passed
@gt2345 gt2345 deleted the gt/369-streaming-updates-flag branch April 18, 2024 17:16
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