Commit Graph

78247 Commits

Author SHA1 Message Date
Michael Cuevas
1d779fa32b add backing repo location to eden info
Summary: It's worth making backing repos easier to find. This should help us remove hardcoded paths from our wikis/reclone instructions. This should also make it easier for users who use custom backing repos to find their backing repo location if they ever forget.

Reviewed By: chadaustin

Differential Revision: D40455968

fbshipit-source-id: 107b7325ff64015b814c4c30680f982a3518de56
2022-10-20 14:33:19 -07:00
Stiopa Koltsov
a4f9d57f54 bump version to 0.1.2
Summary: This is the latest version number [on crates](https://crates.io/crates/fbinit_macros/0.1.2).

Reviewed By: jsgf

Differential Revision: D40536148

fbshipit-source-id: 86fc58f09cdb716e2aed8571a8ddee65f5dfc844
2022-10-20 12:08:11 -07:00
Durham Goode
e0b16f04e3 tests: fix test-doctests.py, test-manifest.py, test-match.py
Summary:
The case sensitive change broke a number of other tests. This wasn't
caught earlier because it only happens on OSX.

Reviewed By: muirdm

Differential Revision: D40557023

fbshipit-source-id: aae6564f355b6370a37ee0e3eaf098115c079d87
2022-10-20 11:58:48 -07:00
Jun Wu
2e791b657b chgserver: remove logic about appnope
Summary:
It turns out that initializing objc types before (disabling appnap) and after
(via libcurl [2]) fork() would abort the program like:

  objc[<pid>]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.

It seems objc really dislikes fork. Disabling the objc logic before fork seems
to be the only way to unblock the issue.

Other approaches considered:
- Avoid `fork()`: not really fesiable for performance (startup, Python GIL) reasons.
- Ensure chgserver does not create threads (see https://bugs.python.org/issue33725).
  Not possible since appnope implicitly creates a (short-lived?) thread.
- Disable AppNap without using objc: does not seem trivial.
- Set `OBJC_DISABLE_INITIALIZE_FORK_SAFETY` to `YES`. Abort with a different
  message [1].

[1]:

```
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
```

[2]:

```
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x00007ff81395f067 libobjc.A.dylib`objc_initializeAfterForkError
    frame #1: 0x00007ff81395f187 libobjc.A.dylib`performForkChildInitialize(objc_class*, objc_class*) + 274
    frame #2: 0x00007ff81394a479 libobjc.A.dylib`initializeNonMetaClass + 617
    frame #3: 0x00007ff813949f12 libobjc.A.dylib`initializeAndMaybeRelock(objc_class*, objc_object*, mutex_tt<false>&, bool) + 232
    frame #4: 0x00007ff813949c93 libobjc.A.dylib`lookUpImpOrForward + 1087
    frame #5: 0x00007ff81394e02f libobjc.A.dylib`object_getMethodImplementation + 153
    frame #6: 0x00007ff813b12934 CoreFoundation`_NSIsNSString + 55
    frame #7: 0x00007ff813b128dc CoreFoundation`-[NSTaggedPointerString isEqual:] + 36
    frame #8: 0x00007ff813b05609 CoreFoundation`CFEqual + 533
    frame #9: 0x00007ff813b0b2a3 CoreFoundation`_CFBundleCopyBundleURLForExecutableURL + 220
    frame #10: 0x00007ff813b069cb CoreFoundation`CFBundleGetMainBundle + 116
    frame #11: 0x00007ff813b28ade CoreFoundation`_CFPrefsGetCacheStringForBundleID + 71
    frame #12: 0x00007ff813b2f52f CoreFoundation`-[CFPrefsPlistSource setDomainIdentifier:] + 92
    frame #13: 0x00007ff813b2f46c CoreFoundation`-[CFPrefsPlistSource initWithDomain:user:byHost:containerPath:containingPreferences:] + 99
    frame #14: 0x00007ff813b2f351 CoreFoundation`__85-[_CFXPreferences(PlistSourceAdditions) withManagedSourceForIdentifier:user:perform:]_block_invoke + 156
    frame #15: 0x00007ff813c622a7 CoreFoundation`-[_CFXPreferences withSources:] + 60
    frame #16: 0x00007ff813cac80f CoreFoundation`-[_CFXPreferences withManagedSourceForIdentifier:user:perform:] + 240
    frame #17: 0x00007ff813b2a1ab CoreFoundation`-[CFPrefsSearchListSource addManagedSourceForIdentifier:user:] + 98
    frame #18: 0x00007ff813c83a18 CoreFoundation`__108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.160 + 287
    frame #19: 0x00007ff813c836e8 CoreFoundation`-[_CFXPreferences withSearchLists:] + 60
    frame #20: 0x00007ff813b29f50 CoreFoundation`__108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 279
    frame #21: 0x00007ff813c83879 CoreFoundation`-[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 374
    frame #22: 0x00007ff813b29a42 CoreFoundation`-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 137
    frame #23: 0x00007ff813b29978 CoreFoundation`_CFPreferencesCopyAppValueWithContainerAndConfiguration + 101
    frame #24: 0x00007ff8145c672b SystemConfiguration`SCDynamicStoreCopyProxiesWithOptions + 155
    frame #25: 0x000000010272a315 hg`Curl_resolv(data=0x00007f8dea888a00, hostname="api.github.com", port=443, allowDOH=true, entry=0x000000030a12be10) at hostip.c:675:30 [opt]
    frame #26: 0x000000010272a68c hg`Curl_resolv_timeout(data=<unavailable>, hostname=<unavailable>, port=<unavailable>, entry=<unavailable>, timeoutms=<unavailable>) at hostip.c:908:8 [opt] [artificial]
    frame #27: 0x0000000102753e1e hg`create_conn at url.c:3440:12 [opt]
    frame #28: 0x0000000102753cfe hg`create_conn(data=0x00007f8dea888a00, in_connect=0x000000030a12bed8, async=0x000000030a12bf8f) at url.c:4077:12 [opt]
    frame #29: 0x000000010275026b hg`Curl_connect(data=0x00007f8dea888a00, asyncp=0x000000030a12bf8f, protocol_done=0x000000030a12bfb2) at url.c:4156:12 [opt]
    frame #30: 0x000000010273dbd1 hg`multi_runsingle(multi=<unavailable>, nowp=0x000000030a12c020, data=0x00007f8dea888a00) at multi.c:1858:16 [opt]
    frame #31: 0x000000010273d6ae hg`curl_multi_perform(multi=0x00007f8deb0699c0, running_handles=0x000000030a12c074) at multi.c:2636:14 [opt]
    frame #32: 0x0000000102726ada hg`curl_easy_perform at easy.c:599:15 [opt]
    frame #33: 0x0000000102726aa8 hg`curl_easy_perform [inlined] easy_perform(data=0x00007f8dea888a00, events=false) at easy.c:689:42 [opt]
    frame #34: 0x00000001027269a4 hg`curl_easy_perform(data=0x00007f8dea888a00) at easy.c:708:10 [opt]
    frame #35: 0x00000001025e1cf6 hg`http_client::request::Request::send::h13a4e600f6bc5508 [inlined] curl::easy::handler::Easy2$LT$H$GT$::perform::h2ba0ae1da25a8852(self=<unavailable>) at handler.rs:3163:37 [opt]
```

Reviewed By: bolinfest

Differential Revision: D40538471

fbshipit-source-id: cd8611c8082fbe2d610efb78cb84defdb16d7980
2022-10-20 11:28:38 -07:00
Katie Mancini
6823a627b6 teach EdenFS to auto migrate folks on Ventura
Reviewed By: xavierd

Differential Revision: D40243654

fbshipit-source-id: d5c19a8e1be2db1075f1e21c96816a5902dc9ee7
2022-10-20 11:24:07 -07:00
Durham Goode
479969e588 watchman: don't edit the dirstate every Rust status
Summary:
The Rust watchman code was flushing the dirstate after every status.
This is excessive and causes things like VS Code to trigger, which then run hg
status, and forms an infinite loop.

To fix it, we A) only flush if the treestate is dirty, and B) don't mark things
as needs_check which are already needs_check.

Reviewed By: muirdm

Differential Revision: D40532717

fbshipit-source-id: 95b07c1b8feb86af4c7556394992d255bfb553ff
2022-10-20 11:20:15 -07:00
Durham Goode
9dca27a975 watchman: add dirty-bit to TreeStateRoot
Summary:
In a later diff we'll want to detect if the TreeState has pending
changes, so we can avoid flushing if it doesn't. We need a dirty-bit on the root
object so we can tell if it's been modified.

Reviewed By: muirdm

Differential Revision: D40532718

fbshipit-source-id: e0bf980bd045093db551928008a3156f68fca3ac
2022-10-20 11:20:15 -07:00
Genevieve (Genna) Helsel
0e122922c0 split removeOverlayData into File/Dir methods
Summary: To facilitate the split of the `IOverlay` class, split the `removeOverlayData` function into `removeOverlayFile` and `removeOverlayDir`

Reviewed By: chadaustin

Differential Revision: D40529005

fbshipit-source-id: 32a7a397aa3b97a8949f337b5afecdca1b500d67
2022-10-20 11:14:16 -07:00
Genevieve (Genna) Helsel
6a1c55b596 split hasOverlayData into File/Dir methods
Summary: To facilitate the split of the `IOverlay` class, split the `hasOverlayData` function into `hasOverlayFile` and `hasOverlayDir`

Reviewed By: chadaustin

Differential Revision: D40526835

fbshipit-source-id: 5b075c3103e5ae3d1f1df32edb1384621bac35bd
2022-10-20 11:14:16 -07:00
Juan Luis Belmonte Mendez
36fca52ef4 migrate backfill_mapping to new CLI arguments framework
Summary:
backfill_mapping command in Mononoke was using an old version of clap.

In this Diff I am switching the command to use clap3. Options for this command are now defined using `derive`.

By re-using **RepoArgs** and **EnvironmentArgs** from `mononoke_app` we have introduced slight changes in the parameters the most important being `repo-id`,  previous option was `--repo_id` and current is `--repo-id`.

New `--help` output can be found here: https://www.internalfb.com/phabricator/paste/view/P539779098

Old  `--help` output can be found here: https://www.internalfb.com/phabricator/paste/view/P539774336

Reviewed By: mitrandir77

Differential Revision: D40440025

fbshipit-source-id: c0070bd7cc78eca2e42b2fb84327a499cfe9131e
2022-10-20 09:25:40 -07:00
Durham Goode
39ea4d0bd5 git: fix crash when encountering -1 identifier
Summary:
The git objects assume everything coming in is a hash. The context.py
code however occasionally produced -1 (i.e. the nullrev). This caused crashes in
some circumstances. This diff fixes it by removing nullrev from context.py

Reviewed By: quark-zju

Differential Revision: D40517513

fbshipit-source-id: bcabca05be9ba43ab1f095903ca86fa8c938927f
2022-10-20 09:06:10 -07:00
Muir Manders
e685218614 remove "scubalog" config settings
Summary: Doesn't seem to be used - didn't investigate.

Reviewed By: quark-zju

Differential Revision: D40474869

fbshipit-source-id: 9a7f7baa2c8f71ac179ee09dde0b74729c149d9f
2022-10-20 07:53:57 -07:00
Muir Manders
5b5e8bcee1 excise "fastmanifest" vestiges
Summary:
This extension is on the permanent naughty list, so let's clean up it's traces.

I came across this when I was looking for stuff to remove from the opensource static config.

Reviewed By: quark-zju

Differential Revision: D40474870

fbshipit-source-id: 9c8a618e3c6ab3ae17dc37ad1aa9700be4800150
2022-10-20 07:53:57 -07:00
Open Source Bot
befd16b01e Updating submodules
Summary:
GitHub commits:

f9fb722812
2a81e006f7
78f2f431ed
205b6a6569
c3a4ff237c
9c6f03c365
81e5213947
2a65b80d9c
01444cf37a

Reviewed By: apiri

fbshipit-source-id: cafc7ae89975bf9f5ed338aafbbfd600e9f36011
2022-10-20 02:25:32 -07:00
Open Source Bot
687060d90d Updating submodules
Summary:
GitHub commits:

f63b79235b
2279e5beac
c4f0dd574f
36f2c16ca8

Reviewed By: apiri

fbshipit-source-id: e7ea0548b3ca24fdcf3b40026ff5f2fd7dae7a6e
2022-10-20 00:16:01 -07:00
Chad Austin
4449e5dab7 upgrade rocksdb to 7.7.3 and remove the ROCKSDB_SKIP_THIRDPARTY patch
Summary:
We no longer need a local patch to RocksDB now that it has been merged
into upstream rocksdb.

#forceTDhashing

Reviewed By: xavierd

Differential Revision: D40522069

fbshipit-source-id: 68ffa62b59a71343ea2555960046b6cac93f65c8
2022-10-19 23:57:40 -07:00
Open Source Bot
9d9cc7ddc3 Updating submodules
Summary:
GitHub commits:

8231d61017
1169c2f3d3
26544a1797
3e75cf8775

Reviewed By: apiri

fbshipit-source-id: 0ea53bac7584516bf95b1e2d270479c577f59835
2022-10-19 23:02:09 -07:00
David Tolnay
b8a7dd13d6 Update to syn 1.0.102
Summary: An upcoming `bindgen` upgrade requires a newer version of syn than what is currently in fbsource, so get this out of the way since it is a relatively larger commit.

Reviewed By: zertosh

Differential Revision: D40539092

fbshipit-source-id: de891f3662057ea6c136f3f1eb216be4618db62e
2022-10-19 22:49:24 -07:00
Open Source Bot
fc19fb200f Updating submodules
Summary:
GitHub commits:

4b7ca448a2
7af9212d87
349f6e76ec
161f8d6659
0c9cd7c900
20187a772b
bb8e8e8120
b9106798e7

Reviewed By: apiri

fbshipit-source-id: 5644b14ff037d5234bc652609ba94b168470dff9
2022-10-19 21:21:30 -07:00
Open Source Bot
c55d8165a4 Updating submodules
Summary:
GitHub commits:

974823bd3e
075cd68724
9d6d7088ef
6c7bd18d2b
7d6ac52a82
83ceac3498

Reviewed By: apiri

fbshipit-source-id: 71f94928adbc5e845e201d57f5d1008d6dbd44a8
2022-10-19 18:48:47 -07:00
Muir Manders
54613caa5a config: fix mistake from previous diff
Summary: Restore the env var check that avoids loading the real user config when HGRCPATH is set. I accidentally removed this in D40449283 (1cdbde8b5b) somehow.

Reviewed By: DurhamG, zzl0

Differential Revision: D40514299

fbshipit-source-id: a6628f9624cafaf71318eb9199511a989ff7ec28
2022-10-19 18:41:36 -07:00
Chad Austin
b3d807c4df don't stat the existing directory before mounting
Summary:
I can't easily reproduce the failure case, but D39900481 (29d29e0f14) caused early
stats() during doctor and mount that don't handle the case that a
broken EdenFS mount underlies where want to place a new one.

We don't care about sniffing the .hg directory, so lazily search for
it.

Reviewed By: muirdm

Differential Revision: D40530670

fbshipit-source-id: 0b10eb0778575f1e69a998d3fcb84866dd383229
2022-10-19 17:59:03 -07:00
Michael Cuevas
79b143db02 add lazy flag to umount suggestion
Summary: if the mount is busy when we run `sudo umount`, users will need to pass the lazy flag as well. Let's suggest it by default since it doesn't hurt

Reviewed By: genevievehelsel

Differential Revision: D40477030

fbshipit-source-id: 03539cd0418232c92942359435cfc5497355800f
2022-10-19 17:56:18 -07:00
Michael Cuevas
3a15a7b279 FakeEdenInstance: update default backing repo location
Summary: I'd like to get rid of the old backing repo location entirely (to simplify code and documentation). Let's use the "new" location in our test EdenInstance.

Reviewed By: chadaustin

Differential Revision: D40407306

fbshipit-source-id: 674914b54bde22e6175324e3950d64b3c262e365
2022-10-19 17:56:18 -07:00
Michael Cuevas
fe061ad127 kill all buck daemons for the current repo when removing redirections
Summary:
Users have noticed that commands like `eden redirect del` and `eden redirect fixup` are failing because buck is holding references to files underneath the failed-to-be-removed redirection.

This diff should prevent these failures by killing all buck daemons that could be holding references to files underneath the redirection.

Reviewed By: fanzeyi

Differential Revision: D40353668

fbshipit-source-id: d9ddfe93aec27298f7f4b047dfa62fff9ce0c09b
2022-10-19 17:56:18 -07:00
Michael Cuevas
8abb51578c add more buck utils to Rust CLI
Summary: The current way we find and kill running buck instances when running `redirect fixup` is incorrect. This diff adds the correct way to find/kill running buck instances for Meta specific projects.

Reviewed By: genevievehelsel

Differential Revision: D40353226

fbshipit-source-id: 3f043a7b3277c4305a9750cc622bb541bea89c63
2022-10-19 17:56:18 -07:00
Michael Cuevas
58fe57d459 stop using BUCKVERSION environment variable
Summary:
When Eden kills Buck programmatically (for redirect subcommands and eden rm), we set a number of environment variables to ensure Buck functions correctly. One of the environment variables we set is BUCKVERSION. We set this env var to "last" in order to avoid downloading new versions of Buck when we're simply trying to kill buck in the first place.

This environment variable has started causing issues for stale repos. A stale repo is any repository that's checked out to a commit that's sufficiently old (we currently don't know what age this is, but typically 4-5 day-old commits seems to trigger the issue).

We should stop using this environment variable until we figure out a workaround or a fix for Buck

Reviewed By: mshroyer

Differential Revision: D40517904

fbshipit-source-id: 419d09814dc315ec79410cafebbb50b172992fd9
2022-10-19 17:56:18 -07:00
David Tolnay
0be906fba0 Update to async-trait 0.1.58
Summary: This release makes async trait methods work better with rust-analyzer's "go to definition" and other IDE functionality.

Reviewed By: zertosh

Differential Revision: D40532047

fbshipit-source-id: 1871d1819ebe1aab0846b0135f051c45e6e8821b
2022-10-19 17:35:20 -07:00
Open Source Bot
e76975b776 Updating submodules
Summary:
GitHub commits:

46281172ff
56dc2459f4
2f6cc51160
103d700723
446a35c9b2
ec1073d14b
b79b9e717c
dbf9eee5a1

Reviewed By: apiri

fbshipit-source-id: 89a7f1d06f004a2fbd35c639963528def0aa13c3
2022-10-19 17:33:33 -07:00
Chad Austin
423886bfcf convert GlobMatcher from StringPiece to std::string_view
Summary:
We can use C++17 and operator""sv replaces the need for `literal` in
GlobMatcherTest.cpp.

Reviewed By: genevievehelsel

Differential Revision: D40108769

fbshipit-source-id: dcce96fd76cff212d93d175ee69e44f9b098ae8a
2022-10-19 16:46:34 -07:00
Open Source Bot
9ca897fce8 Updating submodules
Summary:
GitHub commits:

843455a5c8
12d4f868d5
47735c3e3f
cdf825635d
52568cfa00

Reviewed By: apiri

fbshipit-source-id: fe65f7dd4b8cc24a7f45117984ab771cc4a0b620
2022-10-19 14:41:41 -07:00
Open Source Bot
86f920ac75 Updating submodules
Summary:
GitHub commits:

a080d4656d
f89a7a6879

Reviewed By: apiri

fbshipit-source-id: e8c6c6b17c65543e385161bccd5a7b3d9629b22b
2022-10-19 13:38:45 -07:00
Mark Juggurnauth-Thomas
4f340b4d02 segmented_changelog: remove use of auto_impl
Summary: This was hiding a double-`Arc`.

Reviewed By: quark-zju

Differential Revision: D40357644

fbshipit-source-id: a2d63d3367a6a2aec4354e3fe9ccb867dbcac11f
2022-10-19 13:35:09 -07:00
Mark Juggurnauth-Thomas
2adc1b3450 bonsai_*_mapping: remove auto_impl
Summary:
These mappings are nearly always stored as `Arc<dyn Mapping>`, so we can remove
the generics and switch to always expecting dynamic dispatch.

The generic versions of `MemWrites` and `Caching` mappings can be converted to
always expecting `Arc<dyn Mapping>` as the inner mapping (in practice they
always got this except in some unit tests).

The cache implementations no longer need to be generic over the inner cache type.

We can remove `Clone` from the mappings themselves to ensure we only ever clone
the `Arc`.

Differential Revision: D40357649

fbshipit-source-id: 988f96d9b68e827a4afedfeb785c9731783cc6b6
2022-10-19 13:35:09 -07:00
Mark Juggurnauth-Thomas
ea08914663 permission_checker: remove auto_impl for AclProvider
Summary:
Everywhere an `AclProvider` implementation is used, it is as an `Arc<dyn
AclProvider>`.  This means making these methods generic in terms of `impl
AclProvider` is pointless, as we can more simply accept `&dyn AclProvider` and
avoid the compile-time overhead.

Reviewed By: yancouto

Differential Revision: D40357645

fbshipit-source-id: 004eaaf7b2f69c262074e706f38453a05e782fc6
2022-10-19 13:35:09 -07:00
Mark Juggurnauth-Thomas
1a3eb263f0 removed unused auto_impl uses and document others
Summary:
Remove `auto-impl` where it is not necessary.  Add documentation for cases
where it's known to be necessary for valid reasons.

Reviewed By: quark-zju

Differential Revision: D40357646

fbshipit-source-id: d37c8ae36c1034bbb3e646d278b54c84d183ed58
2022-10-19 13:35:09 -07:00
Chad Austin
0c6786f5e2 remove an unnecessary conditional include
Reviewed By: xavierd

Differential Revision: D40490560

fbshipit-source-id: d6ebd2b82d8d13803d7ebe7d97c546380adc8774
2022-10-19 12:18:34 -07:00
Open Source Bot
dd5325c821 Updating submodules
Summary:
GitHub commits:

fc6282bdc6
ddb63f29c7
99d93b87ff
829867eaac

Reviewed By: apiri

fbshipit-source-id: fa6117f13e7892e47a23b7ed58fad077841ad866
2022-10-19 12:14:25 -07:00
Open Source Bot
b5a2ab8a36 Updating submodules
Summary:
GitHub commits:

46eb710726
c7c094b28f

Reviewed By: apiri

fbshipit-source-id: 8688badc7d9a1b861d05ee9df5919cef9598e4ac
2022-10-19 11:06:29 -07:00
Egor Tkachenko
cfc6c36998 Move DerivedDataServiceRepo facet into repo_attributes
Summary: That facet was created prior any of repo_attributes, since now it's a default location for the facets, lets move it there

Reviewed By: yancouto

Differential Revision: D40382977

fbshipit-source-id: 856195c25472ca1d2080a605e091ecf754768b6c
2022-10-19 03:25:06 -07:00
Open Source Bot
70cab0f2fa Updating submodules
Summary:
GitHub commits:

a981fe2a2a
b54f0521ae
7555243bcf
a2c1684201
a5c6bf1fdb

Reviewed By: apiri

fbshipit-source-id: 162f7ddc72b42e3c2d11feadab5481a52aa1bcdb
2022-10-19 00:12:18 -07:00
Open Source Bot
d37b1958ac Updating submodules
Summary:
GitHub commits:

353b1abc66

Reviewed By: apiri

fbshipit-source-id: c0f79071abfd015df60ab0a6110bda6acdb9fba3
2022-10-18 22:18:25 -07:00
Zhaolong Zhu
e6af091771 match: add normalize_patterns util
Summary: add normalize_patterns util, which will be used by build_matcher function.

Reviewed By: quark-zju

Differential Revision: D39893862

fbshipit-source-id: 02b43298c0830ce828d7ba99003cab0dddaa5b7f
2022-10-18 21:36:41 -07:00
Muir Manders
0b045ac4f4 config: deprecate "--edit" flag in favor of "--user"
Summary:
Add new "--user" flag to replace "--edit". "--user" edits the user config, analagous to "--local" and "--system".

"--edit" is still allowed for backwards comapt.

Also, rename "--global" to "--system". "--global" is still allowed for backwards compat.

Reviewed By: bolinfest

Differential Revision: D40321860

fbshipit-source-id: 5858e7a75f40ce233a8f944c67f9c4ff04f139e5
2022-10-18 21:21:03 -07:00
Muir Manders
ed7c697b3c config: move config editting logic to separate function
Reviewed By: bolinfest

Differential Revision: D40484807

fbshipit-source-id: 2323c51349395e1ece7b66d0f80871a6d080510c
2022-10-18 21:21:03 -07:00
Open Source Bot
b457bbb557 Updating submodules
Summary:
GitHub commits:

a1f0a017ec
dc48a638d8
2b4c73f78c
bdbdd1e8f1
c370aac64b
5b30ca667c
d834ea6851
7401af7ee2
6cb9bc3865
6fca9f4dca
4158115c87
79c8f8ae17

Reviewed By: apiri

fbshipit-source-id: 5286d053704367672927767efbdfa93a0fe046bf
2022-10-18 21:09:46 -07:00
Rajiv Sharma
81087eb199 Introduce MononokeConfigs to support config hot-reloading
Summary: This diff adds the `MononokeConfigs` struct which would then be used later to implement the hot-reloading functionality with `MononokeApp`

Reviewed By: markbt

Differential Revision: D40244649

fbshipit-source-id: fde03a83d86780201a7171399495cd52a24af163
2022-10-18 20:40:42 -07:00
Rajiv Sharma
cba6fdb300 Leveraging MononokeApp and MononokeRepos in Megarepo API
Summary:
`Megarepo API` defines a state struct for holding configs, factories and few other constructed traits (e.g. mutable renames, blobstore, etc.). This results in wasted runtime costs (and also duplicated code) since the service constructs traits like `RepoBlobstore` or `MutableRenames` out of these configs and factories at runtime even though the same is already present under `MononokeRepos<Repo>`. Additionally it makes it impossible to update the configurations through hot-reloading if services keep their own copy of the configs.

Now that facets are in place, we can leverage the facetized `Repos` under `MononokeRepos` to prevent re-initialization of `MutableRenames` and `RepoBlobstore` on every request. Additionally, this also allows us to get rid of caching logic built on top of that. Note that `MegarepoMapping` and `AsyncMethodRequestQueue` structs are still constructed by `Megarepo API` since these are not facets and are Megarepo specific entities.

The references to direct configs and factories have been removed. These are now exposed via `MononokeApp` and thus implementing hot-reloading in `MononokeApp` will ensure that `Megarepo API` gets the latest configuration.

Reviewed By: markbt

Differential Revision: D40124095

fbshipit-source-id: a60ecdea1d5d3d81cb84ad5a77fb3e24600e7988
2022-10-18 20:40:42 -07:00
Open Source Bot
373627c8f7 Updating submodules
Summary:
GitHub commits:

2bcdbe9404
e62449e318
1aba693b4b
8c7e487e4b

Reviewed By: apiri

fbshipit-source-id: c2fe3f75a87679722679ffecac38d2d83bb98a0f
2022-10-18 19:55:49 -07:00
Durham Goode
fe7c45c730 status: enable more tests for rust status
Summary: We've fixed various issues, so more of these tests are now passing.

Reviewed By: quark-zju

Differential Revision: D40487597

fbshipit-source-id: 995e6fa2844bf6d394925f4322a225f7635436aa
2022-10-18 18:50:11 -07:00