Commit Graph

34 Commits

Author SHA1 Message Date
Puneet Kaushik
8899c53892 Update Windows EdenMount::getRootTree return a future
Summary: This is a followup on D18666585.

Reviewed By: chadaustin

Differential Revision: D19377523

fbshipit-source-id: f9ab4011d0978a6934de77d1837a37082603cf52
2020-01-13 16:15:09 -08:00
Chad Austin
b75b10bc33 kill ObjectStore::getBlobMetadata
Summary:
The last remaining user of ObjectStore::getBlobMetadata was a debug
Thrift call. Remove it and update the Thrift call to use getBlobSize
and getBlobSha1.

Reviewed By: pkaush

Differential Revision: D18663376

fbshipit-source-id: 86baefc9004a07aac4ddf5849870431be04c75f2
2019-12-20 16:14:18 -08:00
Puneet Kaushik
4c720d12c1 hg status tests for Eden Windows
Summary: This diff contains the tests for hg status. This is not comprehensive list of tests but the tests that we have working at this time. More tests will be added as we test and fix issues.

Reviewed By: simpkins

Differential Revision: D18454851

fbshipit-source-id: 80e3ff4d24873016dc420f202fbfe53fcffc24f2
2019-12-10 14:07:26 -08:00
Puneet Kaushik
8b0feed6fd Move EdenDispatcher under PrjfsChannel
Summary: The current implementation of EdenDispatcher is projectedfs specific and was linking against its dll. This was adding the need to add Prjfs dll for running our tests. Moving it to prjfs channel should fix that.

Reviewed By: simpkins

Differential Revision: D18462171

fbshipit-source-id: ff7bfcdd14d19552d49b61ff03cdd770badfcd68
2019-12-10 14:07:26 -08:00
Puneet Kaushik
f54831e526 Teach WinStore to work with std::wstring_view to avoid unnecessary copy
Summary: WinStore interface was taking wstring for path and we were converting wchar pointers to wstring which were later converted to RelativePath. In this diff we pass the path as is and save one copy per operation.

Reviewed By: simpkins

Differential Revision: D18444773

fbshipit-source-id: fa6a3efb6a7e91cf9b0dca919e80870e1bcf0804
2019-12-10 14:07:25 -08:00
Puneet Kaushik
abfdda5447 Create TestFsChannel class
Summary: Moved the current FsChannel implementation in to PrjfsChannel and converted the FsChannel.h into an abstract class. Created a TestFsChannel class for testing.

Reviewed By: simpkins

Differential Revision: D18440401

fbshipit-source-id: 30d6742cd18b4b76b664e3af7ed1a528cf876046
2019-12-10 14:07:25 -08:00
Puneet Kaushik
e19f84aa65 Add resetParents to enable hg commit
Summary:
A successful run of hg commit ends in call to resetParents() to reset the current parent commit.

We also need resetParent to run the Status tests.

Reviewed By: genevievehelsel

Differential Revision: D18439954

fbshipit-source-id: 44f7a009e050bd5e2130d8c4fc3a85a8ec3bfad1
2019-12-10 14:07:24 -08:00
Puneet Kaushik
86f5c839d1 Add EdenMount diff to generate the ScmStatus
Summary: This implements diff() inside EdenMount which uses GenerateStatus to compute the ScmStatus.

Reviewed By: simpkins

Differential Revision: D18195574

fbshipit-source-id: 16cfbda35796d1cfd4e13e6566b7ac222163aea4
2019-12-10 14:07:24 -08:00
Puneet Kaushik
7e2de5609a Add GenerateStatus to compute the status change
Summary:
GenerateStatus will parse the CurrentState and compute the status. The algorithm here is little different than of Eden with FUSE, Eden with Prjfs will loop over the CurrentState and only compare the entries present in it. CurrentState has the list of all the entries modified and a complete status could be generated from it.

This doesn't solve all the scenarios. I have few unit tests running at the top of this stack and those cases are working. I need to test the other cases and make them work. One case that I already know doesn't work is when a user resets the parent and doesn't make any change. I will work on fixing the other cases and put up diffs for that.

Reviewed By: simpkins

Differential Revision: D18195573

fbshipit-source-id: 3650f26387f1a5f8d467fd81148c266fa1307a3c
2019-12-10 14:07:24 -08:00
Puneet Kaushik
a88d4eff1f Add template function to convert different string input types
Summary: Create a template functions to convert strings with a wide variety of input types like folly::StringPiece, std::string, folly::fbstring and std::string_view to wide char string.

Reviewed By: wez

Differential Revision: D18071832

fbshipit-source-id: 147af97dff929766db83c9477117ec82da42b03e
2019-11-18 11:31:17 -08:00
Puneet Kaushik
b1523f0862 rename tests to make testpilot happy
Summary:
Testpilot is crashing to parse the JSON with the test names. I didn't debug it any further but looked like didn't like the names and renaming them worked.

    Traceback (most recent call last):
    File "testinfra/testpilot/testpilot.py", line 616, in pre_main
    File "testinfra/testpilot/testpilot.py", line 111, in main
    File "testinfra/testpilot/testpilot.py", line 262, in main_impl
    File "testinfra/testpilot/testpilot.py", line 259, in main_impl
    File "testinfra/testpilot/integration/fbcode/finder.py", line 478, in get_tests
    KeyError: 'eden-StateDBNodeTest.fetchDirectoryEntries-getdeps-windows-none-6 - main'

Reviewed By: wez

Differential Revision: D18208976

fbshipit-source-id: 1785aa4b1c42041578350b9c2a7e928059eeb648
2019-10-30 10:50:02 -07:00
Puneet Kaushik
bc35e81374 Integrate CurrentState with the notifications.
Summary: This diff will create an instance of CurrentState in EdenMount and integrate it with the Prjfs notifications.

Reviewed By: chadaustin

Differential Revision: D18068335

fbshipit-source-id: 5c78949c8b0ad316d2b014e808297f29092ae703
2019-10-24 16:26:55 -07:00
Puneet Kaushik
a0e5d97ab7 Add Notifications support to Eden Windows
Summary: This diff adds the notifications callbacks from Prjfs. These will be used in the later diffs in the stack.

Reviewed By: chadaustin

Differential Revision: D18068035

fbshipit-source-id: a8e679ef32ae39251e6c1e926feb9cd1b71258e0
2019-10-24 16:26:54 -07:00
Puneet Kaushik
991965ecae Update RepoConfig to store Mount id in .eden/config
Summary: This diff creates a Guid as a unique mount id. This mount id will be used to uniquely identify our repo in the Regdb.

Reviewed By: chadaustin

Differential Revision: D18055798

fbshipit-source-id: 01099d7fdf15c325498e83c8b63637dd1d85d028
2019-10-24 16:26:54 -07:00
Puneet Kaushik
3382fa538d Add CurrentState to record the FS changes
Summary: The is the top level interface which will receive all the FS changes and will store them in the RegDB for later use.

Reviewed By: chadaustin

Differential Revision: D17998282

fbshipit-source-id: 7570edcfe0f6bf9164bfa0688665fb7253a21bc6
2019-10-24 16:26:54 -07:00
Puneet Kaushik
fbd422253d Add StateDbNode to fetch and set the directory entries from the regdb
Reviewed By: chadaustin

Differential Revision: D17986746

fbshipit-source-id: 906e526d3ac8637270fe2b2eaccb45f2d535ebd4
2019-10-24 16:26:54 -07:00
Puneet Kaushik
91d12786f9 Add StateDirectoryEntry as an in memory representation of a FS cache dirEntry
Summary: StateDirectoryEntry will contain the current state of a file or folder in the prjfs cache and will be totally in memory. In the next few diffs we will bring in the code that will load and store these in the db.

Reviewed By: chadaustin

Differential Revision: D17985967

fbshipit-source-id: 260dca369a3acce10385b04fdb5ff111cfc998be
2019-10-24 16:26:53 -07:00
Puneet Kaushik
db849cfca1 Remove searchExpression DCHECK
Summary: Removing this DCHECK for the searchExpression because we can recieve requests for empty string and is a valid request.

Reviewed By: chadaustin

Differential Revision: D17985604

fbshipit-source-id: 40ffbe153a7ae44e85ed7d7ad7b2e79affb1d529
2019-10-18 12:39:09 -07:00
Chad Austin
65c93484e2 rename tracing to telemetry
Summary: Tracing was not an accurate name for what this directory had become. So rename it to telemetry.

Reviewed By: wez

Differential Revision: D17923303

fbshipit-source-id: fca07e8447d9b9b3ea5d860809a2d377e3c4f9f2
2019-10-15 13:39:41 -07:00
Puneet Kaushik
52ca5798bb Add a GUID class
Reviewed By: chadaustin

Differential Revision: D17738260

fbshipit-source-id: ce0a3d5387e278d84a80747ab540bb7898c0de67
2019-10-14 12:20:41 -07:00
Andres Suarez
fbdb46f5cb Tidy up license headers
Reviewed By: chadaustin

Differential Revision: D17872966

fbshipit-source-id: cd60a364a2146f0dadbeca693b1d4a5d7c97ff63
2019-10-11 05:28:23 -07:00
Puneet Kaushik
97834a146d Add requesting process name in the trace
Summary: This will help us identify the calling process for the FS request. This was helpful while testing watchman crawl in Eden repo.

Reviewed By: chadaustin

Differential Revision: D17719028

fbshipit-source-id: 0d646d7949a6e26268b71287b26d63473a9a87f8
2019-10-04 11:08:44 -07:00
Puneet Kaushik
3af9ee1321 Converting const ptr to EdenMount to non-const reference
Summary:
Converting the const ptr in EdenDispatcher because we need to call non-const function (like update Journal). Also storing the reference in EdenDispatcher and WinStore instead of ptr.

This diff should not change the behavior of the Eden.

Reviewed By: chadaustin

Differential Revision: D17719606

fbshipit-source-id: 6c371c38045c760837130bb607163c2bc469b17a
2019-10-02 14:48:56 -07:00
Genevieve Helsel
6a036808cc use callbacks in source control tree comparisons
Summary: Use callback to save ScmStatus instead of storing status inside a `TreeDiffer` object. Involes a bit of restructuring of some code to avoid circular dependencies and library creation. Mostly renames and file moves, some funtion moves as well.

Reviewed By: simpkins

Differential Revision: D17400466

fbshipit-source-id: fcd194a4c20204dffd3d11cd4a083564dc0ea938
2019-09-23 15:22:30 -07:00
Adam Simpkins
e7af87edad fix library dependencies on Windows
Summary:
The Windows library definitions were missing many dependencies.  They happened
to link for now, but this was fragile and it was easy to cause this to break
by making changes to the dependency structure of our other libraries.

Additionally the files in eden/fs/win/store and eden/fs/win/mount also have
circular dependencies between each other that cannot easily be resolved in one
direction or the other.  Therefore this combines the two `eden_win_mount` and
`eden_win_store` libraries into a single `eden_win` library to eliminate this
circular library dependency.

Reviewed By: wez

Differential Revision: D17309104

fbshipit-source-id: c95d0cfb8979e2b68d4947884acd13f859a4e01b
2019-09-11 13:20:43 -07:00
Puneet Kaushik
5bd4a8c788 Create .eden at the repo root and store config in it.
Summary: On Linux and Mac, we provision .eden inside every directory, which contains symlinks to other locations. On Windows this won't work as well. First, Projected FS will cache all the .eden and will bump up the number of files on the disk. Second, it would be hard to simulate symlinks from Projected FS.

Reviewed By: strager

Differential Revision: D16724354

fbshipit-source-id: a560698fae8c7f14e475f1c1fb9ecc53e60c189f
2019-08-14 19:11:33 -07:00
Jake Crouch
6756d9b232 Pass Journal object to Windows Eden Mount
Summary: D16461081 broke the windows build of Eden by not updating the Windows mount code, this diff makes the same change as that diff in the Windows portion of the code.

Reviewed By: chadaustin

Differential Revision: D16549392

fbshipit-source-id: eee1bede08c1b27329b026746dda6863519ed10b
2019-07-29 17:21:30 -07:00
Puneet Kaushik
5053a65758 Adding streamingeden_thrift as a dependency to fix the build
Summary: eden_win_mount, eden_win_utils and eden_win_store include journal which depend on streamingeden_thrift. Adding the dependency to fix the build order.

Reviewed By: fanzeyi

Differential Revision: D16065869

fbshipit-source-id: d3bd5887e6c675885d284671bef7e514515d5fc0
2019-07-01 11:39:55 -07:00
Adam Simpkins
4bc8682391 update license headers in CMake files
Summary:
Update the copyright & license headers in CMake files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487079

fbshipit-source-id: 715e559464c19a0070d6e55a095b3fc7d61ad2f8
2019-06-19 17:02:46 -07:00
Adam Simpkins
aa5e6c7295 update license headers in C++ files
Summary:
Update the copyright & license headers in C++ files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487078

fbshipit-source-id: 19f24c933a64ecad0d3a692d0f8d2a38b4194b1d
2019-06-19 17:02:45 -07:00
Puneet Kaushik
7913c918e2 Add eden_service_thrift as a dependency for the new CMake targets.
Summary: The new Windows CMake targets were failing to include the generated thrift headers on Sandcastle machines. Making eden_service_thrift a dependecy will make sure that the thrift generated files are created before we compile the code.

Reviewed By: simpkins

Differential Revision: D15536743

fbshipit-source-id: 4bedb8f33cddf5f7eb8f5b5ce52b2013728b38f7
2019-05-31 16:16:23 -07:00
Puneet Kaushik
531154d281 Add FindPrjfs to locate Projected FS sdk.
Summary: This is a stop gap solution to get the Windows build working with the getdeps, until we fix the SDK.

Reviewed By: chadaustin

Differential Revision: D15536740

fbshipit-source-id: 77cc6ea80c304a6cfcd0180bb28f63ce4dac2988
2019-05-31 16:16:23 -07:00
Puneet Kaushik
94c336d7bb CMake build scripts for Eden Windows
Summary:
Now Eden on Windows could be build using
python.exe .\opensource\fbcode_builder\getdeps.py build eden

Reviewed By: strager

Differential Revision: D15251103

fbshipit-source-id: 8ac1097b234bb27ce478101bfbc9591251e2e359
2019-05-10 18:33:00 -07:00
Puneet Kaushik
d991894164 Moving Edenfs's Windows code to eden/fs
Reviewed By: wez

Differential Revision: D15224021

fbshipit-source-id: d046da829a6bceb73c7f05c62a77a0ef9a39e4bc
2019-05-09 16:33:08 -07:00