# Run sent to worker: doanac-reckless == 2023-01-27 17:27:22.516752: Setting up runner on worker == 2023-01-27 17:27:25.000712: Steps to recreate inside simulator wget -O simulate.sh https://api.gavelci.us/projects/jobserv/builds/334/runs/flake8//.simulate.sh # wget'ing the file may require the --header flag if the # jobserv API requires authentication. sh ./simulate.sh == 2023-01-27 17:27:26.306580: Pulling container: python:3.9-alpine 3.9-alpine: Pulling from library/python Digest: sha256:b0a0738ccbb0f49f1fe6818ae13e7777d46050e64b3a9d743f4f0da6c289d85b Status: Image is up to date for python:3.9-alpine docker.io/library/python:3.9-alpine == 2023-01-27 17:27:29.687998: Preparing bind mounts 2023-01-27 17:27:30.175228: INFO Creating secret: githubtok 2023-01-27 17:27:30.666184: INFO Creating secret: webhook-key 2023-01-27 17:27:31.159028: INFO Creating secret: milosz == 2023-01-27 17:27:32.273011: Creating container .netrc file 2023-01-27 17:27:32.765895: INFO Creating token for jobserv run access 2023-01-27 17:27:33.250364: INFO Creating a github token entry == 2023-01-27 17:27:34.239536: Preparing script == 2023-01-27 17:27:35.246753: Cloning git repository 2023-01-27 17:27:35.752853: INFO Clone_url: https://github.com/doanac/jobserv.git 2023-01-27 17:27:36.254842: INFO Checking to see if https://github.com/doanac/jobserv.git requires authentication. 2023-01-27 17:27:37.347495: INFO Server does not appear to need credentials for cloning 2023-01-27 17:27:37.871531: INFO Adding githubtok to .gitconfig 2023-01-27 17:27:38.265326: INFO Git install supports submodules Cloning into '/srv/gavelci-worker/runs/tmpuosfwcii/repo'... 2023-01-27 17:27:39.942467: INFO Checking out: 620e1a5d477131575361c765f34529cc37f576ac Switched to branch 'jobserv-run' == 2023-01-27 17:27:41.099984: Setting up container environment 2023-01-27 17:27:41.461414: INFO Container environment variables: GH_PRNUM=79 GH_OWNER=foundriesio GH_REPO=jobserv GH_STATUS_URL=https://api.github.com/repos/foundriesio/jobserv/statuses/620e1a5d477131575361c765f34529cc37f576ac GH_TARGET_REPO=https://github.com/foundriesio/jobserv.git GIT_URL=https://github.com/doanac/jobserv.git GIT_SHA_BASE=e66b43a1c42e196017a138f7bbb1fec5c3ddfa48 GIT_OLD_SHA=e66b43a1c42e196017a138f7bbb1fec5c3ddfa48 GIT_SHA=620e1a5d477131575361c765f34529cc37f576ac H_PROJECT=jobserv H_BUILD=334 H_RUN=flake8 H_WORKER=doanac-reckless == 2023-01-27 17:27:42.248802: Running script inside container 2023-01-27 17:27:42.647772: INFO Running with --memory=14639596339 WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. + apk add musl-dev gcc fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz (1/11) Installing libgcc (12.2.1_git20220924-r4) (2/11) Installing libstdc++ (12.2.1_git20220924-r4) (3/11) Installing binutils (2.39-r2) (4/11) Installing libgomp (12.2.1_git20220924-r4) (5/11) Installing libatomic (12.2.1_git20220924-r4) (6/11) Installing gmp (6.2.1-r2) (7/11) Installing isl25 (0.25-r0) (8/11) Installing mpfr4 (4.1.0-r0) (9/11) Installing mpc1 (1.2.1-r1) (10/11) Installing gcc (12.2.1_git20220924-r4) (11/11) Installing musl-dev (1.2.3-r4) Executing busybox-1.35.0-r29.trigger OK: 160 MiB in 48 packages + pip3 install flake8 'flake8-junit-report==2.1.0' 'black==21.7b0' 'click==7.1.2' Collecting flake8 Downloading flake8-6.0.0-py2.py3-none-any.whl (57 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.8/57.8 KB 435.4 kB/s eta 0:00:00 Collecting flake8-junit-report==2.1.0 Downloading flake8-junit-report-2.1.0.tar.gz (3.1 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting black==21.7b0 Downloading black-21.7b0-py3-none-any.whl (141 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 141.2/141.2 KB 788.3 kB/s eta 0:00:00 Collecting click==7.1.2 Downloading click-7.1.2-py2.py3-none-any.whl (82 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.8/82.8 KB 604.8 kB/s eta 0:00:00 Collecting pathspec<1,>=0.8.1 Downloading pathspec-0.11.0-py3-none-any.whl (29 kB) Collecting tomli<2.0.0,>=0.2.6 Downloading tomli-1.2.3-py3-none-any.whl (12 kB) Collecting appdirs Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB) Collecting regex>=2020.1.8 Downloading regex-2022.10.31-cp39-cp39-musllinux_1_1_x86_64.whl (741 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 741.6/741.6 KB 1.0 MB/s eta 0:00:00 Collecting mypy-extensions>=0.4.3 Downloading mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB) Collecting pycodestyle<2.11.0,>=2.10.0 Downloading pycodestyle-2.10.0-py2.py3-none-any.whl (41 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.3/41.3 KB 510.7 kB/s eta 0:00:00 Collecting mccabe<0.8.0,>=0.7.0 Downloading mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB) Collecting pyflakes<3.1.0,>=3.0.0 Downloading pyflakes-3.0.1-py2.py3-none-any.whl (62 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 KB 647.4 kB/s eta 0:00:00 Building wheels for collected packages: flake8-junit-report Building wheel for flake8-junit-report (setup.py): started Building wheel for flake8-junit-report (setup.py): finished with status 'done' Created wheel for flake8-junit-report: filename=flake8_junit_report-2.1.0-py3-none-any.whl size=3752 sha256=f50f3b823fecb138a6a0a2268050596c399d7d2040ac30edb8396e63b906453b Stored in directory: /root/.cache/pip/wheels/cf/f4/a2/215f2d41b7ea39ec29290157276313e311195cd929daf91fc4 Successfully built flake8-junit-report Installing collected packages: mypy-extensions, flake8-junit-report, appdirs, tomli, regex, pyflakes, pycodestyle, pathspec, mccabe, click, flake8, black Successfully installed appdirs-1.4.4 black-21.7b0 click-7.1.2 flake8-6.0.0 flake8-junit-report-2.1.0 mccabe-0.7.0 mypy-extensions-0.4.3 pathspec-0.11.0 pycodestyle-2.10.0 pyflakes-3.0.1 regex-2022.10.31 tomli-1.2.3 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available. You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. + black --check --diff ./jobserv ./runner ./tests ./jobserv_worker.py --- jobserv/app.py 2023-01-27 17:27:40.310992 +0000 +++ jobserv/app.py 2023-01-27 17:28:16.158178 +0000 @@ -114,11 +114,15 @@ def _register_github_hook(project, url, api_token, hook_token, server_name): data = { "name": "web", "active": True, - "events": ["pull_request", "pull_request_review_comment", "issue_comment",], + "events": [ + "pull_request", + "pull_request_review_comment", + "issue_comment", + ], "config": { "url": "https://%s/github/%s/" % (server_name, project), "content_type": "json", "secret": hook_token, }, @@ -369,11 +373,15 @@ p = Project.query.filter(Project.name == project).one().id cutoff_date = datetime.datetime.utcnow() - datetime.timedelta(days=cutoff_days) click.echo(f"Looking for builds in {project} before {cutoff_date}...") builds = ( Build.query.join(BuildEvents) - .filter(Build.proj_id == p, Build.status != BuildStatus.PROMOTED, BuildEvents.time <= cutoff_date) + .filter( + Build.proj_id == p, + Build.status != BuildStatus.PROMOTED, + BuildEvents.time <= cutoff_date, + ) .order_by(-Build.build_id) ) storage = Storage() for b in builds: if dryrun: @@ -384,6 +392,6 @@ storage.delete_build(b) except FileNotFoundError: # Maybe we tried to prune this before and hit an error pass db.session.delete(b) - #db.session.commit() + # db.session.commit() would reformat jobserv/app.py Oh no! 💥 💔 💥 1 file would be reformatted, 62 files would be left unchanged. Script completed with error(s) == 2023-01-27 17:28:25.467142: Finding artifacts to upload Uploading 0 items 0 bytes == 2023-01-27 17:28:25.834543: Runner has completed ________ | o o| Thumbs Down |___/\_|________ | _____|__| | | || |______| | | | | | | | | |_| |_|