forked from facebook/sapling
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run edenfs integration tests in github CI #14
Draft
ahornby
wants to merge
3
commits into
main
Choose a base branch
from
eden_oss_tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ahornby
force-pushed
the
eden_oss_tests
branch
from
September 29, 2024 11:49
ab6231e
to
68e3a15
Compare
Summary: Connect up the sapling *.t tests so that github CI has visible cli test status. To get them to run: * some needed fbpython on path. I included a shim for that in the test makefile target. * test-rust-hooks: Command not found message, added a glob * test-identity.t: add a glob for the sapling version * helpers-testrepo.sh: fix assumption that system hg would be able to read test repo, check if its Sapling first. * excluded a few remaining tests (see comments in Makefile) NB the tests run as "hg". The expectations would need to be updated if we were to run as "sl" This makes the tests runnable locally with: `./build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. sapling --num-jobs=48 --retry 0` You can rerun one test with --filter: ` ./build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. sapling --num-jobs=1 --retry 1 --filter test-check-execute.t` Test Plan: enter ubuntu 22.04 toolbox: `toolbox enter ubuntu-toolbox-22.04 ` make sure system packages are installed `./build/fbcode_builder/getdeps.py install-system-deps --recursive sapling` build sapling `./build/fbcode_builder/getdeps.py build --allow-system-packages --no-facebook-internal --src-dir=. sapling` run the tests. 48 was about max concurrency on my personal 64GB machine and took 4 mins. Setting less concurrency for CI. ``` ./build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. sapling --num-jobs=48 ---------------------------------------------------------------------- Skipped 2 tests (missing feature: Mononoke server available): test-fb-ext-remotefilelog-log.t test-fb-ext-remotefilelog-worker.t Skipped 3 tests (missing feature: running tests with fsmonitor): test-fsmonitor-filemerge.t test-fsmonitor-nonutf8-path.t test-rust-hgevents.t Skipped 46 tests (skipped): test-atexit-epipe.t test-casefolding.t test-check-clang-format.t test-check-code.t test-check-fix-code.t test-check-help.t test-checkserverbookmark.t test-chg.t test-debugbacktrace.t test-debugshell-namespace.t test-eden-clone.t test-eden-commands.t test-eden-du.t test-eden-glob.t test-eden-sparse.t test-eden-watchman-edenapi-glob.t test-eden-watchman-noedenapi-glob.t test-fb-ext-fbconduit.t test-fb-ext-scm-prompt-compat.t test-fb-ext-scm-prompt-git.t test-fb-ext-tweakdefaults-grep.t test-fsmonitor-casefolding.t test-fsmonitor-fallback.t test-fsmonitor-metadata.t test-fsmonitor-refreshclock.t test-fsmonitor-status.t test-fsmonitor-warn-fresh.t test-histedit-reorder.t test-matcher-expand-globs.t test-mutation-infinitepush.t test-non-working-symlink.t test-progress-rust-renderer.t test-progressfile.t test-purge-fsmonitor.t test-remotenames-journal.t test-runlog.t test-rust-status-in-transaction.t test-sparse-track-ignored.t test-status-case-insensitive.t test-status-fresh-instance.t test-status-root-ignored-py.t test-status-watchman.t test-symlink-migration.t test-tracing-under-chg.t test-treestate-fresh-instance.t test-treestate-trackignore.t # Ran 736 tests, 51 skipped, 0 failed. passed on try 0 ``` generate github actions CI ``` ./build/fbcode_builder/getdeps.py --allow-system-packages generate-github-actions --free-up-disk --os-type=linux --src-dir=. --output-dir=.github/workflows --job-name "Sapling CLI Getdeps " --job-file-prefix=sapling-cli-getdeps_ sapling --num-jobs=16 --project-install-prefix sapling:/ ```
Summary: Ubuntu 24.04 and Fedora 40 are both python 3.12 based. Update sapling's OSS getdeps build to allow build/run/test on python 3.12 while keeping 3.10 support. distutils is deprecated in python 3.12 stdlib, but fortunately setuptools is pretty similar and includes a vendored distutils, migrated as per: https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html The distutils change gets the binaries appearing in the sapling getdeps build on python 3.12, previously the build succeed but binaries not in the output dir. Tests modified to run on 3.12 and 3.10: * test-import-eol.t: updated for invalid escape sequence warnings * test-install.t: updated to filter out message that appears in different order on 3.12 vs earlier versions * test-sign-commit.t: updated to add --yes for newer gpg that python 3.12 using distros have When testing found datetime.utcfromtimestamp is deprecated in 3.12, so updated to use non-deprecated methods. Tested with test-command-template.t which shows tz offset. Makefile: disabled a few tests on 3.12 where updating the expectation to run on 3.12 and 3.10 is trick. Test Plan: install system packages: ``` ./build/fbcode_builder/getdeps.py install-system-deps --recursive sapling ``` check oss non-thrift build: ``` make oss ``` check oss getdeps thrift build: ``` ./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. sapling ```
Summary: Now that we have sapling manifest we can start to run EdenFS tests in github CI Added a stub for missing import of cli.py par_telemetry which was failing tests. I found eden segfaulted on ubuntu 22.04, so updating to ubutu 24.04 Fixed getdeps support for test only dependencies in github action generation, then regenerated CI actions with. ``` ./build/fbcode_builder/getdeps.py --allow-system-packages generate-github-actions --free-up-disk --os-type=linux --ubuntu-version=24.04 --src-dir=. --output-dir=.github/workflows --job-name "EdenFS " --job-file-prefix=edenfs_ eden --num-jobs=16 --project-install-prefix sapling:/usr/local ``` Test Plan: enter toolbox: ``` toolbox enter ubuntu-toolbox-24.04 ``` build sapling and eden: `` ./build/fbcode_builder/getdeps.py install-system-deps --recursive eden ./build/fbcode_builder/getdeps.py build --allow-system-packages --no-facebook-internal --src-dir=. sapling ./build/fbcode_builder/getdeps.py build --allow-system-packages --no-facebook-internal --src-dir=. eden ``` run eden tests locally: ``` ./build/fbcode_builder/getdeps.py test --allow-system-packages --no-facebook-internal --num-jobs=8 --src-dir=. eden ```
ahornby
force-pushed
the
eden_oss_tests
branch
from
September 30, 2024 18:54
68e3a15
to
f934869
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Now that we have sapling manifest we can start to run EdenFS tests in github CI
Added a stub for missing import of cli.py par_telemetry which was failing tests.
Fixed getdeps support for test only dependencies in github action generation, then regenerated CI actions with:
Test Plan:
enter toolbox:
build sapling and eden:
``
./build/fbcode_builder/getdeps.py install-system-deps --recursive eden ./build/fbcode_builder/getdeps.py build --allow-system-packages --no-facebook-internal --src-dir=. sapling ./build/fbcode_builder/getdeps.py build --allow-system-packages --no-facebook-internal --src-dir=. eden
./build/fbcode_builder/getdeps.py test --allow-system-packages --no-facebook-internal --num-jobs=8 --src-dir=. eden