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

tweak: Exclude triptychs from self-refresh job; Move unrelated logic out of Screens.Config.State #1864

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

jzimbel-mbta
Copy link
Member

@jzimbel-mbta jzimbel-mbta commented Sep 14, 2023

Asana task: ad hoc

In preparation for triptychs appearing in Screenplay, this prevents the screens-by-alert self refresh job from wasting effort on triptychs since they never show alerts and are likely to load less frequently than the cache TTL.

👉 I tried to put the list of non-alert-showing screen types in a high visibility spot, since we'll need to keep it manually updated. (I couldn't think of a simple programmatic way to determine whether a given screen can show alert widgets.)
I'm very open to suggestions on this, though. Either a way to make the list even more visible, or a way to automatically determine this screen type trait.

  • Tests added?

@jzimbel-mbta jzimbel-mbta requested review from a team and PaulJKim and removed request for a team September 14, 2023 17:19
@github-actions
Copy link

Coverage of commit fa31ce1

Summary coverage rate:
  lines......: 40.7% (2294 of 5632 lines)
  functions..: 42.1% (1050 of 2495 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/config/screen.ex                                             |71.4%     21|66.7%     9|    -      0
  lib/screens/config/state.ex                                              |19.0%     63|28.6%    35|    -      0
  lib/screens/screens_by_alert/self_refresh_runner.ex                      |15.0%     20|50.0%     6|    -      0
  lib/screens/v2/screen_data/parameters.ex                                 |30.0%     10|60.0%     5|    -      0

Download coverage report

…ert-showing screens are the exception, not the rule
@github-actions
Copy link

Coverage of commit 4b1d057

Summary coverage rate:
  lines......: 40.7% (2294 of 5632 lines)
  functions..: 42.1% (1050 of 2495 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/config/screen.ex                                             |71.4%     21|66.7%     9|    -      0
  lib/screens/config/state.ex                                              |19.0%     63|28.6%    35|    -      0
  lib/screens/screens_by_alert/self_refresh_runner.ex                      |15.0%     20|50.0%     6|    -      0
  lib/screens/v2/screen_data/parameters.ex                                 |30.0%     10|60.0%     5|    -      0

Download coverage report

Copy link
Contributor

@PaulJKim PaulJKim left a comment

Choose a reason for hiding this comment

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

One minor comment, but otherwise looks good

lib/screens/config/state.ex Outdated Show resolved Hide resolved
@github-actions
Copy link

Coverage of commit 5e78b54

Summary coverage rate:
  lines......: 40.7% (2294 of 5632 lines)
  functions..: 42.1% (1050 of 2495 functions)
  branches...: no data found

Files changed coverage rate:
                                                                           |Lines       |Functions  |Branches    
  Filename                                                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================================================
  lib/screens/config/screen.ex                                             |71.4%     21|66.7%     9|    -      0
  lib/screens/config/state.ex                                              |19.0%     63|28.6%    35|    -      0
  lib/screens/screens_by_alert/self_refresh_runner.ex                      |15.0%     20|50.0%     6|    -      0
  lib/screens/v2/screen_data/parameters.ex                                 |30.0%     10|60.0%     5|    -      0

Download coverage report

@jzimbel-mbta jzimbel-mbta merged commit 3ca5927 into master Sep 15, 2023
2 checks passed
@jzimbel-mbta jzimbel-mbta deleted the jz/self-refresh-runner-skip-triptychs branch September 15, 2023 13:52
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