Skip to content

Commit

Permalink
silence facebook build type errors
Browse files Browse the repository at this point in the history
Summary:
Eden macOS release is failing on some type checking errors:

```
  ✗ eden/fs/config/facebook:edenfs_config_util-type-checking - main
  ✗ eden/fs/cli:proc_utils-type-checking - main
  ✗ eden/fs/facebook:edenfs_restarter-library-type-checking - main
  ✗ eden/fs/cli:lib-type-checking - main
```

Errors look like:
```
fbcode/eden/fs/cli/config.py:414:12 Undefined import [21]: Could not find a name `scuba_telemetry` defined in module `eden.fs.cli.facebook`.
```

D63126614 introed a new way type checking is run in python which caused these new tests to be created and start failing.

These all look runtime safe since we are importing fb only code and then falling back when we fail to import. So we should be fine to just silence these type errors

These fix was introduced in D63261246 but it was removed by codemode in D64568958. Bring them back because without them eden release will fail on macOS

Reviewed By: sggutier

Differential Revision: D64803931

fbshipit-source-id: ee5509e55d4862c82c2a9e6365cc7a9a5d2a7088
  • Loading branch information
kavehahmadi60 authored and facebook-github-bot committed Oct 23, 2024
1 parent 406e3f8 commit 78da1cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eden/fs/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,10 @@ def _create_telemetry_logger(self) -> telemetry.TelemetryLogger:
return telemetry.NullTelemetryLogger()

try:
# pyre-fixme [21]: Undefined import Could not find a module corresponding to import
from eden.fs.cli.facebook import scuba_telemetry # @manual

# pyre-fixme [16]: Undefined attribute
return scuba_telemetry.ScubaTelemetryLogger()
except (ImportError, NotImplementedError):
pass
Expand Down
1 change: 1 addition & 0 deletions eden/fs/cli/proc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def get_build_info(self) -> BuildInfo:


try:
# pyre-fixme [21]: Undefined import Could not find a module corresponding to import
from common.base.pid_info.py import build_info_lib # @manual

def get_build_info_from_pid(
Expand Down

0 comments on commit 78da1cc

Please sign in to comment.