mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 17:02:56 +00:00
wip
This commit is contained in:
@@ -151,19 +151,24 @@ pub async fn get_available_extensions(
|
||||
for extension in enabled_extensions {
|
||||
let ext_data = &all_extension_data[&extension];
|
||||
for (control_file, control_contents) in &ext_data.control_data {
|
||||
let extension_name = control_file
|
||||
.strip_suffix(".control")
|
||||
.expect("control files must end in .control");
|
||||
ext_remote_paths.insert(
|
||||
extension_name.to_string(),
|
||||
RemotePath::from_string(&ext_data.archive_path)?,
|
||||
);
|
||||
|
||||
let control_path = local_sharedir.join(control_file);
|
||||
info!("writing file {:?}{:?}", control_path, control_contents);
|
||||
file_create_tasks.push(tokio::fs::write(control_path, control_contents));
|
||||
}
|
||||
ext_remote_paths.insert(
|
||||
extension.to_string(),
|
||||
RemotePath::from_string(&ext_data.archive_path)?,
|
||||
);
|
||||
}
|
||||
let results = join_all(file_create_tasks).await;
|
||||
for result in results {
|
||||
result?;
|
||||
}
|
||||
info!("ext_remote_paths {:?}", ext_remote_paths);
|
||||
Ok((ext_remote_paths, library_index))
|
||||
}
|
||||
|
||||
|
||||
@@ -205,8 +205,8 @@ def test_interrupted_extension(
|
||||
neon_env_builder: NeonEnvBuilder,
|
||||
pg_version: PgVersion,
|
||||
):
|
||||
# if "15" in pg_version: # SKIP v15 for now
|
||||
# return None
|
||||
if "15" in pg_version: # SKIP v15 for now
|
||||
return None
|
||||
|
||||
neon_env_builder.enable_remote_storage(
|
||||
remote_storage_kind=RemoteStorageKind.REAL_S3,
|
||||
@@ -228,32 +228,32 @@ def test_interrupted_extension(
|
||||
)
|
||||
with closing(endpoint.connect()) as conn:
|
||||
with conn.cursor() as cur:
|
||||
cur.execute("CREATE EXTENSION 'address_standardizer-3';")
|
||||
# cur.execute("CREATE EXTENSION address_standardizer;")
|
||||
cur.execute("CREATE EXTENSION address_standardizer_data_us;")
|
||||
# execute query to ensure that it works
|
||||
cur.execute(
|
||||
"SELECT house_num, name, suftype, city, country, state, unit \
|
||||
FROM standardize_address('us_lex', 'us_gaz', 'us_rules', \
|
||||
'One Devonshire Place, PH 301, Boston, MA 02109;"
|
||||
'One Rust Place, Boston, MA 02109');"
|
||||
)
|
||||
# the endpoint is closed now
|
||||
# remove postgis files locally
|
||||
cleanup(pg_version)
|
||||
|
||||
"""
|
||||
# spin up compute node again (there are no postgis files available, because compute is stateless)
|
||||
endpoint = env.endpoints.create_start(
|
||||
"test_remote_library",
|
||||
tenant_id=tenant_id,
|
||||
remote_ext_config=env.ext_remote_storage.to_string(),
|
||||
)
|
||||
# connect to postrgres and execute the query again
|
||||
with closing(endpoint.connect()) as conn:
|
||||
with conn.cursor() as cur:
|
||||
cur.execute("CREATE EXTENSION address_standardizer-3;")
|
||||
# execute query to ensure that it works
|
||||
cur.execute(
|
||||
"SELECT house_num, name, suftype, city, country, state, unit \
|
||||
FROM standardize_address('us_lex', 'us_gaz', 'us_rules', \
|
||||
'One Devonshire Place, PH 301, Boston, MA 02109;"
|
||||
)
|
||||
"""
|
||||
# # spin up compute node again (there are no postgis files available, because compute is stateless)
|
||||
# endpoint = env.endpoints.create_start(
|
||||
# "test_remote_library",
|
||||
# tenant_id=tenant_id,
|
||||
# remote_ext_config=env.ext_remote_storage.to_string(),
|
||||
# )
|
||||
# # connect to postrgres and execute the query again
|
||||
# with closing(endpoint.connect()) as conn:
|
||||
# with conn.cursor() as cur:
|
||||
# cur.execute("CREATE EXTENSION address_standardizer;")
|
||||
# cur.execute("CREATE EXTENSION address_standardizer_data_us;")
|
||||
# # execute query to ensure that it works
|
||||
# cur.execute(
|
||||
# "SELECT house_num, name, suftype, city, country, state, unit \
|
||||
# FROM standardize_address('us_lex', 'us_gaz', 'us_rules', \
|
||||
# 'One Rust Place, Boston, MA 02109');"
|
||||
# )
|
||||
|
||||
Reference in New Issue
Block a user