-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[Unittester] Add autoloading option #18266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
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
…ilable` and `all`
e9be7b4
to
f62d94d
Compare
Moved on |
Mytherin
added a commit
that referenced
this pull request
Jul 17, 2025
This is #18266 on `v1.3-ossivalis`, plus fix from #18289. This is a stripped down version of #18230, that adds support for `--autoloading none|available|all` to unittester, without removing support for previous mode (via env variable `LOCAL_EXTENSION_REPO`). Keeping both possibility in place is somehow less nice, but has the big advantage that can disentangle fixing issues connected to rolling-in this in CI and allows for easier backport of this if deemed useful. After this PR, the following modes are available for running unittester: #### `--autoloading none` or `` (this is the default) Same as current default, only statically linked extensions are ever used. `require` in test will run a test only if the needed extension is statically linked-in. #### `LOCAL_EXTENSION_REPO=path/to/repo` This stays as now. `LOCAL_EXTENSION_REPO` points to the repository folder. `require` in tests will run a test only if the needed extension is statically linked-in OR if the extension is autoloadable No checks are performed, so setting LOCAL_EXTENSION_REPO will fail tests at runtime where a given extension is not present on the local machine. #### `--autoloading available` This is similar to the previous, but: If defined `LOCAL_EXTENSION_REPO` points to the repository folder, otherwise `build/$BUILD_MODE/repository` will be used (the default where builds place extensions) `require` in tests will run a test only if: * the needed extension is statically linked-in * OR if the extension is autoloadable and available (in this case INSTALL will be performed on require, LOAD via autoloading) * OR if the extension is not autoloadable and available (in this case both INSTALL and LOAD to be performed on require) #### `--autoloading all` This is similar to the previous with regard to `LOCAL_EXTENSION_REPO` `require` in tests will run a test always: * if the extension is autoloadable, both INSTALL and LOAD to happen at runtime * if the extension is not autoloadable, both INSTALL and LOAD to be performed on `require` This mode require either to have a complete set of extensions or pre-filtering the tests to be executed, since `require aws` with aws extension not available will be a test failure. An interesting usage for `--autoloading all` is paired with setting `LOCAL_EXTENSION_REPO=http://extensions.duckdb.org`, since this will correspond to use the remote available extensions (if there). --- Limitation of current PR: * information about whether a PR is statically linked in is implied from the fact that a given extension can be installed, and NOT from the list of statically linked in extensions. This can be improved on. * this is currently not run on CI due to 3 issues: * run_tests_one_by_one.py needs to be adapted to take more arguments * some `vss` and `spatial` tests needs to be adapted due to missing `requires` * this allow easier to backport this PR, if one would find that handy
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.
This is a stripped down version of #18230, that adds support for
--autoloading none|available|all
to unittester, without removing support for previous mode (via env variableLOCAL_EXTENSION_REPO
). Keeping both possibility in place is somehow less nice, but has the big advantage that can disentangle fixing issues connected to rolling-in this in CI and allows for easier backport of this if deemed useful.After this PR, the following modes are available for running unittester:
--autoloading none
or `` (this is the default)Same as current default, only statically linked extensions are ever used.
require
in test will run a test only if the needed extension is statically linked-in.LOCAL_EXTENSION_REPO=path/to/repo
This stays as now.
LOCAL_EXTENSION_REPO
points to the repository folder.require
in tests will run a test only if the needed extension is statically linked-in OR if the extension is autoloadableNo checks are performed, so setting LOCAL_EXTENSION_REPO will fail tests at runtime where a given extension is not present on the local machine.
--autoloading available
This is similar to the previous, but:
If defined
LOCAL_EXTENSION_REPO
points to the repository folder, otherwisebuild/$BUILD_MODE/repository
will be used (the default where builds place extensions)require
in tests will run a test only if:--autoloading all
This is similar to the previous with regard to
LOCAL_EXTENSION_REPO
require
in tests will run a test always:require
This mode require either to have a complete set of extensions or pre-filtering the tests to be executed, since
require aws
with aws extension not available will be a test failure.An interesting usage for
--autoloading all
is paired with settingLOCAL_EXTENSION_REPO=http://extensions.duckdb.org
, since this will correspond to use the remote available extensions (if there).Limitation of current PR:
vss
andspatial
tests needs to be adapted due to missingrequires