Page MenuHomePhabricator

[keyserver] Silence unused-promise Flow lint in backupDB
ClosedPublic

Authored by ashoat on Dec 4 2023, 1:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 9:15 AM
Unknown Object (File)
Fri, Nov 22, 9:07 AM
Unknown Object (File)
Fri, Nov 22, 9:04 AM
Unknown Object (File)
Fri, Nov 22, 3:40 AM
Unknown Object (File)
Thu, Nov 7, 6:00 PM
Unknown Object (File)
Oct 26 2024, 1:05 AM
Unknown Object (File)
Oct 23 2024, 1:05 AM
Unknown Object (File)
Oct 16 2024, 5:57 PM
Subscribers

Details

Summary

The async IIFE in backupDB contains two try-catch blocks that guarantee it will never reject.

As such, we're safe to ignore the unused-promise Flow lint. Our primary reason for enabling that Lint is to catch unhandled promise rejections within keyserver, but there is no potential of that here.

Regarding the void keyword: the Flow team recommends using the void keyword to silence the unused-promise Lint. See the "Fire-and-forget" part of this blog post.

Depends on D10177

Test Plan

Flow

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage