Skip to content

Commit

Permalink
Marry RE CI with Source Control CI
Browse files Browse the repository at this point in the history
Summary:
**Marry RE CI with the Source Control CI**

We would like to enable Source Control integration tests as RE diff signal. This is to ensure robust integration of Source Control with CAS and better test coverage.

**How to debug a Source Control Tests if one fails?**

The source control tests compare the output of the commands vs expected (hardcoded) output.

They are easy to run. There is a buck way and a simplified way using our custom script. See also the help of the run-test script to select a build mode (the default is `fbcode//mode/dev-nosan-lg`)

```
cd ~/fbsource/fbcode/eden/mononoke/tests/integration

./run-test.sh facebook/mononoke_re_cas/test-sapling-cas-commit.t

# if you are sure the output change is legit, use the 'interactive' flag for auto correction of the expected output
./run-test.sh facebook/mononoke_re_cas/test-sapling-cas-commit.t --interactive

# the flag 'keep-tmpdir' is useful for debugging as it stores your test output in a separate file and also cas client side logs
./run-test.sh facebook/mononoke_re_cas/test-sapling-cas-commit.t --keep-tmpdir
```

temporary disable the flaky test - Source Control will fix it soon

Reviewed By: andreacampi

Differential Revision: D64626815

fbshipit-source-id: ed57b642faa02d8ae086185e68cb2ab60d01f4a3
  • Loading branch information
Liubov Dmitrieva authored and facebook-github-bot committed Oct 21, 2024
1 parent 761e695 commit af64d51
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
17 changes: 13 additions & 4 deletions eden/mononoke/tests/integration/facebook/mononoke_re_cas/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ oncall("scm_server_infra")
# Test suit for testing of Mononoke CAS Sync and also
# for testing Sapling/Cas integration when a repo is synced

# TODO(liubovd): fix flaky LFS test
dott_test(
name = "mononoke_re_cas",
disable_all_network_access_target = False,
dott_files = glob([
"*.t",
]),
dott_files = glob(
[
"*.t",
],
exclude = ["test-sapling-cas-lfs-goto.t"],
),
deps = [
"//eden/mononoke:mononoke",
"//eden/mononoke/lfs_server:lfs_server",
Expand All @@ -24,8 +28,13 @@ dott_test(
],
)

# This adds some artificial direct dependecies to CI graph to make it look like deps are closer
ci_hint(
ci_deps = [
"fbcode//remote_execution/client_lib/wrappers/rust:re_client_lib",
"fbcode//remote_execution/client_lib/wrappers/rust:external_re_client_lib",
],
ci_srcs = ["fbcode/eden/scm/**"],
reason = "Those tests should be triggered on hg diffs despite the longer CI distance",
reason = "Those tests should be triggered on sapling and RE diffs despite the longer CI distance",
target = "mononoke_re_cas",
)
11 changes: 11 additions & 0 deletions eden/mononoke/tests/integration/mononoke_re_cas/TARGETS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbcode//target_determinator/macros:ci_hint.bzl", "ci_hint")
load(
"//eden/mononoke/tests/integration/facebook:fb_manifest_deps.bzl",
"dott_test",
Expand All @@ -21,3 +22,13 @@ dott_test(
"//eden/mononoke/tools/testtool:testtool",
],
)

# This adds some artificial direct dependecies to CI graph to make it look like deps are closer
ci_hint(
ci_deps = [
"fbcode//remote_execution/client_lib/wrappers/rust:re_client_lib",
"fbcode//remote_execution/client_lib/wrappers/rust:external_re_client_lib",
],
reason = "Those tests should be triggered on RE diffs despite the longer CI distance",
target = "mononoke_re_cas",
)

0 comments on commit af64d51

Please sign in to comment.