[MNT] Dockerized tests for CI runs using localhost#1629
[MNT] Dockerized tests for CI runs using localhost#1629satvshr wants to merge 90 commits intoopenml:mainfrom
Conversation
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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1629 +/- ##
=======================================
Coverage 52.82% 52.82%
=======================================
Files 37 37
Lines 4371 4371
=======================================
Hits 2309 2309
Misses 2062 2062 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Armaghan Shakir <raoarmaghanshakir040@gmail.com>
.github/workflows/test.yml
Outdated
| # sed -i 's|/minio/|/data/|g' config/database/update.sh | ||
|
|
||
| # echo "=== Patched Update Script ===" | ||
| # cat config/database/update.sh | grep "nginx" |
There was a problem hiding this comment.
why extra work here? locally just running the services is enough
There was a problem hiding this comment.
Kindly ignore these, the pr isnt ready for review yet as tests are still failing and I was trying to debug tests.
openml/config.py
Outdated
| if sys.platform.startswith("win"): | ||
| TEST_SERVER_URL = "http://localhost" | ||
| else: | ||
| TEST_SERVER_URL = "http://localhost:8000" | ||
|
|
There was a problem hiding this comment.
we should actually use an env variable here, please see https://github.com/openml/openml-python/pull/1629/changes#r2797509441
should be controlled by that env variable, which if not set, should default to use https://test.openml.org/
There was a problem hiding this comment.
This is not how I plan to resolve this either, just a temporary fix to the windows issue.
|
The tests are taking too long because |
Will do that to prevent hold ups for other CIs in the repo, for my branch it is noticeable if a run is going to fail if it has been stuck on a single test for more than a minute. |
yeah but each job in this PR still takes full 150 minutes |
openml/config.py
Outdated
| "avoid_duplicate_runs": False, | ||
| "retry_policy": "human", | ||
| "connection_n_retries": 5, | ||
| "connection_n_retries": 1, |
There was a problem hiding this comment.
I don't think this would work, since we change this again in conftest.py.
To be completely sure that this works, you can temporarily set n_retries = 1 in _api_calls.py::_send_request
tests/test_flows/test_flow.py
Outdated
| f"collected from {__file__.split('/')[-1]}: {flow.flow_id}", | ||
| ) | ||
|
|
||
| @pytest.mark.skip(reason="Pending resolution of #1657") |
There was a problem hiding this comment.
skip these only if OPENML_USE_LOCAL_SERVICES is set to True
geetu040
left a comment
There was a problem hiding this comment.
I don't think any failing test is coming from this PR. It would be better to conditionally skip them and link #1657. If there is new failure message which is not already mentioned there, then please comment down the failure with the failing tests so it could be tracked there. Also if some tests are failing because of pandas, create a separate issue for that, skip and link to these then.
| files: coverage.xml | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| fail_ci_if_error: true | ||
| verbose: true |
There was a problem hiding this comment.
why is this part moved above?
There was a problem hiding this comment.
Codecov was giving errors, I do not recall why the errors were occurring.
| if os.getenv("OPENML_USE_LOCAL_SERVICES") == "true": | ||
| openml.config.TEST_SERVER_URL = "http://localhost:8000" |
There was a problem hiding this comment.
There was a problem hiding this comment.
First thing that comes to mind is the fact that something pertaining to the testing env should be kept in conftest, though I have no hard opinion on this. If it is more convenient for you I can move it to config too.
geetu040
left a comment
There was a problem hiding this comment.
Looks good, this has not been addressed yet #1629 (comment)
openml/config.py
Outdated
| "avoid_duplicate_runs": False, | ||
| "retry_policy": "human", | ||
| "connection_n_retries": 5, | ||
| "connection_n_retries": 1, |
There was a problem hiding this comment.
Was just waiting to see if tests pass before reverting all changes, apologies!
openml/_api_calls.py
Outdated
| md5_checksum: str | None = None, | ||
| ) -> requests.Response: | ||
| n_retries = max(1, config.connection_n_retries) | ||
| n_retries = 1 |
Metadata
Details
This PR implements the setting up of the v1 and v2 test servers in CI using docker via
localhost.