From b618df907a833e53c99871845e3e3c50824227bf Mon Sep 17 00:00:00 2001 From: Lennart Purucker Date: Wed, 16 Oct 2024 17:41:50 +0200 Subject: [PATCH 1/3] fix: if docs do not change, do not fail ci --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index e50d67710..bc4a04bce 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -64,4 +64,4 @@ jobs: git config --global user.email 'not@mail.com' git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} git commit -am "$last_commit" - git push + git diff --quiet @{u} HEAD || git push From dd092f2fe59cd5992e4504964d95300a80c8c0fc Mon Sep 17 00:00:00 2001 From: Lennart Purucker Date: Wed, 16 Oct 2024 17:42:05 +0200 Subject: [PATCH 2/3] fix: roll back change that is not 3.8 specific --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e0ce8ecba..f2543bc53 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -106,8 +106,7 @@ jobs: run: | # we need a separate step because of the bash-specific if-statement in the previous one. pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1 - name: Check for files left behind by test - # skip 3.8 as it fails only for Python 3.8 for no explainable reason. - if: matrix.os != 'windows-latest' && matrix.python-version != '3.8' && always() + if: matrix.os != 'windows-latest' && always() run: | before="${{ steps.status-before.outputs.BEFORE }}" after="$(git status --porcelain -b)" From d2bb5d3f679dbc81a68b57c132937fc06e075d85 Mon Sep 17 00:00:00 2001 From: Lennart Purucker Date: Wed, 16 Oct 2024 18:13:17 +0200 Subject: [PATCH 3/3] fix: delete non cleaned up test dirs --- tests/conftest.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 62fe3c7e8..81c7c0d5a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -25,6 +25,7 @@ import logging import os +import shutil from pathlib import Path import pytest @@ -164,6 +165,15 @@ def pytest_sessionfinish() -> None: # Local file deletion new_file_list = read_file_list() compare_delete_files(file_list, new_file_list) + + # Delete any test dirs that remain + # In edge cases due to a mixture of pytest parametrization and oslo concurrency, + # some file lock are created after leaving the test. This removes these files! + test_files_dir=Path(__file__).parent.parent / "openml" + for f in test_files_dir.glob("tests.*"): + if f.is_dir(): + shutil.rmtree(f) + logger.info("Local files deleted") logger.info(f"{worker} is killed")