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 querying /runs/null #14624

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

mjhuff
Copy link
Contributor

@mjhuff mjhuff commented Mar 11, 2024

Closes RQA-2486

Overview

The notification hook for useRunQuery did not check if runs == null before querying, causing fetching of the /runs/null in some spots. Do not fetch if the runId is null.

Test Plan

  • On edge/chore_release. Open desktop app and navigate to devices. You'll notice a lot of errors logs to /runs/null.
  • On this branch, navigate to devices. You won't see those error logs anymore, nor those network requests.

Changelog

  • Fixed the app performing some unnecessary querying of the /runs/:runId endpoint.

Risk assessment

low

The notification hook for useRunQuery did not check if runs == null before querying, causing
fetching of the /runs/null in some spots. Do not fetch if the runId is null.
@mjhuff mjhuff requested review from koji and a team March 11, 2024 17:48
@mjhuff mjhuff requested a review from a team as a code owner March 11, 2024 17:49
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

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

Project coverage is 67.56%. Comparing base (7f5a687) to head (d0b4dc6).
Report is 1 commits behind head on chore_release-7.2.1.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           chore_release-7.2.1   #14624   +/-   ##
====================================================
  Coverage                67.56%   67.56%           
====================================================
  Files                     2521     2521           
  Lines                    72251    72251           
  Branches                  9311     9311           
====================================================
  Hits                     48815    48815           
  Misses                   21240    21240           
  Partials                  2196     2196           
Flag Coverage Δ
app 63.89% <0.00%> (ø)

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

Files Coverage Δ
app/src/resources/runs/useNotifyRunQuery.ts 0.00% <0.00%> (ø)

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.

LGTM!

@mjhuff mjhuff merged commit f99718c into chore_release-7.2.1 Mar 11, 2024
23 of 24 checks passed
@mjhuff mjhuff deleted the app_fix-querying-for-null-run branch March 11, 2024 19:45
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.

None yet

2 participants