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, react-api-client): handle failed analysis for RTP protocol on ODD #15101

Merged
merged 6 commits into from
May 7, 2024

Conversation

ncdiehl11
Copy link
Collaborator

@ncdiehl11 ncdiehl11 commented May 6, 2024

RQA-2673

Overview

RTP protocols introduce a new scenario where an RTP protocol can be sent to a Flex, analyze successfully with default values, and then have parameters input that will cause a failed analysis.

To handle this, the ProtocolSetup on the ODD should promp the user with a failed analysis modal with call to action return to protocol setup to reselect parameters and start a new run. Keeping consistent with our current behavior for protocols that fail analysis, the user will still have the option to dismiss the re-parameterization CTA and proceed with the run.

In addition, we need to modify the ProtocolCard on ODD to search not only for the most recent analysis, but the most recent successful analysis, should one exist.

TODO

  • add unit test for new React api client hook
Screen.Recording.2024-05-06.at.2.12.55.PM.mov

Test Plan

A. Following analysis failed modal CTA

  1. Push this branch to the ODD with make -C app-shell-odd push-ot3 host={IP}
  2. Send an RTP protocol that will pass analysis with default values, but will fail analysis with a certain selection of parameters. You can use this protocol
  3. Move to the ODD and confirm that the protocol was received
  4. Click the protocol and proceed to parameter selection
  5. Make a selection that will caused a failed analysis (if using the example protocol linked here, set the parameter titled "For fail on analysis" to "To fail"
  6. Confirm values and confirm that ProtocolSetup page prompts you with AnalysisFailedModal
  7. Verify that the call to action button for "Restart setup" pushes you back to the ProtocolDetails page where you can reselect parameters

B. Ignoring analysis failed modal CTA

  1. Repeat steps A1-6
  2. Select 'x' button in top right of modal
  3. Confirm that you can still run the protocol despite failed analysis

C. Protocol card finds successful analysis if one exists

  1. Repeat steps A1-6
  2. Select back button to view protocols dashboard
  3. Confirm that the protocol card does not show failed analysis because even though the most recent analysis failed, the protocol was analyzed successfully initially.

Changelog

  • write new React api client hook for querying the most recent successful analysis of a protocol as document
  • implement new useMostRecentSuccessfulAnalysisAsDocumentQuery hook in ProtocolCard to find a successful analysis if one exists
  • update AnalysisFailedModal to handle null protocolId
  • show AnalysisFailedModal at ProtocolSetup if analysis failed
  • update tests

Review requests

auth js

Risk assessment

medium

…n ODD

RTP protocols introduce a new scenario where an RTP protocol can be sent to a Flex, analyze
successfully with default values, and then have parameters input that will cause a failed analysis.
To handle this, the ProtocolSetup on the ODD should promp the user with a failed analysis modal with
call to action return to protocol setup to reselect parameters and start a new run. Keeping
consistent with our current behavior for protocols that fail analysis, the user will still have the
option to dismiss the re-parameterization CTA and proceed with the run. In addition, we need to
modify the ProtocolCard on ODD to search not only for the most recent analysis, but the most recent
successful analysis, should one exist.
@ncdiehl11 ncdiehl11 self-assigned this May 6, 2024
@ncdiehl11 ncdiehl11 requested review from a team, jbleon95, Elyorcv, koji, shlokamin and jerader and removed request for a team, jbleon95 and Elyorcv May 6, 2024 19:14
@ncdiehl11 ncdiehl11 marked this pull request as ready for review May 6, 2024 19:16
@ncdiehl11 ncdiehl11 requested a review from a team as a code owner May 6, 2024 19:16
Copy link
Contributor

@koji koji left a comment

Choose a reason for hiding this comment

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

Nice work! 🤖
The branch worked as expected!
The changes look good to me.

@ncdiehl11 ncdiehl11 merged commit 9ae6051 into chore_release-7.3.0 May 7, 2024
21 checks passed
@ncdiehl11 ncdiehl11 deleted the fix_app-odd-failed-rtp-analysis branch May 7, 2024 13:27
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.

None yet

2 participants