From 5e89308940331312aaabfe611e83ec250d4d16f4 Mon Sep 17 00:00:00 2001 From: Keewis Date: Sat, 14 Nov 2020 01:26:19 +0100 Subject: [PATCH 01/10] try to warn on allowed failure --- ci/azure/unit-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/azure/unit-tests.yml b/ci/azure/unit-tests.yml index cd94792b9c6..141e399db82 100644 --- a/ci/azure/unit-tests.yml +++ b/ci/azure/unit-tests.yml @@ -15,7 +15,8 @@ steps: --junitxml=junit/test-results.xml \ --cov=xarray \ --cov-report=xml \ - $(pytest_extra_flags) || [ "$ALLOW_FAILURE" = "true" ] + $(pytest_extra_flags) \ + || ([ "$ALLOW_FAILURE" = "true" ] && echo -e "\043#vso[task.logissue type=warning]Ignored CI failure!!") displayName: Run tests - bash: | From 03073bd5f83b68288be14d33faa26c2679b4db03 Mon Sep 17 00:00:00 2001 From: Keewis Date: Sat, 14 Nov 2020 01:27:20 +0100 Subject: [PATCH 02/10] allow failures on upstream-dev --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7adaf194266..5198af82ad8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,6 +28,7 @@ jobs: py38-upstream-dev: conda_env: py38 upstream_dev: true + allow_failure: true py38-flaky: conda_env: py38 pytest_extra_flags: --run-flaky --run-network-tests From 96a6e1deb9da2363a223df2b7b54721366ba8d55 Mon Sep 17 00:00:00 2001 From: Keewis Date: Sat, 14 Nov 2020 01:28:46 +0100 Subject: [PATCH 03/10] install pynio to intentionally fail the upstream-dev CI --- ci/azure/install.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/azure/install.yml b/ci/azure/install.yml index 83895eebe01..28c8912c83a 100644 --- a/ci/azure/install.yml +++ b/ci/azure/install.yml @@ -27,6 +27,7 @@ steps: pint \ bottleneck \ sparse + conda install -c conda-forge pynio python -m pip install \ -i https://pypi.anaconda.org/scipy-wheels-nightly/simple \ --no-deps \ From bfc1827315fd0dcea27a69967b26dc66b7d49082 Mon Sep 17 00:00:00 2001 From: Keewis Date: Sat, 14 Nov 2020 02:01:15 +0100 Subject: [PATCH 04/10] install pynio before uninstalling other packages --- ci/azure/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/azure/install.yml b/ci/azure/install.yml index 28c8912c83a..5dd80f97f4f 100644 --- a/ci/azure/install.yml +++ b/ci/azure/install.yml @@ -14,6 +14,7 @@ steps: # NumPy again: https://github.com/pydata/xarray/issues/4146 - bash: | source activate xarray-tests + conda install -c conda-forge pynio conda uninstall -y --force \ numpy \ scipy \ @@ -27,7 +28,6 @@ steps: pint \ bottleneck \ sparse - conda install -c conda-forge pynio python -m pip install \ -i https://pypi.anaconda.org/scipy-wheels-nightly/simple \ --no-deps \ From 553a5e6e07de242bbe0b723bd01c6bdf67347fdb Mon Sep 17 00:00:00 2001 From: Keewis Date: Sat, 14 Nov 2020 02:33:23 +0100 Subject: [PATCH 05/10] fail a flaky test instead of installing a incompatible library --- ci/azure/install.yml | 1 - xarray/tests/test_tutorial.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/azure/install.yml b/ci/azure/install.yml index 5dd80f97f4f..83895eebe01 100644 --- a/ci/azure/install.yml +++ b/ci/azure/install.yml @@ -14,7 +14,6 @@ steps: # NumPy again: https://github.com/pydata/xarray/issues/4146 - bash: | source activate xarray-tests - conda install -c conda-forge pynio conda uninstall -y --force \ numpy \ scipy \ diff --git a/xarray/tests/test_tutorial.py b/xarray/tests/test_tutorial.py index a2eb159f624..2011f67fbca 100644 --- a/xarray/tests/test_tutorial.py +++ b/xarray/tests/test_tutorial.py @@ -30,3 +30,6 @@ def test_download_from_github_load_without_cache(self): ds_nocache = tutorial.open_dataset(self.testfile, cache=False).load() ds_cache = tutorial.open_dataset(self.testfile).load() assert_identical(ds_cache, ds_nocache) + + def test_failing(self): + assert False From 904feef567b713c4f9412e89d12a393c49bc2b42 Mon Sep 17 00:00:00 2001 From: Keewis Date: Sat, 14 Nov 2020 14:17:46 +0100 Subject: [PATCH 06/10] try changing to error --- ci/azure/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/azure/unit-tests.yml b/ci/azure/unit-tests.yml index 141e399db82..a7b11eadf68 100644 --- a/ci/azure/unit-tests.yml +++ b/ci/azure/unit-tests.yml @@ -16,7 +16,7 @@ steps: --cov=xarray \ --cov-report=xml \ $(pytest_extra_flags) \ - || ([ "$ALLOW_FAILURE" = "true" ] && echo -e "\043#vso[task.logissue type=warning]Ignored CI failure!!") + || ([ "$ALLOW_FAILURE" = "true" ] && echo -e "\043#vso[task.logissue type=error]Ignored CI failure!!") displayName: Run tests - bash: | From 131c3576b749e33446d1c510e40de55afc426986 Mon Sep 17 00:00:00 2001 From: Keewis Date: Sat, 14 Nov 2020 15:18:54 +0100 Subject: [PATCH 07/10] try setting the result --- ci/azure/unit-tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/azure/unit-tests.yml b/ci/azure/unit-tests.yml index a7b11eadf68..dac28f96c61 100644 --- a/ci/azure/unit-tests.yml +++ b/ci/azure/unit-tests.yml @@ -16,7 +16,11 @@ steps: --cov=xarray \ --cov-report=xml \ $(pytest_extra_flags) \ - || ([ "$ALLOW_FAILURE" = "true" ] && echo -e "\043#vso[task.logissue type=error]Ignored CI failure!!") + || ( \ + [ "$ALLOW_FAILURE" = "true" ] \ + && echo -e "\043#vso[task.logissue type=warning]Ignored CI failure!!" \ + && echo -e "\043#vso[task.complete result=SucceededWithIssues]" \ + ) displayName: Run tests - bash: | From 8ca46278fd17bc537ef765110f85678be93d76f7 Mon Sep 17 00:00:00 2001 From: keewis Date: Tue, 17 Nov 2020 18:42:43 +0100 Subject: [PATCH 08/10] Update ci/azure/unit-tests.yml Co-authored-by: Mathias Hauser --- ci/azure/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/azure/unit-tests.yml b/ci/azure/unit-tests.yml index dac28f96c61..bbcc707eb1c 100644 --- a/ci/azure/unit-tests.yml +++ b/ci/azure/unit-tests.yml @@ -18,7 +18,7 @@ steps: $(pytest_extra_flags) \ || ( \ [ "$ALLOW_FAILURE" = "true" ] \ - && echo -e "\043#vso[task.logissue type=warning]Ignored CI failure!!" \ + && echo -e "\043#vso[task.logissue type=warning]Allowed CI failure!!" \ && echo -e "\043#vso[task.complete result=SucceededWithIssues]" \ ) displayName: Run tests From ca3b36f6ca8e7e355edbe2293d98281ecb2e996b Mon Sep 17 00:00:00 2001 From: Keewis Date: Wed, 18 Nov 2020 15:47:29 +0100 Subject: [PATCH 09/10] remove the intentionally failed test --- xarray/tests/test_tutorial.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/xarray/tests/test_tutorial.py b/xarray/tests/test_tutorial.py index 2011f67fbca..a2eb159f624 100644 --- a/xarray/tests/test_tutorial.py +++ b/xarray/tests/test_tutorial.py @@ -30,6 +30,3 @@ def test_download_from_github_load_without_cache(self): ds_nocache = tutorial.open_dataset(self.testfile, cache=False).load() ds_cache = tutorial.open_dataset(self.testfile).load() assert_identical(ds_cache, ds_nocache) - - def test_failing(self): - assert False From bc71825b6d7a56374ab19994b5824fee10467395 Mon Sep 17 00:00:00 2001 From: Keewis Date: Sun, 22 Nov 2020 00:02:12 +0100 Subject: [PATCH 10/10] don't use the escape code for '#' --- ci/azure/unit-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/azure/unit-tests.yml b/ci/azure/unit-tests.yml index bbcc707eb1c..14e2b3ad82f 100644 --- a/ci/azure/unit-tests.yml +++ b/ci/azure/unit-tests.yml @@ -18,8 +18,8 @@ steps: $(pytest_extra_flags) \ || ( \ [ "$ALLOW_FAILURE" = "true" ] \ - && echo -e "\043#vso[task.logissue type=warning]Allowed CI failure!!" \ - && echo -e "\043#vso[task.complete result=SucceededWithIssues]" \ + && echo "##vso[task.logissue type=warning]Allowed CI failure!!" \ + && echo "##vso[task.complete result=SucceededWithIssues]" \ ) displayName: Run tests