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

fix(app): Fix improper transitioning run status in protocol runs #14459

Merged
merged 8 commits into from
Feb 9, 2024

Conversation

mjhuff
Copy link
Contributor

@mjhuff mjhuff commented Feb 8, 2024

Closes RQA-2291, RQA-2307, RQA-2306, RQA-2304

Overview

This PR fixes a bug on the app side in which the incorrect React Query property was used. In order to prevent any refetches, staleTime is the correct choice. Certain useRunQuery and useAllRunQuery hooks that were not updating properly now update as expected. Also, the removed RUN_STATUS_STOP_REQUESTED is added back to useRunStatus(), since its removal was causing bug RQA-2306.

The python side changes are all sanity check changes - nothing functionally new here. A new push is added to the remove method, since we want to push on every new CRUD. I don't know if this was causing bugs, but it should be fixed.

Test Plan

  • Run through the bug tickets and make sure they now work.

Changelog

  • Fixed modals/buttons not updating correctly related to protocol runs.

Risk assessment

low

…ropriately

Instead of checking the refetchInterval property to see if a notification refetch should occur, we
should check if staleTime is infinity. This accurately captures the refetchHTTP behavior that we
actually want.
@mjhuff mjhuff requested review from shlokamin, CaseyBatten and a team February 8, 2024 21:21
@mjhuff mjhuff requested review from a team as code owners February 8, 2024 21:21
Copy link

codecov bot commented Feb 8, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (8dc44b0) 67.70% compared to head (57fbb51) 67.78%.
Report is 6 commits behind head on chore_release-7.2.0.

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##           chore_release-7.2.0   #14459      +/-   ##
=======================================================
+ Coverage                67.70%   67.78%   +0.08%     
=======================================================
  Files                     1628     2519     +891     
  Lines                    54904    72004   +17100     
  Branches                  4147     9256    +5109     
=======================================================
+ Hits                     37172    48810   +11638     
- Misses                   17042    20991    +3949     
- Partials                   690     2203    +1513     
Flag Coverage Δ
app 64.63% <37.50%> (+30.70%) ⬆️
react-api-client 66.38% <ø> (+0.21%) ⬆️

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

Files Coverage Δ
app/src/organisms/RunTimeControl/hooks.ts 71.11% <ø> (ø)
react-api-client/src/runs/useAllRunsQuery.ts 91.66% <ø> (ø)
robot-server/robot_server/runs/run_store.py 100.00% <ø> (ø)
app/src/resources/runs/useNotifyRunQuery.ts 66.66% <0.00%> (ø)
app/src/resources/useNotifyService.ts 35.71% <42.85%> (ø)

... and 889 files with indirect coverage changes

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

couple small change requests for python style and robustness

Copy link
Member

@sfoster1 sfoster1 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!

@mjhuff mjhuff merged commit d22e93d into chore_release-7.2.0 Feb 9, 2024
17 of 18 checks passed
@mjhuff mjhuff deleted the app_fix-notificiation-protocol-runs branch February 9, 2024 19:42
TamarZanzouri pushed a commit that referenced this pull request Feb 16, 2024
)

Closes RQA-2291, RQA-2307, RQA-2306, RQA-2304

* fix(app): fix non polling notify hooks not always refetching data appropriately

Instead of checking the refetchInterval property to see if a notification refetch should occur, we
should check if staleTime is infinity. This accurately captures the refetchHTTP behavior that we
actually want.

* fix(app): fix infinite cancelling run state when run status is idle->stop-requested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants