sapling/eden/scm/lib
Liubov Dmitrieva 7a7e8c0d57 skip logging of bad requests for health checks
Summary:
skip logging as "bad" requests for health checks

health checks are currently implemented like simple connections to the port:

```
def _test_service_is_running(ui):
    port = ui.configint("commitcloud", "scm_daemon_tcp_port")
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    if s.connect_ex(("127.0.0.1", port)):
        _warn_service_not_running(ui)
    s.close()
```

so, skipping errors coming from json parsing for those type of checks

todo: implement a proper health_check request which can be part of migration to
json rpc

Reviewed By: quark-zju

Differential Revision: D43693235

fbshipit-source-id: 689cd3368c665fefd61a86d1125dc8d2aba1354d
2023-03-02 00:11:20 -08:00
..
async-runtime main: setup Rust ctrlc handler 2023-02-09 20:19:06 -08:00
atomicfile lib: relicense 11 libraries from GPL2 to MIT (LICENSE) 2022-07-22 13:01:44 -07:00
auth Update to chrono-0.4.23 2023-03-01 05:04:16 -08:00
backingstore backingstore: expose file size/sha1 to EdenFS 2023-02-21 12:05:13 -08:00
blackbox log from what version to what version the local state has been changed 2023-02-24 05:37:40 -08:00
cats Upgrade indexmap 2023-01-29 11:17:39 -08:00
checkout Update tokio-1.21.2 to tokio-1.25.0 2023-01-30 14:49:36 -08:00
clidispatch clidispatch: add context method to create logger 2023-02-09 11:49:19 -08:00
clientinfo update to rust 1.64.0 2022-09-27 15:18:58 -07:00
cliparser py3: remove python3 crate feature 2022-11-14 18:14:03 -08:00
clone fix some more "hg" references 2022-11-14 13:46:05 -08:00
commitcloudsubscriber skip logging of bad requests for health checks 2023-03-02 00:11:20 -08:00
config clone: reconcile rust and Python URL scheme handling 2023-02-27 10:32:57 -08:00
control-point Rerun autocargo 2022-11-29 05:48:56 -08:00
copytrace copytrace: add CopyTrace trait 2023-02-27 07:42:35 -08:00
cpython-async Update tokio-1.21.2 to tokio-1.25.0 2023-01-30 14:49:36 -08:00
cpython-ext Update libc-0.2.137 to libc-0.2.139 2023-02-12 16:30:00 -08:00
dag Update tokio-1.21.2 to tokio-1.25.0 2023-01-30 14:49:36 -08:00
debugtop Utc.timestamp(…) -> Utc.timestamp_opt(…).unwrap() 2022-12-20 13:50:25 -08:00
dev-logger third-party/rust: bump tracing-subscriber and tracing-glog 2022-10-14 13:32:47 -07:00
doctor/network update to rust 1.64.0 2022-09-27 15:18:58 -07:00
drawdag simplify checking in range handling 2022-09-27 13:10:15 -07:00
eagerepo eagerepo: handle null id read 2023-02-21 10:37:13 -08:00
edenapi Update tokio-1.21.2 to tokio-1.25.0 2023-01-30 14:49:36 -08:00
edenfs-client Rust crate rsa 0.8.1 and required fixes 2023-02-16 17:03:23 -08:00
encoding encoding: fix test build on Windows 2022-05-05 17:15:37 -07:00
exchange update to rust 1.64.0 2022-09-27 15:18:58 -07:00
formatter Fix doc tests of all eden targets 2023-02-22 17:53:55 -08:00
fsinfo Update libc-0.2.137 to libc-0.2.139 2023-02-12 16:30:00 -08:00
fsyncglob ethers.rs 2022-06-23 20:03:16 -07:00
gitstore status: fix native status for git repos 2023-01-26 09:17:43 -08:00
hg-http config: move to subdirectory 2022-09-01 17:43:38 -07:00
hg-metrics ethers.rs 2022-06-23 20:03:16 -07:00
hgcommands clone: reconcile rust and Python URL scheme handling 2023-02-27 10:32:57 -08:00
hgcommits status: fix native status for git repos 2023-01-26 09:17:43 -08:00
hgtime Update to chrono-0.4.23 2023-03-01 05:04:16 -08:00
http-client third-party/rust: add experimental feature to zstd 2023-02-23 09:28:19 -08:00
identity paths: use rcutil to edit "[paths]" config 2022-12-21 19:08:24 -08:00
indexedlog third-party/rust: remove memmap and migrate to memmap2 2023-02-23 09:28:19 -08:00
insta_ext update insta to 1.21.1 2022-11-17 08:40:50 -08:00
io Fix doc tests of all eden targets 2023-02-22 17:53:55 -08:00
lazystr add lazystr crate for ergonomic String thunks 2022-07-07 15:19:21 -07:00
linelog license: update license headers 2022-03-04 12:55:23 -08:00
lz4-pyframe Update libc-0.2.137 to libc-0.2.139 2023-02-12 16:30:00 -08:00
manifest manifest-tree: reimplement BfsIter 2023-02-28 09:34:42 -08:00
manifest-tree manifest-tree: reimplement BfsIter 2023-02-28 09:34:42 -08:00
metalog indexedlog: move config variables to a module 2023-01-26 14:50:21 -08:00
metrics futures 0.3.21 -> 0.3.24 2022-09-05 13:49:07 -07:00
migration update to rust 1.64.0 2022-09-27 15:18:58 -07:00
mincode Remove ::{self} 2022-07-26 03:11:30 -07:00
minibench lib: relicense 11 libraries from GPL2 to MIT (LICENSE) 2022-07-22 13:01:44 -07:00
minibytes third-party/rust: remove memmap and migrate to memmap2 2023-02-23 09:28:19 -08:00
mpatch Update libc-0.2.137 to libc-0.2.139 2023-02-12 16:30:00 -08:00
mpatch-sys third-party/rust: update cc 2023-01-27 05:07:50 -08:00
mutationstore dag: move dag/render to a separate crate 2023-01-20 12:42:43 -08:00
nodemap update to rust 1.64.0 2022-09-27 15:18:58 -07:00
nonblocking futures 0.3.21 -> 0.3.24 2022-09-05 13:49:07 -07:00
pathhistory pathhisotry: add RenameTracer API 2023-02-27 07:42:35 -08:00
pathmatcher match: add build_patterns util 2022-10-25 15:15:54 -07:00
pprint rust: update serde_json to 1.0.79 and serde to 1.0.136 2022-04-10 23:39:55 -07:00
procinfo Update libc-0.2.137 to libc-0.2.139 2023-02-12 16:30:00 -08:00
progress progress: filter out empty string 2023-02-27 13:36:02 -08:00
radixbuf update to rust 1.64.0 2022-09-27 15:18:58 -07:00
refencode remove generated thrift code and fix external CI (#26) 2022-02-09 12:21:32 -08:00
renderdag renderdag: make serde an optional dependency 2023-01-23 11:38:41 -08:00
repo repo: do not construct EdenApi if remote is not configured 2023-02-21 10:37:13 -08:00
repo_name update to rust 1.64.0 2022-09-27 15:18:58 -07:00
repolock Reviewed By: zertosh 2022-11-11 05:33:18 -08:00
revisionstore third-party/rust: remove memmap and migrate to memmap2 2023-02-23 09:28:19 -08:00
revlogindex Update to async-trait 0.1.58 2022-10-19 17:35:20 -07:00
revsets checkout: fallback if Rust commit resolution fails 2022-11-08 15:55:26 -08:00
runlog Update libc-0.2.137 to libc-0.2.139 2023-02-12 16:30:00 -08:00
sparse sparse: ignore directory %includes 2023-02-01 08:13:43 -08:00
spawn-ext Update libc-0.2.137 to libc-0.2.139 2023-02-12 16:30:00 -08:00
status status: handle non-utf8 paths from watchman 2023-02-10 07:14:53 -08:00
storemodel Update to async-trait 0.1.58 2022-10-19 17:35:20 -07:00
streams Update tokio-1.21.2 to tokio-1.25.0 2023-01-30 14:49:36 -08:00
third-party third-party/rust: remove memmap and migrate to memmap2 2023-02-23 09:28:19 -08:00
thrift-types update to rust 1.64.0 2022-09-27 15:18:58 -07:00
tracing-analyzer Remove unused Rust deps 2022-06-14 09:31:57 -07:00
tracing-collector Update libc-0.2.137 to libc-0.2.139 2023-02-12 16:30:00 -08:00
tracing-reload third-party/rust: bump tracing-subscriber and tracing-glog 2022-10-14 13:32:47 -07:00
tracing-runtime-callsite update regex to 1.6.0 2022-10-31 21:28:04 -07:00
tracing-sampler third-party/rust: bump tracing-subscriber and tracing-glog 2022-10-14 13:32:47 -07:00
treestate Rust crate rsa 0.8.1 and required fixes 2023-02-16 17:03:23 -08:00
types third-party/rust: remove the sha-1 crate 2023-02-14 04:44:22 -08:00
util third-party/rust: remove memmap and migrate to memmap2 2023-02-23 09:28:19 -08:00
version version: use SAPLING_VERSION as version if provided 2022-11-04 17:50:50 -07:00
vfs Update libc-0.2.137 to libc-0.2.139 2023-02-12 16:30:00 -08:00
vlqencoding Remove ::{self} 2022-07-26 03:11:30 -07:00
workingcopy status: detect deleted files after watchman restart 2023-02-28 16:44:15 -08:00
xdiff fix clippy lints + add constructor for DiffState 2022-11-23 09:20:23 -08:00
xdiff-sys third-party/rust: update cc 2023-01-27 05:07:50 -08:00
zstdelta Update libc-0.2.137 to libc-0.2.139 2023-02-12 16:30:00 -08:00
zstore third-party/rust: remove the sha-1 crate 2023-02-14 04:44:22 -08:00
CMakeLists.txt codemod: update license headers 2022-01-05 14:43:32 -08:00
README.md hgext: rename ext to hgext 2022-08-23 15:19:05 -07:00
run_cargo_tests.py tests: run cargo tests with different features 2023-01-23 11:38:41 -08:00

lib

Any native code (C/C++/Rust) that Mercurial (either core or extensions) depends on should go here. Python code, or native code that depends on Python code (e.g. #include <Python.h> or use cpython) is disallowed.

As we start to convert more of Mercurial into Rust, and write new paths entrirely in native code, we'll want to limit our dependency on Python, which is why this barrier exists.

See also ext/extlib/README.md, mercurial/cext/README.mb.

How do I choose between lib and extlib (and cext)?

If your code is native and doesn't depend on Python (awesome!), it goes here.

Otherwise, put it in ext/extlib (if it's only used by extensions) or mercurial/cext (if it's used by extensions or core).