Skip to content

Conversation

@ahornby
Copy link
Owner

@ahornby ahornby commented Oct 23, 2024

Summary:

  • mononoke unit tests are failing, fix them
  • test-cross-repo-mononoke-git-sot.t deleted, remove from exclusion list

Test Plan:

Local run of unittest

./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. mononoke
./build/fbcode_builder/getdeps.py --allow-system-packages test--src-dir=. mononoke

Before fails:

failures:
    store::test::test_find_abandoned_requests
    store::test::test_get_stats
    store::test::test_mark_as_new

After, passes.

Local run of integration test

# first build sapling cli & install system deps
./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. sapling
./build/fbcode_builder/getdeps.py install-system-deps --recursive mononoke_integration
# then test mononoke
./build/fbcode_builder/getdeps.py --allow-system-packages build --no-deps --src-dir=. mononoke_integration
./build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. mononoke_integration

Before, fails

AssertionError: The test groups contain not existing tests: ['cross_repo/test-cross-repo-mononoke-git-sot-switch.t'] in /home/runner/work/sapling/sapling/eden/mononoke/tests/integration

After, passes:

@ahornby ahornby force-pushed the mononoke_oss_fixes branch 3 times, most recently from 0306455 to 571176d Compare October 23, 2024 16:10
Summary:
* mononoke [unit tests are failing](https://github.com/facebook/sapling/actions/runs/11477571042/job/31939940450#step:85:8352),  fix them
* test-cross-repo-mononoke-git-sot.t deleted, remove from exclusion list

changes done to make this easier:
 * python-click wasn't found in sapling dir, added package mappings for rpm and deb so that we can pick up the installed version
 * add a bit more info to the "unknown python exception" message from hg
 * reduce paths set by getdeps, no point listing non-existing dir, makes it easier to see what is happening

Test Plan:

**Local run of unittest**
```
./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. mononoke
./build/fbcode_builder/getdeps.py --allow-system-packages test--src-dir=. mononoke
```

Before fails:
```
failures:
    store::test::test_find_abandoned_requests
    store::test::test_get_stats
    store::test::test_mark_as_new
```

After, passes.

**Local run of integration test**
```
# first build sapling cli & install system deps
./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. sapling
./build/fbcode_builder/getdeps.py install-system-deps --recursive mononoke_integration
# then test mononoke
./build/fbcode_builder/getdeps.py --allow-system-packages build --no-deps --src-dir=. mononoke_integration
./build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. mononoke_integration --num-jobs=4
```

Before, fails
```
AssertionError: The test groups contain not existing tests: ['cross_repo/test-cross-repo-mononoke-git-sot-switch.t'] in /home/runner/work/sapling/sapling/eden/mononoke/tests/integration
```

After, passes
@ahornby ahornby force-pushed the mononoke_oss_fixes branch from 571176d to 7fd6c1b Compare October 23, 2024 16:25
@ahornby ahornby closed this Oct 24, 2024
ahornby pushed a commit that referenced this pull request Nov 22, 2024
Summary:
Fixes this (which was polluting my `arc rust-check` output):

```
warning: unused variable: `time`
   --> fbcode/eden/scm/saplingnative/bindings/modules/pymetalog/src/lib.rs:119:38
    |
119 |     def commit(&self, message: &str, time: Option<u64> = None, pending: bool = false) -> PyResult<Bytes> {
    |                                      ^^^^
    |
help: `time` is captured in macro and introduced a unused variable
   --> third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class.rs:478:1
    |
    = note: in this expansion of `py_class!` (#1)
   ::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class.rs:537:9
    |
    = note: in this macro invocation (#2)
   ::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class.rs:543:1
    |
    = note: in this expansion of `$crate::py_class_impl_item!` (#18)
   --> third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:30:1
    |
    = note: in this expansion of `$crate::py_class_impl!` (#2)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#3)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#4)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#5)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#6)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#7)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#8)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#9)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#10)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#11)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#12)
    |
    = note: in this expansion of `$crate::py_class_impl!` (#13)
   ::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:249:5
    |
    = note: in this macro invocation (#3)
    |
    = note: in this macro invocation (#4)
   ::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:2392:5
    |
    = note: in this macro invocation (#5)
   ::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:2970:5
    |
    = note: in this macro invocation (#7)
    |
    = note: in this macro invocation (#13)
   ::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:2999:13
    |
    = note: in this macro invocation (#14)
   ::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:3005:5
    |
    = note: in this macro invocation (#8)
    |
    = note: in this macro invocation (#11)
    |
    = note: in this macro invocation (#12)
   ::: third-party/rust/vendor/cpython-0.7.2/src/py_class/py_class_impl3.rs:3120:5
    |
    = note: in this macro invocation (#6)
    |
    = note: in this macro invocation (#9)
    |
    = note: in this macro invocation (#10)
   --> third-party/rust/vendor/cpython-0.7.2/src/argparse.rs:196:1
    |
    = note: in this expansion of `$crate::py_argparse_parse_plist_impl!` (#14)
    |
    = note: in this expansion of `$crate::py_argparse_parse_plist_impl!` (#15)
    |
    = note: in this expansion of `$crate::py_argparse_parse_plist_impl!` (#16)
    |
    = note: in this expansion of `$crate::py_argparse_parse_plist_impl!` (#17)
   ::: third-party/rust/vendor/cpython-0.7.2/src/argparse.rs:201:9
    |
    = note: in this macro invocation (#18)
   ::: third-party/rust/vendor/cpython-0.7.2/src/argparse.rs:271:9
    |
    = note: in this macro invocation (#15)
   ::: third-party/rust/vendor/cpython-0.7.2/src/argparse.rs:331:9
    |
    = note: in this macro invocation (#16)
    |
    = note: in this macro invocation (#17)
    |
   ::: fbcode/eden/scm/saplingnative/bindings/modules/pymetalog/src/lib.rs:36:1
    |
36  | /   py_class!(pub class metalog |py| {
37  | |       data log: Arc<RwLock<MetaLog>>;
38  | |       data fspath: String;
...   |
226 | |       }
227 | |   });
    | |____- in this macro invocation (#1)
    = note: `#[warn(unused_variables)]` on by default

```

Reviewed By: quark-zju

Differential Revision: D65218833

fbshipit-source-id: fa69c1a24a32b7eff857070528f6337ec0b3711c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants