Repository navigation
task template: import sqlite3 before pandas so pytest starts in images with an old system libstdc++ - #41
Open
ArjunS07 wants to merge 1 commit into
Open
task template: import sqlite3 before pandas so pytest starts in images with an old system libstdc++#41ArjunS07 wants to merge 1 commit into
ArjunS07 wants to merge 1 commit into
Conversation
In some task images pandas loads the system libstdc++ first, and the env's libicu (needed by sqlite3, which coverage imports) then fails with CXXABI_1.3.15 not found. pytest.main raised, and the runner recorded no tests.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose: In some task images,
pytest.mainraisesImportError: ... libstdc++.so.6: version 'CXXABI_1.3.15' not found (required by .../libicui18n.so.78). The runner then records no tests, and the trial is gradedunverifiedunless snapshots ran. This PR loadssqlite3before pandas, so the env's libstdc++ is the one in the process.How it works:
flowchart LR A["-p jinja_patch_plugin_pandas"] --> B["import sqlite3: libicu loads the env's libstdc++"] B --> C["import pandas"] C --> D["pytest-cov imports coverage, which imports sqlite3"]Changes:
template/tests/jinja_patch_plugin_pandas.pyimportssqlite3first, insidetry./lib/x86_64-linux-gnu/libstdc++.so.6. The pytest-cov plugin then importedcoverage, thensqlite3, and_sqlite3failed to load.main()caught the exception and wrotestrategy: null,changed_files: [].Verification:
Real image
fc-task/geopandas__geopandas__3151:d7542f43e0f2, no network, the oracle patch applied,pytest_runner.py --base <sha> --extra-args "-p jinja_patch_plugin_pandas":ImportErrorfrom_sqlite3, 0 tests (the message is from the runner in #40, which writes it tonote)strategy: changed-files->tests, 4 test files, 383 passed and 4 skipped with the patch, 382 pass at base, 0 regressedNotes:
strategy: null, no pytest output).