Skip to content

Migrate/minio to boto3 - #1790

Open
L-Agbaria wants to merge 6 commits into
openml:mainfrom
L-Agbaria:migrate/minio-to-boto3
Open

L-Agbaria wants to merge 6 commits into
openml:mainfrom
L-Agbaria:migrate/minio-to-boto3

Conversation

@L-Agbaria

Copy link
Copy Markdown
Member

First iteration of the change, created a new S3Client class which is meant to take over the MinIOClient class.
Added a very basic test that will need to be further developed, ensured that all tests point to the same S3 client instead of MinIO.

There are still some failing tests, this is not the final version but is a partial update to allow for incremental checking and verification.

Metadata

  • Reference Issue: Change MinIO to boto3 #1789
  • New Tests Added: Yes
  • Change Log Entry: Created S3Client and migrated MinIOClient uses to it.

@codecov-commenter

codecov-commenter commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.79661% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.10%. Comparing base (ccb5244) to head (5531ad9).

Files with missing lines Patch % Lines
openml/_api/clients/s3.py 63.54% 35 Missing ⚠️
openml/_api/resources/dataset.py 71.42% 2 Missing ⚠️
openml/_api/setup/backend.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1790       +/-   ##
===========================================
+ Coverage   49.48%   80.10%   +30.61%     
===========================================
  Files          63       63               
  Lines        5565     5543       -22     
===========================================
+ Hits         2754     4440     +1686     
+ Misses       2811     1103     -1708     

☔ View full report in Codecov by Harness.
📢 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.

@PGijsbers PGijsbers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! First off: good job! You may see a lot of comments in the pull request, but don't let that scare you. They are mostly some feedback on how to write clearer/more useful comments, and some minor refactoring suggestions. The refactoring suggestions are actually mostly talking about code that already existed before and you merely migrated. I thought in those cases it may be a good opportunity to address those concerns now if they are easy to pick up. There are also some comments that simply ask some questions and/or leave a note on something we probably should look at later (it wasn't really in scope for the PR).

Comment thread openml/_api/clients/s3.py Resolved
Comment thread openml/_api/clients/s3.py Resolved
Comment thread openml/_api/clients/s3.py Resolved
Comment thread openml/_api/clients/s3.py Resolved
Comment thread openml/_api/clients/s3.py Resolved
Comment on lines 395 to 399
def test__get_dataset_parquet_file_does_not_exist(self):
description = {
"oml:parquet_url": "http://data.openml.org/dataset20/does_not_exist.pq",
"oml:parquet_url": "https://data.openml.org/dataset20/does_not_exist.pq",
"oml:id": "20",
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thought:
Seems like there is overlap with test__download_s3_file_object_does_not_exist. This tests the higher level and the other the lower level. Not sure if we need to keep both, but if we do we probably want to mock the lower level behavior in the test of the higher level so they test different behaviour.

def test__get_dataset_parquet_file_does_not_exist(self):
description = {
"oml:parquet_url": "http://data.openml.org/dataset20/does_not_exist.pq",
"oml:parquet_url": "https://data.openml.org/dataset20/does_not_exist.pq",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similar to test__download_s3_file_object_does_not_exist, we do not care about the server state so there is no need to use a production url. Let's also improve this test by targetting the test server.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(and let's update the URL to be the modern format e.g. [prefix?]/datasets/0000/0020/does_not_exist.pq.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this one behaves weird when modified, code doesn't print when only print statements are added, breaks any other way.

Comment thread openml/_api/clients/s3.py Resolved
Comment thread tests/test_openml/test_api_calls.py Resolved

This branch has not been deployed

No deployments
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.

3 participants