mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 17:02:56 +00:00
more debugging
This commit is contained in:
@@ -55,6 +55,8 @@ use compute_tools::monitor::launch_monitor;
|
||||
use compute_tools::params::*;
|
||||
use compute_tools::spec::*;
|
||||
|
||||
use tokio::runtime::Runtime;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
init_tracing_and_logging(DEFAULT_LOG_LEVEL)?;
|
||||
|
||||
@@ -78,12 +80,16 @@ fn main() -> Result<()> {
|
||||
warn!("you certainly must build changes if you want rust changes to be built");
|
||||
std::fs::write("alek/yay", remote_ext_bucket.clone())?;
|
||||
|
||||
// compute_tools::extension_server::download_file(
|
||||
// "test_ext.control",
|
||||
// remote_ext_bucket.into(),
|
||||
// remote_ext_region.into(),
|
||||
// )
|
||||
// .await?;
|
||||
let mut rt = Runtime::new().unwrap();
|
||||
rt.block_on(async move {
|
||||
compute_tools::extension_server::download_file(
|
||||
"test_ext.control",
|
||||
remote_ext_bucket.into(),
|
||||
remote_ext_region.into(),
|
||||
)
|
||||
.await
|
||||
.expect("download should work");
|
||||
});
|
||||
|
||||
let http_port = *matches
|
||||
.get_one::<u16>("http-port")
|
||||
|
||||
@@ -90,14 +90,17 @@ pub async fn download_extension(
|
||||
let libdir = get_pg_config("--libdir");
|
||||
let remote_storage = GenericRemoteStorage::from_config(config)?;
|
||||
|
||||
// just doing a testing thing
|
||||
let folder = RemotePath::new(Path::new("public_extensions"))?;
|
||||
let from_paths = remote_storage.list_files(Some(&folder)).await?;
|
||||
let some_path = from_paths[0]
|
||||
.object_name()
|
||||
.expect("had a problem with somepath in extension server");
|
||||
fs::write("alek/SOMEPATH", some_path)?;
|
||||
std::fs::write("alek/proof", "proof")?;
|
||||
|
||||
// // this is just for testing doing a testing thing
|
||||
// let folder = RemotePath::new(Path::new("public_extensions"))?;
|
||||
// let from_paths = remote_storage.list_files(Some(&folder)).await?;
|
||||
// let some_path = from_paths[0]
|
||||
// .object_name()
|
||||
// .expect("had a problem with somepath in extension server");
|
||||
// fs::write("alek/SOMEPATH", some_path)?;
|
||||
|
||||
// // this is the real thing
|
||||
// match ext_type {
|
||||
// ExtensionType::Shared => {
|
||||
// // 1. Download control files from s3-bucket/public/*.control to SHAREDIR/extension
|
||||
|
||||
@@ -343,6 +343,7 @@ async fn serve(port: u16, state: Arc<ComputeNode>) {
|
||||
pub fn launch_http_server(port: u16, state: &Arc<ComputeNode>) -> Result<thread::JoinHandle<()>> {
|
||||
let state = Arc::clone(state);
|
||||
|
||||
// TODO: remote print statements
|
||||
let xxx = format!("ROUTING port: {port}");
|
||||
std::fs::write("alek/ROUTES", xxx).expect("routing write file");
|
||||
|
||||
|
||||
@@ -82,10 +82,11 @@ def test_file_download(neon_env_builder: NeonEnvBuilder):
|
||||
|
||||
# step 5 attempt 2
|
||||
# TODO: I'm not even remotely confident this is the correct port
|
||||
# response = requests.post("http://localhost:8080/extension_server/postgis-3.so")
|
||||
log.info("*\n" * 100)
|
||||
log.info("IMPORTANT")
|
||||
# log.info(response.content)
|
||||
# response = requests.post("http://localhost:15000/extension_server/postgis-3.so")
|
||||
# log.info("*\n" * 100)
|
||||
# log.info("IMPORTANT")
|
||||
# log.info(str(env.neon_cli.__dict__["env"].__dict__))
|
||||
# log.info(response.content.decode("utf-8"))
|
||||
|
||||
with closing(endpoint.connect()) as conn:
|
||||
with conn.cursor() as cur:
|
||||
|
||||
Reference in New Issue
Block a user