Skip to content

Conversation

@satvshr
Copy link
Contributor

@satvshr satvshr commented Jan 29, 2026

Metadata

Details

  • What does this PR implement/fix? Explain your changes.
    This PR implements the setting up of the v1 and v2 test servers in CI using docker via localhost.

PGijsbers and others added 11 commits January 20, 2026 12:35
Locally, MinIO already has more parquet files than on the test server.
Note that the previously strategy didn't work anymore if the server
returned a parquet file, which is the case for the new local setup.
This means it is not reliant on the evaluation engine processing the
dataset. Interestingly, the database state purposely seems to keep
the last task's dataset in preparation explicitly (by having
processing marked as done but having to dataset_status entry).
@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.74%. Comparing base (99928f8) to head (bbfa193).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
openml/cli.py 0.00% 1 Missing ⚠️
openml/datasets/dataset.py 0.00% 1 Missing ⚠️
openml/tasks/functions.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1629       +/-   ##
===========================================
+ Coverage   52.75%   69.74%   +16.98%     
===========================================
  Files          36       36               
  Lines        4333     4333               
===========================================
+ Hits         2286     3022      +736     
+ Misses       2047     1311      -736     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@satvshr satvshr marked this pull request as ready for review January 31, 2026 16:13
@satvshr satvshr marked this pull request as draft January 31, 2026 16:14
@satvshr
Copy link
Contributor Author

satvshr commented Feb 6, 2026

openml/rest-api:0.0.1-alpha image for the rest (v2) api for my note.

@satvshr
Copy link
Contributor Author

satvshr commented Feb 10, 2026

@geetu040 Doesn't #1630 close #1614 ? If services PR 13 and 15 add the v1 and v2 apis to the services repo, and #1630 allows them to be used as a test_server on changing TEST_SERVER_URL to http://localhost:8000 what is the point of this PR again?

Edit: I think the only thing I can do in addition to Peter's PR is run the setup during CI, so I close this PR and open a new one stacking on #1630 and adding this additional functionality.

@fkiraly fkiraly changed the title [MNT] Intermediate test plan [MNT] Dockerized tests for local test runs Feb 10, 2026
@geetu040
Copy link
Collaborator

Doesn't #1630 close #1614 ? If services PR 13 and 15 add the v1 and v2 apis to the services repo, and #1630 allows them to be used as a test_server on changing TEST_SERVER_URL to http://localhost:8000 what is the point of this PR again?

#1630 adds variable TEST_SERVER_URL throughout the sdk to easily configure test-server path.

Point of this PR is to get the docker services running in the CI.

Edit: I think the only thing I can do in addition to Peter's PR is run the setup during CI, so I close this PR and open a new one stacking on #1630 and adding this additional functionality.

Keep this PR, how it already is pointing to main. For now just focus on adding the services in the CI. We need to see how long do the services take to setup in the CI, based on that, we can move forward with replacing remote test-server configured with local test-server in the CI. By then we'll see if we need to stack on top of Pieter's PR if it's not already merged to main.

@satvshr satvshr changed the title [MNT] Dockerized tests for local test runs [MNT] Dockerized tests for CI runs using localhost Feb 11, 2026
Copy link
Collaborator

@geetu040 geetu040 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. merge 1630 into this PR, mention in PR description that it's stacked over
  2. then use local-host api in TEST_SERVER_URL
  3. remove the marker "uses_test_server" in test.yml

and let's see what happens in the CI

Copy link
Collaborator

@geetu040 geetu040 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do you set the TEST_SERVER_URL from env in tests?

@satvshr
Copy link
Contributor Author

satvshr commented Feb 12, 2026

where do you set the TEST_SERVER_URL from env in tests?

I was going to remove that given it is not needed right now, TEST_SERVER_URL = "https://test.openml.org" is harcoded in config.py

working-directory: ./services
run: |
sudo systemctl stop mysql.service
docker compose --profile rest-api --profile minio --profile evaluation-engine up -d
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to run evaluation-engine?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add env var

OPENML_USE_LOCAL_SERVICES: "true"

Comment on lines 129 to 131
run: |
timeout 180s bash -c 'until curl -sSf http://localhost:8000/api/v1/xml/data/1 > /dev/null; do
echo "Server still booting... retrying in 5s";
sleep 5;
done'
curl -I http://localhost:8000/api/v1/task/1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
run: |
timeout 180s bash -c 'until curl -sSf http://localhost:8000/api/v1/xml/data/1 > /dev/null; do
echo "Server still booting... retrying in 5s";
sleep 5;
done'
curl -I http://localhost:8000/api/v1/task/1
run: |
echo "Waiting for API to become available..."
timeout 30s bash -c 'until curl -sSf http://localhost:8080/api/v1/task/1 > /dev/null; do sleep 2; done'
echo "Response:"
curl http://localhost:8080/api/v1/task/1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to what there was earlier, changed it the previous commit and was going to revert it after CIs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to what there was earlier, changed it the previous commit and was going to revert it after CIs

yield
return
openml.config.server = "https://test.openml.org/api/v1/xml"
openml.config.server = f"{openml.config.TEST_SERVER_URL}/api/v1/xml"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the env variable OPENML_USE_LOCAL_SERVICES and update server accordingly

@pytest.fixture(autouse=True)
def with_server(request):
    if os.getenv("OPENML_USE_LOCAL_SERVICES") == "true":
        openml.config.TEST_SERVER_URL = "http://localhost:8080"

    if "production" in request.keywords:
        openml.config.server = "https://www.openml.org/api/v1/xml"
        openml.config.apikey = None
        yield
        return
    openml.config.server = f"{openml.config.TEST_SERVER_URL}/api/v1/xml"
    openml.config.apikey = TestBase.user_key
    yield

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MNT] Intermediate test plan

4 participants