diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e93465ca..0d2255c4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -113,7 +113,9 @@ jobs: if: matrix.os == 'ubuntu-latest' id: clone-services run: | - git clone --depth 1 https://github.com/openml/services.git + # 2026-11-05: Services switched to SeaweedFS and the MinIO client cannot handle the new URLs. + # We use the old stack until we have migrated away from the MinIO client + git clone --revision dd8b98a9e0450bf487f973e1711c8b00dc022294 --depth 1 https://github.com/openml/services.git - name: Start Docker Services id: start-services diff --git a/tests/test_api/test_datasets.py b/tests/test_api/test_datasets.py index b809a734c..e104f3fb0 100644 --- a/tests/test_api/test_datasets.py +++ b/tests/test_api/test_datasets.py @@ -126,14 +126,27 @@ def test_v1_get_qualities(dataset_v1): reason="Test requires admin key. Set OPENML_TEST_SERVER_ADMIN_KEY environment variable.", ) @pytest.mark.test_server -def test_v1_status_update(dataset_v1): +def test_v1_status_update(dataset_v1, static_cache_dir): openml.config.apikey = TestBase.admin_key + arff_file_path = ( + static_cache_dir + / "org" + / "openml" + / "test" + / "data" + / "download" + / "1666876" + / "phpFsFYVN" + / "body.arff" + ) new_dataset = OpenMLDataset( - f"TEST-{time.time()!s}-UploadTestWithURL", + f"TEST-{time.time()!s}-UploadTestWithFile", "test", - "ARFF", + data_format="arff", version=1, - url="https://www.openml.org/data/download/61/dataset_61_iris.arff", + licence="public", + default_target_attribute="class", + data_file=arff_file_path, ) new_dataset.publish() _status_update_check(dataset_v1, new_dataset.dataset_id, "deactivated") diff --git a/tests/test_datasets/test_dataset_functions.py b/tests/test_datasets/test_dataset_functions.py index 5f0ba5e4f..f71dc3858 100644 --- a/tests/test_datasets/test_dataset_functions.py +++ b/tests/test_datasets/test_dataset_functions.py @@ -547,10 +547,18 @@ def _assert_status_of_dataset(self, *, did: int, status: str): @pytest.mark.test_server def test_data_status(self): arff_file_path = ( - self.static_cache_dir / "org" / "openml" / "test" / "datasets" / "2" / "dataset.arff" + self.static_cache_dir + / "org" + / "openml" + / "test" + / "data" + / "download" + / "1666876" + / "phpFsFYVN" + / "body.arff" ) dataset = OpenMLDataset( - "anneal", + f"TEST-{time.time()!s}-UploadTestWithFile", "test", data_format="arff", version=1, @@ -559,6 +567,7 @@ def test_data_status(self): data_file=arff_file_path, ) dataset.publish() + dataset.publish() TestBase._mark_entity_for_removal("data", dataset.dataset_id) TestBase.logger.info( f"collected from {__file__.split('/')[-1]}: {dataset.dataset_id}", diff --git a/tests/test_flows/test_flow.py b/tests/test_flows/test_flow.py index a6130371a..4c4581089 100644 --- a/tests/test_flows/test_flow.py +++ b/tests/test_flows/test_flow.py @@ -128,6 +128,7 @@ def test_get_structure(): def test_tagging(): + # Not possible as a marker since autouse fixtures change the configuration flows = openml.flows.list_flows(size=1) flow_id = flows["id"].iloc[0] flow = openml.flows.get_flow(flow_id) @@ -136,7 +137,17 @@ def test_tagging(): tag = f"test_tag_TestFlow_{unique_indicator}" flows = openml.flows.list_flows(tag=tag) assert len(flows) == 0 - flow.push_tag(tag) + try: + flow.push_tag(tag) + except openml.exceptions.OpenMLServerException as e: + # pytest.mark.xfail doesn't work because the autouse fixtures change server config + reason = "There is an issue with Elasticsearch on the test server since Oct 2026." + test_server = openml.config.get_server_base_url() == "https://test.openml.org" + elastic_search_error = "Elastic Search" in e.message + if test_server and elastic_search_error: + pytest.xfail(reason) + raise + flows = openml.flows.list_flows(tag=tag) assert len(flows) == 1 assert flow_id in flows["id"].values