Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 2c15d16

Browse files
authored
Implement force-install and update extension (#5368)
1 parent 84b4d0a commit 2c15d16

File tree

36 files changed

+4172
-3959
lines changed

36 files changed

+4172
-3959
lines changed

extension/algo/test/test_files/basic.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
-CASE InstallOfficialExtension
66
-STATEMENT INSTALL algo FROM 'http://localhost/extension/repo/'
7-
---- 1
8-
Extension: algo has been installed from repo: http://localhost/extension/repo/.
7+
---- ok
98
-STATEMENT load algo
109
---- ok
1110
-STATEMENT load algo

extension/delta/src/installer/delta_install_func.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ extern "C" {
99
#define INIT_EXPORT __attribute__((visibility("default")))
1010
#endif
1111
INIT_EXPORT void install(const std::string& repo, kuzu::main::ClientContext& context) {
12-
kuzu::extension::InstallExtensionInfo info{"delta", repo};
12+
kuzu::extension::InstallExtensionInfo info{"delta", repo, false /* forceInstall */};
1313
kuzu::duckdb_extension::DuckDBInstaller installer{info, context};
1414
installer.install();
1515
}

extension/delta/test/test_files/delta.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ Ethan|28|1800.600000|1996-03-10 00:00:00
9191

9292
-CASE InstallOfficialExtension
9393
-STATEMENT INSTALL DELTA FROM 'http://localhost/extension/repo/'
94-
---- 1
95-
Extension: delta has been installed from repo: http://localhost/extension/repo/.
94+
---- ok
9695
-STATEMENT load extension DELTA
9796
---- ok
9897
-LOG LoadFromLocalDeltaTable

extension/duckdb/src/include/installer/duckdb_installer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class KUZU_API DuckDBInstaller final : public extension::ExtensionInstaller {
1010
DuckDBInstaller(const extension::InstallExtensionInfo& info, main::ClientContext& context)
1111
: ExtensionInstaller{info, context} {}
1212

13-
void install() override;
13+
bool install() override;
1414
};
1515

1616
} // namespace duckdb_extension

extension/duckdb/src/installer/duckdb_install_func.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ extern "C" {
99
#define INIT_EXPORT __attribute__((visibility("default")))
1010
#endif
1111
INIT_EXPORT void install(const std::string& repo, kuzu::main::ClientContext& context) {
12-
kuzu::extension::InstallExtensionInfo info{"duckdb", repo};
12+
kuzu::extension::InstallExtensionInfo info{"duckdb", repo, false /* forceInstall */};
1313
kuzu::duckdb_extension::DuckDBInstaller installer{info, context};
1414
installer.install();
1515
}

extension/duckdb/src/installer/duckdb_installer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace kuzu {
77
namespace duckdb_extension {
88

9-
void DuckDBInstaller::install() {
9+
bool DuckDBInstaller::install() {
1010
auto loaderFileRepoInfo =
1111
extension::ExtensionUtils::getExtensionLoaderRepoInfo(info.name, info.repo);
1212
auto localLoaderFilePath =
@@ -23,6 +23,7 @@ void DuckDBInstaller::install() {
2323
tryDownloadExtensionFile(dependencyLibRepoInfo, localDependencyLibPath);
2424
}
2525
}
26+
return true;
2627
}
2728

2829
} // namespace duckdb_extension

extension/duckdb/test/test_files/duckdb.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ Runtime exception: No loaded extension can handle database type: sqlite.
307307

308308
-CASE InstallOfficialExtension
309309
-STATEMENT INSTALL duckdb FROM 'http://localhost/extension/repo/'
310-
---- 1
311-
Extension: duckdb has been installed from repo: http://localhost/extension/repo/.
310+
---- ok
312311
-STATEMENT load extension duckdb
313312
---- ok
314313
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/tinysnb.db' as tinysnb (dbtype duckdb, skip_unsupported_table = true);

extension/fts/test/test_files/basic.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ title3
308308

309309
-CASE InstallOfficialExtension
310310
-STATEMENT INSTALL fts FROM 'http://localhost/extension/repo/'
311-
---- 1
312-
Extension: fts has been installed from repo: http://localhost/extension/repo/.
311+
---- ok
313312
-STATEMENT load fts
314313
---- ok
315314
-STATEMENT CALL CREATE_FTS_INDEX('Book', 'book_index', ['abstract', 'author', 'title'], stemmer := 'porter');

extension/httpfs/test/test_files/http.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ Binder exception: Attaching a kuzu database without an alias is not allowed.
164164

165165
-CASE InstallOfficialExtension
166166
-STATEMENT INSTALL httpfs FROM 'http://localhost/extension/repo/'
167-
---- 1
168-
Extension: httpfs has been installed from repo: http://localhost/extension/repo/.
167+
---- ok
169168
-STATEMENT load extension httpfs
170169
---- ok
171170
-STATEMENT load from "http://localhost/dataset/tinysnb/vPerson.csv" return * limit 5;

extension/iceberg/src/installer/iceberg_install_func.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ extern "C" {
99
#define INIT_EXPORT __attribute__((visibility("default")))
1010
#endif
1111
INIT_EXPORT void install(const std::string& repo, kuzu::main::ClientContext& context) {
12-
kuzu::extension::InstallExtensionInfo info{"iceberg", repo};
12+
kuzu::extension::InstallExtensionInfo info{"iceberg", repo, false /* forceInstall */};
1313
kuzu::duckdb_extension::DuckDBInstaller installer{info, context};
1414
installer.install();
1515
}

0 commit comments

Comments
 (0)