tox.ini, GitHub CI workflow - minor fixes, more homebrew configuration factors, improve docker interface
mkoeppe opened this issue · 106 comments
This makes the following changes to tox.ini:
-
tox -e local-homebrew-macos-standardnow uses python3 from homebrew.This attempts to reproduce the environment of https://groups.google.com/d/msg/sage-release/kU5M1QVuQQY/Zu10Q-CKAwAJ
-
tox -e local-homebrew-macos-standard-python3_xcodeuses/usr/bin/python3(was the old default) -
tox -e local-homebrew-macos-standard-python3_pythonorguses the Python 3.7 installation from the binary package from python.org
New toolchain factors: gcc_spkg, gcc_9.
Improved docker interface.
CC: @jhpalmieri @dimpase @orlitzky @kliem @vbraun
Component: porting
Author: Matthias Koeppe
Branch/Commit: b7bb418
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/29417
Branch: u/mkoeppe/tox-ci-minor-fixes
Last 10 new commits:
fbb7393 | Fixup packages |
cfcd8f2 | build/bin/sage-guess-package-system, build/bin/sage-print-system-package-command: Handle slackware too |
136feeb | build/bin/sage-spkg: Show equivalent system packages for ALL distros |
9939051 | Merge branch 't/29354/tox_ini__add_slackware_environments' into t/29087/CI-gh-actions-tox-configure-build |
4ac9e24 | Reduce SAGE_NUM_THREADS to 3 |
1cb8f98 | build/pkgs/curl/distros/slackware.txt: Add openldap-client |
eee2877 | build/pkgs/slackware.txt: Add ca-certificates |
c1931f5 | build/pkgs/curl/distros/slackware.txt: Add libssh2 |
3145467 | Merge branch 't/29354/tox_ini__add_slackware_environments' into t/29087/CI-gh-actions-tox-configure-build |
b259671 | [tox-local-homebrew-macos] Repair make parallelization |
Author: Matthias Koeppe
Branch pushed to git repo; I updated commit sha1. New commits:
bd24641 | build/bin/sage-download-file: Add option --no-check-certificate |
e143939 | build/bin/sage-spkg: Append to SAGE_DOWNLOAD_FILE_OPTIONS instead of overwriting it |
710b52d | Merge branch 't/29418/sage_download_file__fix_certificate_problems_with_https_downloads_on_macos_python3' into t/29417/tox-ci-minor-fixes |
b1489e7 | tox.ini: Set SAGE_DOWNLOAD_FILE_OPTIONS=--no-check-certificate |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
354cf90 | Use conda-install --yes --quiet |
df609e0 | Merge branch 't/29415/tox_ini__add_environment_local_conda' into t/29417/tox-ci-minor-fixes |
cf27321 | build/bin/sage-download-file: Add option --no-check-certificate |
90ea00b | build/bin/sage-spkg: Append to SAGE_DOWNLOAD_FILE_OPTIONS instead of overwriting it |
bccc2c2 | Merge branch 't/29418/sage_download_file__fix_certificate_problems_with_https_downloads_on_macos_python3' into t/29417/tox-ci-minor-fixes |
87b7351 | tox.ini: Add configuration factors python3, macos-python3_xcode, macos-python3_pythonorg |
329ea99 | tox.yml: Test more homebrew configs |
de1bce2 | tox.yml: Add local-ubuntu-conda test |
86d5c84 | tox.ini: Add toolchain factors |
846f14e | tox.yml: Test more Fedora, no conda |
Branch pushed to git repo; I updated commit sha1. New commits:
9838fd7 | fixup |
Branch pushed to git repo; I updated commit sha1. New commits:
a3ccd46 | build/pkgs/python3/distros/homebrew.txt: New |
Description changed:
---
+++
@@ -1 +1,12 @@
+This makes the following changes to tox.ini:
+- `tox -e local-homebrew-macos-standard` now uses python3 from homebrew.
+ This attempts to reproduce the environment of https://groups.google.com/d/msg/sage-release/kU5M1QVuQQY/Zu10Q-CKAwAJ
+
+- `tox -e local-homebrew-macos-standard-python3_xcode` uses `/usr/bin/python3` (was the old default)
+
+- `tox -e local-homebrew-macos-standard-python3_pythonorg` uses the Python 3.7 installation from the binary package from python.org
+
+New toolchain factors: `gcc_spkg`, `gcc_9`.
+
+Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
6153945 | merge the sections on tox factors |
ab11ebd | elide some details from terminal output |
c7fcf91 | change 'ls -l' to 'ls -la' and elide some details |
e73bc8d | Elide more details, shorten directory names more |
a31b2a0 | Reviewer patch |
b7b45fe | Reviewer patch |
f7d2dc9 | Remove old section head |
99aca39 | Reformat list, remove unfinished commented out section |
2c53ae2 | Merge branch 't/29401/add_documentation_of_tox_and_github_actions_workflow_to_developer_s_manual' into t/29417/tox-ci-minor-fixes |
2bc1243 | src/doc/en/developer/portability_testing.rst: Add documentation on new local-conda and local-homebrew environments |
Branch pushed to git repo; I updated commit sha1. New commits:
5dd7652 | tox.ini: Add more linuxmint versions |
c6cc486 | tox.ini: IGNORE_MISSING_SYSTEM_PACKAGES=yes for old linuxmint versions |
cd72da9 | tox.ini: Add linuxmint-i386 |
7986ab3 | tox.yml: Add more linuxmint |
a54ab32 | tox.ini: Remove linuxmint-20 (no docker image) |
Branch pushed to git repo; I updated commit sha1. New commits:
3757212 | tox.ini: Switch local-conda-forge to miniforge |
a61c48e | tox.ini [local-conda]: Activate conda before calling conda install |
8f58411 | Merge branch 't/29415/tox_ini__add_environment_local_conda' into t/29417/tox-ci-minor-fixes |
4281c92 | Replace commands_pre by commands, to support tox < 3.4 |
Branch pushed to git repo; I updated commit sha1. New commits:
49aeac3 | tox.ini: New factor nokegonly for homebrew |
Branch pushed to git repo; I updated commit sha1. New commits:
c7a7061 | tox.ini: Fix up 'nokegonly' |
Branch pushed to git repo; I updated commit sha1. New commits:
5477536 | tox.ini: Pass through DOCKER_BUILDKIT |
Branch pushed to git repo; I updated commit sha1. New commits:
0b5a73a | tox.ini: Add factor python3_spkg |
Branch pushed to git repo; I updated commit sha1. New commits:
85b3c51 | tox.ini: Set fedora <= 29 to IGNORE_MISSING_SYSTEM_PACKAGES=yes |
Branch pushed to git repo; I updated commit sha1. New commits:
1414208 | Remove linuxmint-20, IGNORE_MISSING_SYSTEM_PACKAGES=yes for all linuxmint because of libbraiding |
Branch pushed to git repo; I updated commit sha1. New commits:
ba57c1c | tox.yml: Add debian-stretch |
Branch pushed to git repo; I updated commit sha1. New commits:
544d886 | build/bin/write-dockerfile.sh: Add 'FROM ... AS ...' so that docker build --target works |
2845728 | build/bin/write-dockerfile.sh: Add V=0 to default USE_MAKEFLAGS, to match 'tox local' |
e655a03 | tox.ini [docker]: Loop through DOCKER_TARGETS, tag intermediate images |
09bdad0 | tox.ini [docker]: Override default TARGETS_PRE and TARGETS using posargs, to match 'tox local' interface |
4c8c72f | Fixup: Need to repeat ARG after FROM |
8f7e774 | src/doc/en/developer/portability_testing.rst: Document docker targets |
Description changed:
---
+++
@@ -9,4 +9,5 @@
New toolchain factors: `gcc_spkg`, `gcc_9`.
+Improved docker interface.
Branch pushed to git repo; I updated commit sha1. New commits:
03faba1 | tox.ini: Fixup: Pass --always to git describe so it does not fail |
Branch pushed to git repo; I updated commit sha1. New commits:
67dc11c | build/bin/write-dockerfile.sh: Fixup for arch |
Branch pushed to git repo; I updated commit sha1. New commits:
b564e06 | tox.ini [debian-stretch]: Set IGNORE_MISSING_SYSTEM_PACKAGES=yes |
Branch pushed to git repo; I updated commit sha1. New commits:
0c648dc | tox.ini [ubuntu-bionic]: Set IGNORE_MISSING_SYSTEM_PACKAGES=yes |
Branch pushed to git repo; I updated commit sha1. New commits:
a2b1206 | .github/workflows/tox.yml: Rename the jobs to improve display in [GitHub](../wiki/GitHub) Actions summary |
Do you know how to resolve this? Is this resolved already?
Error processing tar file(exit status 1): write /sage/local/share/doc/sage/html/en/reference/modsym/sage/modular/modsym/relation_matrix_pyx.html: no space left on device
ERROR: InvocationError: '/usr/bin/docker build . -f /home/runner/work/sage-test-27122/sage-test-27122/.tox/docker-ubuntu-trusty-standard/Dockerfile --build-arg EXTRA_CONFIGURE_ARGS= --build-arg BASE_IMAGE=ubuntu:trusty --build-arg USE_MAKEFLAGS=-k V=0 SAGE_NUM_THREADS=3 --build-arg TARGETS=build ptest'
___________________________________ summary ____________________________________
ERROR: docker-ubuntu-trusty-standard: commands failed
##[error]Process completed with exit code 1.
This appears to be the reason that every single test is marked as failed, which is kind of annoying.
https://github.com/kliem/sage-test-27122/actions/runs/72102779
Replying to @kliem:
Do you know how to resolve this? Is this resolved already?
Error processing tar file(exit status 1): write /sage/local/share/doc/sage/html/en/reference/modsym/sage/modular/modsym/relation_matrix_pyx.html: no space left on device ERROR: InvocationError: '/usr/bin/docker build . -f /home/runner/work/sage-test-27122/sage-test-27122/.tox/docker-ubuntu-trusty-standard/Dockerfile --build-arg EXTRA_CONFIGURE_ARGS= --build-arg BASE_IMAGE=ubuntu:trusty --build-arg USE_MAKEFLAGS=-k V=0 SAGE_NUM_THREADS=3 --build-arg TARGETS=build ptest' ___________________________________ summary ____________________________________ ERROR: docker-ubuntu-trusty-standard: commands failed ##[error]Process completed with exit code 1.
Help with this would be most welcome!
I have the following browser tabs open, which should help with finding a solution. Essentially, one needs to reconfigure the docker daemon to use larger dm.basesize.
Docker - Using systemd to control the Docker daemon
https://success.docker.com/article/using-systemd-to-control-the-docker-daemon
"systemctl set-property docker" - Google Search
https://www.google.com/search?safe=off&biw=834&bih=836&sxsrf=ALeKk02AnzFOj0bspN6PGW6rKhDhhp3f4w%3A1586407757228&ei=TamOXtqxDYKWtQW5zr3YBA&q=%22systemctl+set-property+docker%22&oq=%22systemctl+set-property+docker%22&gs_lcp=CgZwc3ktYWIQAzIECAAQHjoECAAQRzoGCAAQFhAeSgkIFxIFMTItNjJKCAgYEgQxMi00UNOnAVi1rQFg2a8BaABwAngAgAF4iAHlAZIBAzAuMpgBAKABAaoBB2d3cy13aXo&sclient=psy-ab&ved=0ahUKEwiajNq2xdroAhUCS60KHTlnD0s4ChDh1QMIDA&uact=5
Docker - How to resolve Resource Temporarily Unavailable errors due to TaskMax setting
https://success.docker.com/article/how-to-reserve-resource-temporarily-unavailable-errors-due-to-tasksmax-setting
"systemctl status docker.service" dm.basesize - Google Search
https://www.google.com/search?safe=off&sxsrf=ALeKk01dBCgUutnZt6DU3HHzqaJyqDfA_w%3A1586408161041&ei=4aqOXpKKAtHKswXerrtY&q=%22systemctl+status+docker.service%22+dm.basesize&oq=%22systemctl+status+docker.service%22+dm.basesize&gs_lcp=CgZwc3ktYWIQAzIFCCEQoAE6BAgAEEc6BggAEBYQHjoFCAAQzQI6CAghEBYQHRAeSgoIFxIGMTItMTE0SgkIGBIFMTItMThQpp4DWN7FA2DvyANoBHADeACAAaIBiAHcD5IBBDAuMTWYAQCgAQGqAQdnd3Mtd2l6&sclient=psy-ab&ved=0ahUKEwjS_qD3xtroAhVR5awKHV7XDgsQ4dUDCAw&uact=5
Cannot Change Docker Size on Ubuntu 16.04 - DevOps Stack Exchange
https://devops.stackexchange.com/questions/4062/cannot-change-docker-size-on-ubuntu-16-04
uggds/vagrant-docker
https://github.com/uggds/vagrant-docker
Can't install Docker - Cloudera Community
https://community.cloudera.com/t5/Support-Questions/Can-t-install-Docker/td-p/205969
elasticsearch - Disk size of a docker image - Stack Overflow
https://stackoverflow.com/questions/48751032/disk-size-of-a-docker-image
dockerd | Docker Documentation
https://docs.docker.com/engine/reference/commandline/dockerd/
virtual-environments/Ubuntu1804-README.md at master · actions/virtual-environments
https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md
Docker Engine 18.09 release notes | Docker Documentation
https://docs.docker.com/engine/release-notes/18.09/
systemctl(1) — systemd — Debian jessie — Debian Manpages
https://manpages.debian.org/jessie/systemd/systemctl.1.en.html
This looks really complicated. I'm afraid this is way above what I know.
Does this help?
No worries - at least I was able to close this browser window now!
It appears that the solution in the link I provided, is fixing at least part of the problem.
I have put this
- uses: actions/checkout@v2
+ - name: free disk space
+ run: |
+ sudo swapoff -a
+ sudo rm -f /swapfile
+ sudo apt clean
+ docker rmi $(docker image ls -aq)
+ df -h
- name: Install test prerequisitesin the debian/ubuntu in .github/workflows/tox.yml and it seems to help. There are green checkmarks again. E.g. debian-jessie minimal passes https://github.com/kliem/sage-test-27122/actions/runs/75035611, which previously had that no space left on disk error.
Now many of minimal runs pass, but the standards show error messages as
The command '/bin/sh -c make SAGE_SPKG="sage-spkg -y -o" ${USE_MAKEFLAGS} ${TARGETS}' returned a non-zero code: 2
ERROR: InvocationError: '/bin/bash -c for docker_target in with-targets; do docker build . -f /home/runner/work/sage-test-27122/sage-test-27122/.tox/docker-debian-jessie-standard/Dockerfile --target $docker_target --tag sage-docker-debian-jessie-standard-$docker_target:$(git describe --dirty --always) --build-arg EXTRA_CONFIGURE_ARGS=" " --build-arg BASE_IMAGE=debian:jessie --build-arg TARGETS_PRE=sagelib-build-deps --build-arg TARGETS=build --build-arg USE_MAKEFLAGS="-k V=0 SAGE_NUM_THREADS=3" --build-arg TARGETS="build ptest"; done'
In the link they also cleanup old artifacts
- name: cleanup old action artifacts
run: .github/workflows/purge_artifacts.sh ${{ secrets.REPO_ACCESS_TOKEN }}
I don't know what this is for. But maybe that is also helpful.
That is probably the expected behavior when not all tests pass.
Replying to @kliem:
The command '/bin/sh -c make SAGE_SPKG="sage-spkg -y -o" ${USE_MAKEFLAGS} ${TARGETS}' returned a non-zero code: 2 ERROR: InvocationError: '/bin/bash -c for docker_target in with-targets; do docker build . -f /home/runner/work/sage-test-27122/sage-test-27122/.tox/docker-debian-jessie-standard/Dockerfile --target $docker_target --tag sage-docker-debian-jessie-standard-$docker_target:$(git describe --dirty --always) --build-arg EXTRA_CONFIGURE_ARGS=" " --build-arg BASE_IMAGE=debian:jessie --build-arg TARGETS_PRE=sagelib-build-deps --build-arg TARGETS=build --build-arg USE_MAKEFLAGS="-k V=0 SAGE_NUM_THREADS=3" --build-arg TARGETS="build ptest"; done'
Replying to @kliem:
That is probably the expected behavior when not all tests pass.
Replying to @kliem:
The command '/bin/sh -c make SAGE_SPKG="sage-spkg -y -o" ${USE_MAKEFLAGS} ${TARGETS}' returned a non-zero code: 2 ERROR: InvocationError: '/bin/bash -c for docker_target in with-targets; do docker build . -f /home/runner/work/sage-test-27122/sage-test-27122/.tox/docker-debian-jessie-standard/Dockerfile --target $docker_target --tag sage-docker-debian-jessie-standard-$docker_target:$(git describe --dirty --always) --build-arg EXTRA_CONFIGURE_ARGS=" " --build-arg BASE_IMAGE=debian:jessie --build-arg TARGETS_PRE=sagelib-build-deps --build-arg TARGETS=build --build-arg USE_MAKEFLAGS="-k V=0 SAGE_NUM_THREADS=3" --build-arg TARGETS="build ptest"; done'
Yes, this is expected behavior.
But it would perhaps be better to change it so that the docker build succeeds if there are only testsuite failures
Replying to @mkoeppe:
But it would perhaps be better to change it so that the docker build succeeds if there are only testsuite failures
Working on a solution for this.
I think the above thing with the disk space is more important.
I like the green check marks, because then I can just trust that everything worked fine. However,
it would still be nice, if one can quickly access which tests failed. But maybe that is non-trivial and then that's just the way it is.
Also I still hope that very soon we will have most of the runs clean either way.
Replying to @kliem:
I think the above thing with the disk space is more important.
Yes, I'm trying out your patch
Maybe one could have failing doctests communicated as neutral runs (according to github this is also a possible state). I don't know how much work it would be to accomplish this, but it would be really nice. Than one knows at the first glance what's going on.
I don't think it is supported anymore https://help.github.com/en/actions/building-actions/setting-exit-codes-for-actions
I rather have failed tests as failure so that one has to check the details. Otherwise we might overlook critical failing tests.
Replying to @kliem:
I rather have failed tests as failure so that one has to check the details. Otherwise we might overlook critical failing tests.
In the branch that I'm testing right now this is conveniently configurable
A preview at https://github.com/mkoeppe/sage/actions/runs/75739694
Branch pushed to git repo; I updated commit sha1. New commits:
856e35c | tox.ini, tox.yml: Do not fail if errors occur while making $TARGETS_OPTIONAL (default: ptest) |
484e01d | naive guess to clean disk space |
94f64a8 | tox fixup |
e389763 | tox fixup |
ad359c4 | .github/workflows/scan-logs.sh: Fixup regex |
e45bc0e | .github/workflows/scan-logs.sh: Rewording for better display |
Running at https://github.com/mkoeppe/sage/actions/runs/76368041
Branch pushed to git repo; I updated commit sha1. New commits:
06c28fe | .github/workflows/tox.yml: Pass TARGETS to tox so that errors in doc-html count as failures |
5ce717b | .github/workflows/scan-logs.sh: Fixup regexp for scanning ptest.log |
53e2a83 | .github/workflows/scan-logs.sh: Also catch errors of the form ImportError |
This now seems to work very well. https://github.com/mkoeppe/sage/actions/runs/76629492
Failing TARGETS_OPTIONAL (default = ptest) do not abort the build. These show as green checkmarks in the left pane, but for all failing doctest logs (both packages and sagelib ptest) also a yellow "Check warning" is displayed as annotation in the right pane.
By setting TARGETS_OPTIONAL to include names of optional packages, we can also test these in the same way.
Branch pushed to git repo; I updated commit sha1. New commits:
70d472e | tox.ini: Quoting fix |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
6fc9a18 | tox fixup |
4d2366b | tox fixup |
828394b | .github/workflows/scan-logs.sh: Fixup regex |
a39ca99 | .github/workflows/scan-logs.sh: Rewording for better display |
0a02589 | tox.ini: Store successfully built docker tags in {toxenv}/Dockertags |
d209e8e | tox.yml: Retrieve logs from successful builds via {toxenv}/Dockertags |
f1858e7 | .github/workflows/tox.yml: Pass TARGETS to tox so that errors in doc-html count as failures |
f9aca59 | .github/workflows/scan-logs.sh: Fixup regexp for scanning ptest.log |
b32e1bf | .github/workflows/scan-logs.sh: Also catch errors of the form ImportError |
d94969c | tox.ini: Quoting fix |
Rebased on 9.1.rc0
Test for 9.1.rc0 running at https://github.com/mkoeppe/sage/actions/runs/76923542
Branch pushed to git repo; I updated commit sha1. New commits:
faf0ed6 | tox.ini: Another quoting fix |
Branch pushed to git repo; I updated commit sha1. New commits:
aed3fb8 | src/doc/en/developer/portability_testing.rst: Explain how to read [GitHub](../wiki/GitHub) Actions page |
Can we finalize the review of this one please to get it into 9.1?
Replying to @dimpase:
running GH Actions tests on this here: dimpase#3
I see
/Users/runner/runners/2.168.0/work/sage/sage/build/bin/sage-venv "/Users/runner/runners/2.168.0/work/sage/sage/.tox/local-homebrew-macos-python3_pythonorg-standard/local"
2020-04-15T16:31:11.9205990Z /bin/sh: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3: No such file or directory
2020-04-15T16:31:11.9206560Z make[1]: *** [/Users/runner/runners/2.168.0/work/sage/sage/.tox/local-homebrew-macos-python3_pythonorg-standard/local/pyvenv.cfg] Error 127
2020-04-15T16:31:11.9207060Z make[1]: Target `doc-html' not remade because of errors.
there. Isn't this ticked supposed to be fixing this?
Thanks for catching this. Turns out I forgot to install the python.org python3 in tox.yml.
(This cannot be done in tox.ini because it is not relocatable, see comment there)
Branch pushed to git repo; I updated commit sha1. New commits:
d39d627 | tox.yml [python3_xcode]: Install the package |
Branch pushed to git repo; I updated commit sha1. New commits:
ba0c266 | fixup |
Branch pushed to git repo; I updated commit sha1. New commits:
9060d23 | fixup |
Branch pushed to git repo; I updated commit sha1. New commits:
b7bb418 | tox.yml [macos-python3_pythonorg]: Use sudo with installer |
homebrew-macos-python3_pythonorg, standard (https://github.com/dimpase/sage/runs/591414002) crashes at [dochtml] stage - not sure whether one can get complete logs/dochtml.log file from GitHub run above
I presume that various errors on local-macos standard runs are to be debugged individually.
e.g. on https://github.com/dimpase/sage/runs/591413919 (homebrew-macos-python3_xcode, minimal) I see ##[error] ==== ERROR IN LOG FILE artifacts/logs-commit-8bb28ec8ffd6869c6b86e3f5224333decb049d09-tox-local-homebrew-macos-python3_xcode-minimal/log/pkgs/gc-7.6.4.p0.log ==== and
Warning: Error testing package gc-7.6.4.p0 (ignored)