Summary:
Remove the Facebook-specific dependencies from the Eden manifest: these
dependencies are now available directly in the Eden repository.
Reviewed By: chadaustin
Differential Revision: D18588009
fbshipit-source-id: 590c74e38e4e05939e6955839af3ebb959f9251b
Summary:
Now that the fb-mercurial sources are available in the Eden repository, update
our CMake build files to always build them. This moves the build logic from
the centralized `FBMercurialFeatures.cmake` file into `CMakeLists.txt` files
in the appropriate subdirectories.
Reviewed By: chadaustin
Differential Revision: D18588011
fbshipit-source-id: ded9decde5c2ec766aae0bb0f4f5b021d1044a98
Summary:
Remove the standalone fb-mercurial-rust target that was an internal-only
dependency for the Eden build. This build step is now done entirely in the
Eden build.
Reviewed By: fanzeyi
Differential Revision: D18623943
fbshipit-source-id: c62a1155ddd1c0a6b2270c472176ba25194c6145
Summary:
Update the CMake build to always build the Rust datapack libraries, even on
Windows. This allows us to completely eliminate the `EDEN_HAVE_RUST_DATAPACK`
checks.
Note that I did leave the `EDEN_HAVE_RUST_DATAPACK` macro in place, as we
still do not build the Rust datapack code on Mac when building with Buck.
Reviewed By: fanzeyi
Differential Revision: D18588008
fbshipit-source-id: 1a4c9ceec5372d0e6a7313d2eb87edabd1e60a96
Summary:
Update Eden's top-level CMakeLists.txt file to build the Rust datapack
libraries. Previously these were built by invoking CMake separately inside th
`eden/scm` subdirectory. Now that the code has been combined into a single
location we can use a single CMake invocation to drive the build of both these
components.
The old code did not build the Rust datapack code on Windows, and this diff
does not change that behavior. I'm not aware of any reason to skip building
this on Windows, so I plan to enable building this code on Windows in a
subsequent diff.
Reviewed By: pkaush
Differential Revision: D18588006
fbshipit-source-id: 20f4f0ea9fef8595a9dd35a21115952b2808c824
Summary:
D8997967 changed `hg rage` to pull from a path that uses the machine's unix user. But The write in the background backup for commit cloud used `util.shortuser(ui.username())`. This means that in On Demand, it would write to `$LOGDIR/samfu/$REPO$DATE` but `hg rage` would look in `$LOGDIR/svcscm/$REPO$DATE`. Changing this to the same `util.getuser()` should fix this.
Caveat: I didn't actually test this. I just know that my `hg rage` says "log directory does not exist: /tmp/svcscm" (P122851697)
Reviewed By: markbt
Differential Revision: D18654245
fbshipit-source-id: ccb78eba778ddedb23c7947a3eeb16e9f8fd2021
Summary:
This diff replaces eden's dependencies on failure::Error with anyhow::Error.
Failure's error type requires all errors to have an implementation of failure's own failure::Fail trait in order for cause chains and backtraces to work. The necessary methods for this functionality have made their way into the standard library error trait, so modern error libraries build directly on std::error::Error rather than something like failure::Fail. Once we are no longer tied to failure 0.1's Fail trait, different parts of the codebase will be free to use any std::error::Error-based libraries they like while still working nicely together.
Reviewed By: xavierd
Differential Revision: D18576093
fbshipit-source-id: e2d862b659450f2969520d9b74877913fabb2e5d
Summary: Even if blobs have different hashes, they could have the same contents. For example, if between the two revisions being compared, if a file was changed and then later reverted. In that case, the contents would be the same but the blobs would have different hashes. Currently, `getScmStatusBetweenRevisions()` would report false positives in this case. This is also needed so we do not report false positives in `getScmStatus()` when hit this code path
Reviewed By: simpkins
Differential Revision: D18647086
fbshipit-source-id: 66e12648a24fd7e5612eee5e599a5b81c7c5f2d1
Summary:
- Added sai to getdeps
- added SAI to FBOSS as a dependency
- Included path of SAI headers to FBOSS's cmake file.
Reviewed By: shri-khare
Differential Revision: D18629127
fbshipit-source-id: 119a6b7f2b64bd84414d9e16a903bc8df48a35e7
Summary:
Annotate some import statements so autodeps won't complain about them, since
it doesn't know where they come from in the build.
Note that `hg_import_helper.py` isn't used any more by the current code, and
should ideally be killed off soon. However, just annotating these import
statements for now in the short term is the easiest way to make autodeps
happy.
Reviewed By: fanzeyi
Differential Revision: D18652104
fbshipit-source-id: 310bc5c63447e3bf4dfd081d7b3930eed4d0498b
Summary:
The `eden/fs/sqlite` code uses `eden/fs/utils/PathFuncs.h`, so add a proper
dependency on the `eden_utils` library.
Reviewed By: pkaush
Differential Revision: D18652105
fbshipit-source-id: b8dffd93971ab5efb71d7bc3c2dcb62249b3915b
Summary:
Record the durations of each phase of checkout so it can be logged to
scribe in a future diff.
Reviewed By: simpkins
Differential Revision: D18632258
fbshipit-source-id: e447976af22cf25cffd640e79b95da2989b07448
Summary: Adding an experimental option to EdenFS so we can disable blob caching if we need.
Reviewed By: chadaustin
Differential Revision: D18441665
fbshipit-source-id: 56751c0199d6658bfbf7ec3865f746a7279324ab
Summary:
We're about to return more information from checkout, so
introduce a CheckoutResult struct.
Reviewed By: genevievehelsel
Differential Revision: D18630820
fbshipit-source-id: 78b68ef3551ca8c9e9968631de554084c333b4b9
Summary:
[svcscm@hg022.prn2 /data/scm/www]$ hg log -r master
transaction abort!
rollback completed
abort: File name too long: '/data/scm/www-merge-generaldelta/.hg/store/data/flib/intern/____generated____/_graph_q_l_meerkat_step/flib/intern/entschema/generated/entity/bizapps/dcp__insight/application__config/_ent_d_c_p_insights_application_config_action.php/._g_q_l_g___intern_____set_permission_manager_domain_dcp_insights_application_config_data_____ent_d_c_p_insights_application_config_action____gen_perform_graph_q_l_set_permission_manager_domain_dcp_insights_application_config_mutation_coercer.php.i-U0sMqX~'
On hg022.prn2 www currently failes under certain circumstances because filenames longer than
255 characters are currently created. I traced this back to mktempcopy and made sure that
we truncate filenames when they are created too long.
Reviewed By: quark-zju
Differential Revision: D18639433
fbshipit-source-id: 20e4b086ca5c775b6054b642ecedfb05efd00fb9
Summary:
Add Event::Tags so we can tag commands with one or more names.
Add index for the tags so we can search them more efficiently.
As we're here, update hgcommands to read EDENSCM_BLACKBOX_TAGS and write
Event::Tags automatically just after Event::Start.
Differential Revision: D18610733
fbshipit-source-id: c69b6e3d34b317e92a1c4d76f29e832b6b01c4fa
Summary:
Previously, the blackbox index was hardcoded on the timestamp, and is not
Event-aware. This diff changes the index to parse Event and build up indexes
for various common events (ex. Start, Finish).
For now, the index just includes start, finish timestamps and duration.
Differential Revision: D18610734
fbshipit-source-id: bf572f3138c8c18d3aab06eadcc83dd5b0b9cf02
Summary:
Previously, `match_pattern` only returns a `bool`. This diff implements an
enhanced version `capture_pattern` to be able to capture matched objects.
This will be used to match query patterns and apply optimization.
Differential Revision: D18610732
fbshipit-source-id: 39e989e7633b834c04997bf8665494556f3b62b2
Summary: Migrate callsites to use the new pattern matching filtering APIs.
Differential Revision: D18610738
fbshipit-source-id: 242182f4e6a58bbff5dddbb177287921c85519bc
Summary:
See the previous diff. As part of migrating away from IndexFilter. There needs
to be a way to filter commands by absolute clock time using pattern matching
against Events. To achieve that, add the timestamp field to Start and Finish
events.
Differential Revision: D18610735
fbshipit-source-id: 9e1898a87bc93e47d0f0c77342428b5c42ef6f24
Summary:
The existing query API `filter` has 2 issues:
- It does querying and filtering together, making it hard to express certain
queries. For example: "for commands taking more than 10 seconds, get all
network requests used by those commands".
- The `IndexFilter` abstraction overlaps with `pattern`s. `IndexFilter` is
built upon the `Entry` structure, and does not work for `Event`s. In the
future, we want a `Event::Tags` to tag commands, and build indexes on it.
That's not very compatible with `IndexFilter`.
To address the issues, I'm going to:
- Decouple querying and filtering by splitting it into 2 methods glued by
`SessionId`s.
- Deprecate `IndexFilter`. Make `patterns` the only way to filter entries.
- Add dedicated indexes for certain events.
This diff adds the related APIs towards that direction.
Differential Revision: D18610737
fbshipit-source-id: c6ab92fd6fa7bb2ee7e14f567d72ac98b287c143
Summary:
The type `Entry<T>` provides flexibility on serializing different types.
Practically, only the `Event` type is used. Let's remove `T` so `blackbox` can
assume it's the `Event` type.
Differential Revision: D18610736
fbshipit-source-id: 102a5f61c758fa83cd1994c7f813576dcf5b59d5
Summary:
Similar to D2756217. But skip sync directly if the repo has been synced
recently.
This will help reducing CPU load on the DB tier.
Reviewed By: ikostia
Differential Revision: D18621013
fbshipit-source-id: 83370669ea61eb693d06495aaa13664648b97aca
Summary:
Add tracing spans so we can get some insights about statistics from the pure
Rust land.
Reviewed By: xavierd
Differential Revision: D18625646
fbshipit-source-id: 15951fe2f8270a70f647a0f4e09819bbc33919c5
Summary: make `future_getScmStatusV2` into `async_tm_getScmStatusV2` so we can short circut the status call if the request is no longer active.
Reviewed By: simpkins
Differential Revision: D18378212
fbshipit-source-id: b2bca014a37d99f7a92478c3e23bde0b874dd13c
Summary: This reads `enforceParents` from a config instead of always assuming true for `getScmStatusV2()`. This will allow a easy kill switch in case throwing errors from this thrift call causes issues with something that calls hg status
Reviewed By: simpkins
Differential Revision: D18258164
fbshipit-source-id: 1ae421a941c01a678d25d5453c771262b03558d0
Summary:
It seems an emtpy GraphQL query always times out. So let's avoid such queries
from the client side.
Reviewed By: xavierd
Differential Revision: D18626286
fbshipit-source-id: 70f0061f7f7ad8c7d8be4e15fc419039dc07d61e
Summary:
Include tools/lfs in the shipit path map for now, since it is needed to
download vendored Rust crates on internal builds. Also correctly indicate
that the fb-mercurial* dependencies also apply only to internal builds.
Reviewed By: chadaustin
Differential Revision: D18621421
fbshipit-source-id: 74f00bf318ff9aefdca8696a61a8f33587749e66
Summary:
Automatically detect the `--facebook-internal` flag based on the current
repository project name.
Reviewed By: wez
Differential Revision: D18621358
fbshipit-source-id: f2b3018169b151811eec455863a8bfc17667d4d8
Summary:
Update `RustStaticLibrary.cmake` to let CMake know that running `cargo` will
produce the Rust static library output. Without this CMake does not know how
to correctly wire up dependencies for libraries. Previously the code used the
`ALL` target to ensure that the Rust static library was built, but this did
not ensure that it was built before executables that require it.
Reviewed By: pkaush
Differential Revision: D18588010
fbshipit-source-id: 1a1880993bdfa3fcb876a0f6507e5cddfea9b738
Summary:
Update the `RustStaticLibrary.cmake` code to explicitly find and invoke the
Python interpreter when running the Python script to download vendored crates.
This is required to work on Windows.
Reviewed By: pkaush
Differential Revision: D18588012
fbshipit-source-id: 4c2dfbc786adf0a7aa6b43483060800627a8aca1
Summary:
Update `RustStaticLibrary.cmake` to automatically decide to try and download
vendored Rust crates or not, based on the presence of the script it uses to
download them.
Reviewed By: fanzeyi
Differential Revision: D18588007
fbshipit-source-id: 995365f0cc2368897ddf94b5617bdb9bc0682edc
Summary:
This updates the `RustStaticLibrary.cmake` file to download vendored
`crates.io` crates only once, rather than once per library. It also now
downloads them into the build directory, rather than into the source
directory.
This can probaly still be improved more in the future: the vendored crates
should probably just be treated as a top-level getdeps manifest entry.
Currently if multiple projects build rust static libraries we will still end
up downloading the vendored crates once per project.
Reviewed By: fanzeyi
Differential Revision: D18548094
fbshipit-source-id: 83060e679455267bdf197e5ff2d33b1b7f0204fc
Summary:
Many people hit TApplicationException recently. Most of them can be fixed
by `eden doctor`. Instead of crashing and showing an unhelpful backtrace, show
a shorter error message and prompt the user to run `eden doctor`.
Reviewed By: fanzeyi
Differential Revision: D18609445
fbshipit-source-id: 5492fa92008cb33e1122b72b48d0858db0d5f994