feat: add local containerized deployments
Deploying hydro with
Cloudflare Pages
| Latest commit: |
7bfa5ff
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://35d40e9b.hydroflow.pages.dev |
| Branch Preview URL: | https://containerized-deployments.hydroflow.pages.dev |
Is there an example I can run to test locally?
Is there an example I can run to test locally?
yes, the best example is hydro_lang/src/tests/hydro_deploy/docker(). With this PR you can just click 'run test' in vscode via rust analyzer and it should work.
Getting a linking error running on mac, will debug
warning: dropping unsupported crate type `dylib` for target `x86_64-unknown-linux-musl` error: linking with `cc` failed: exit status: 1 | = note: "cc" "-m64" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crt1.o" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crti.o" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtbegin.o" "/var/folders/j5/nnm2mj9n6qx_539z2l2lw8dm0000gq/T/rustcxQP2hn/symbols.o" "<6 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/Users/mingwes/Projects/hydro/target/hydro_trybuild/x86_64-unknown-linux-musl/debug/deps/{libhydro_lang_hydro_trybuild,libhydro_lang-a7ee5e053335000c,libstageleft_tool-03acd1d1260f10a3,libsyn_inline_mod-3ab0c92abc8f11a0,libindenter-5f5ba038784b08f8,liburlencoding-540e7688561909ed,libwebbrowser-86bf5659f7baeb35,libbacktrace-3bc5128c61a6a91f,libobject-27c07bc88ddb92f4,libaddr2line-937be8320d9ee1ba,libgimli-347b9cd13dd90b71,librustc_demangle-bb3cfa20eb8fb1e3,libclap-b270e11854790ed3,libclap_builder-fb26e119a3462b08,libstrsim-29f83d5c1341e4ab,libanstream-788b4e060315a8b0,libanstyle_query-04f281a9cfbb96ba,libis_terminal_polyfill-e7a5201012d2faa8,libcolorchoice-1a86c65a55b71bb5,libanstyle_parse-6804d90f8d7f27aa,libutf8parse-03db90a1f69ad1e4,libclap_lex-10a4ad439007c7bd,libanstyle-62d9ff8b852cdf24,libtrybuild_internals_api-a89180b6b14b2565,libtoml-851fe0ef046bc7c3,libtoml_edit-be8ab8e0738406d3,libserde_spanned-cf1428f710dde33f,libtoml_write-496d0bf5b526db51,libtoml_datetime-6740319467db67e8,libglob-e9bdcda3a5a2104b,libtermcolor-7d9e138c9b97a2c9,libbolero_hydro-6b07115a49e64ff5,librand-6d2cf32ee22732c2,librand_chacha-820238965a3afeb7,libbolero_engine_hydro-cf68b37443e914b9,librand_xoshiro-187fd21d7211986f,libpretty_hex-236429accb361911,libbolero_generator_hydro-2e2920ab032cdf07,librand_core-186fda9e4b9f2434,liblibloading-c3e011b0a41a90d3}.rlib" "-ldl" "/Users/mingwes/Projects/hydro/target/hydro_trybuild/x86_64-unknown-linux-musl/debug/deps/{libtar-3b7984e183b010a2,libxattr-ac4d49379097b6a5,libfiletime-e33ec2913c058132,libbollard-fdadb5a74b087eb8,libserde_urlencoded-4e80ebefa503f919,libbollard_stubs-2c9b52e74e549e7e,libserde_with-72fabe7b17dacced,liburl-4383f58d718030e0,libidna-568ee5c899673922,libutf8_iter-aca5b43481ead24e,libidna_adapter-f51b6f1ff02ec9ea,libicu_properties-0a194b89b1088ca2,libicu_properties_data-fea99a19e0b4e9a5,libicu_normalizer-4bd9e19375a8695f,libicu_normalizer_data-244a2be0ab0a6bbc,libicu_collections-eca028bf4ad8e0c5,libpotential_utf-5c09e7a85d15d26c,libicu_provider-007b88f714cecaa3,libicu_locale_core-de1dc6e44621bf88,libtinystr-561c18b7910067d6,liblitemap-9e9f0b2ae4ecf759,libwriteable-a175d071605e3527,libzerovec-c37db80e073e0403,libzerotrie-82c90a23f40eb36d,libyoke-5d86cf88c031c145,libstable_deref_trait-2f013e3f6292c9bb,libzerofrom-73b243b31acd9111,libform_urlencoded-b743a5afc55d0794,libpercent_encoding-0a4237101c720977,libhyperlocal-b146600e7c032d9f,libhyper_util-240348adaaa710a9,libtower_service-d823fd3857ed639c,libhyper-7d2c89ffa86a1e5d,libwant-ef549b96f7b30cce,libtry_lock-2c510176eff08c6f,libhttparse-54cb48371ced67a1,libatomic_waker-7a9a1e49d5556da1,libhttpdate-2727d221aec51da1,libhttp_body_util-bc8cf3a4c438d66c,libhttp_body-742629ead23cedf9,libhttp-8096a62a539a42f7,libfnv-e6dba1036e501a4b,libbase64-5399aee338f576b6,libhydro_deploy-89c9ac2d9c613790,libblake3-1ae635ce61a6b9e1,libconstant_time_eq-3038f322c88f4c61,libarrayref-f34547548d35bdc4,libdunce-2156a5a69c760186,libshell_escape-a8990a6911fb808b,libdyn_clone-b42e45f0a8c67b40,libmemo_map-f09a95fb040ca653,libcargo_metadata-3c8d9b28d3112def,libcargo_platform-b600316bdbc8d97d,libsemver-60f48a1d8563e2aa,libcamino-eec8f75bb99472c6,libnameof-40406eaa4695be76,libnanoid-59eb97ce7d447ede,libasync_ssh2_russh-03b78e2e175c4880,libasync_promise-a5bac7354cff95ca,librussh_sftp-305ab28bd86a8f4c,libflurry-793be04fdab1ef9a,libnum_cpus-b101ef64d8976b0c,libseize-fd96739c5a873d58,librussh-bd1c5f4f456281e3,libhome-27f7788ab2ad1f06,libmd5-1281fd2b4885c4aa,librussh_util-61a96a6f32d16d44,libdata_encoding-00786596986d8169,libnum_bigint-3124b3cca1e78e73,libhex_literal-854509892b82c650,libinternal_russh_forked_ssh_key-d7fc0ce563c530f2,libed25519_dalek-098cf2a1a58a75e5,libcurve25519_dalek-b739301fc6acb2eb,libed25519-e7fad4dfb3457ffe,libp521-e3a1c66400b374ef,libp384-1b1e282f27f20d95,libp256-a064d3566de5f1fe,libecdsa-13609c22cd6d6d24,librfc6979-250a7dc0918f65d2,libprimeorder-a7654ecf873ffb9f,libelliptic_curve-032d517d198e959a,libhkdf-2594853ee4384a44,libcrypto_bigint-38ff27e44f37dea4,libgroup-0dd896a6f6cc2fe9,libff-f359b05d07748348,libargon2-612ab352772051be,libblake2-2cf7d0ef7dfd4a65,libpassword_hash-4cd67c3ef2274590,libsha1-e059d547f994cff2,libbcrypt_pbkdf-1f50d76e2af7e572,libblowfish-03c3d19f20204dbe,libssh_cipher-f5c58349d8133081,libaes_gcm-b2e051ab8d3dff53,libctr-3c7872dafa6a6fe6,libghash-ada6d0257e9d4615,libpolyval-8769f0b69678c238,libaead-a3a624d6faa62971,libpoly1305-acd5f2640b13d5d9,libopaque_debug-ca8f1837f1962b3e,libuniversal_hash-cfc3656a958aa55b,libchacha20-a185ad8fd4a3b7b0,librsa-e078c3b152f59aaf,libpkcs1-2b886a67edde0f38,libsignature-807370ec718746e1,libnum_bigint_dig-b231d8079b128a0e,liblibm-376a5cd592820ee3,libnum_iter-6a39b6d9885417af,librand-7284bd303486dc47,librand_chacha-b8b8ee533d45c5bd,libppv_lite86-760457f3f5e59fcc,libnum_integer-83eeda7be4152f5e,libsec1-5e542bf162ee347e,libpkcs8-f65a1adb3ec47c96,libpkcs5-f29825539eedefeb,libaes-2e58d1b440bc37cb,libspki-502bdd01ed7b3499,libscrypt-223e0b1797097ce2,libsalsa20-7247b6ba18bf6386,libpbkdf2-d5119cc4e64f7d14,libhmac-b2c81beb40ae47ea,libcbc-40f0f58167afd03a,libcipher-55a71ffb25b95662,libinout-918de4e377cee5a8,libblock_padding-c046c694e591d0e4,libder-3a2e24c0b45f758f,libbase16ct-ce27e216df0c5778,libthiserror-f4d10ae8b22a6c0e,librussh_cryptovec-87477d1f82c62fd0,libssh_encoding-754d079792b5ae5b,libsha2-17febd14f3c288a1,libcpufeatures-ae35a5d3966dafb9,libdigest-fd4cbf7f020f2b2e,libsubtle-469a4ce59def86f7,libconst_oid-781521dcfc5e9444,libblock_buffer-d70547f47e187431,libcrypto_common-d5514079274dcccb,libgeneric_array-e1aef7efc78956d5,libtypenum-5fefee56fdc1b160,libzeroize-782f178310c8abfd,librand_core-4dcc10821fc61214,libgetrandom-356d8a869d51cdfa,libpem_rfc7468-02abf6719098109c,libbase64ct-52ca43e9ccb1704a,libnix-2bce5ac4ba3df886,libinferno-77a6090b4d0c68c1,libcrossbeam_channel-c9719101f41b8f6c,libnum_format-343044a1e91b9c3d,libarrayvec-cd7e4f30eec4cd96,libstr_stack-86f2d697f1db58d2,libquick_xml-0aef4db257157cfd,librgb-a2b7f1ff309c546c,libis_terminal-e4377bc729c84a52,libdashmap-851237ba9d60c516,libasync_process-7b9539122821c59b,libasync_signal-04bdd80f65a23783,libasync_lock-d2374d2e4cdaa3d6,libasync_task-3fcf4a29bddcb027,libasync_channel-426b88f379fb4aa5,libevent_listener_strategy-d9f493f6b247177f,libevent_listener-f9ce58739c1b2e2f,libasync_io-db099296850c5936,libpolling-62c67bf9ab6470f9,libconcurrent_queue-59887b7d3e7c6e87,libcrossbeam_utils-ae557da423744771,libfutures_lite-69e2e9794356b79d,libparking-42174ea1ed49e7e6,libindicatif-5d549cc165b6c91d,libportable_atomic-82b07a1a46f4b5f0,libnumber_prefix-b40e20af889a0d63,libconsole-19a0cd7564a82cda,libunicode_width-d804133040360a5b,libanyhow-318b08516dcfccd4,libtracing_subscriber-bff863cb46ced3e5,libsharded_slab-1b08a85a73870d40,liblazy_static-70ce54407ad0b83b,libspin-7cfb13c466e5bef4,libmatchers-6782d9af08a8cfe4,libregex_automata-15ab8f136b5bcf73,libregex_syntax-98254ee04cc153c7,libnu_ansi_term-bfb27a8f7dd59e43,libthread_local-421ac67e8c0dcdb9,libtracing_log-1436a7e17942280f,liblog-9110c880660a8e44,libprocfs-f7b1862a36afb268,libflate2-952257d3c35a9aac,libminiz_oxide-55b81ff56428540c,libsimd_adler32-c325ef75f39d4bd4,libcrc32fast-330b94375149686a,librustix-9333f3e26c371f05,liblinux_raw_sys-36941285707446d3,libprocfs_core-244f69f50fdfb267,libhex-14c2ea82339c5a55,libchrono-c2813093d78c6e4e,libiana_time_zone-0b6f9b17972307a9,libnum_traits-3cc550ae375039ba,libstageleft-e6c29f538cf3d157,libctor-ba9c742b67df95ff,libdtor-ad77956d39debb64,libproc_macro_crate-e270221a3b5db64a,libtoml_edit-a0f73f136dc31684,libtoml_parser-6a5187faa27e077f,libwinnow-812f196509ad48e6,libtoml_datetime-2e7f354d2145f5e2,libindexmap-32c98a2012f4b3bc,libequivalent-c8c247d69d2b246d,libhashbrown-ae70d8d147a94f59,libdfir_rs-fcd4a075d5f31976,librustc_hash-27bf4461ff3bef17,libhydro_deploy_integration-7882ba544994d3c8,libsinktools-1458d4a1bd477c01,libtempfile-4def0f959a88c47a,libfastrand-ba9dbf792b7c4d73,librustix-b56d4a8bd4f35f11,libbitflags-6b2751d312be80a0,liblinux_raw_sys-125940e805021ff7,libtokio_util-f6d0d853a2e88f39,libtokio_stream-c37795d7f333741b,libtracing-e1aece114ca732ca,libtracing_core-5219f9a5b869498d,libref_cast-48d7336cb86ff998,libdfir_lang-fcfb98f6834b81ad,libprettyplease-f8e3ddf3dfc1d36f,libserde_json-64d32aec10108538,libitoa-cd3ad312050f960e,libryu-29ab11f103913d45,libdocumented-6fe5f411c078ecf7,libthiserror-e1092c184adf149a,libphf-eb79a0ba1f6afe74,libphf_shared-842ce6fbae73030c,libsiphasher-cb3bbd58dda7dcc4,libsyn-48834374730a2ede,libslotmap-befd2fb483b0b27d,libquote-fe482a24d97c68b0,libproc_macro2-6a57237d43e13dc2,libunicode_ident-d3ee91b85c8197de}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib/{libproc_macro-*,librustc_literal_escaper-*,librustc_std_workspace_std-*}.rlib" "/Users/mingwes/Projects/hydro/target/hydro_trybuild/x86_64-unknown-linux-musl/debug/deps/{libweb_time-eb81ef2976a14903,libtokio-77d528e4b85210fb,libsignal_hook_registry-e4cfabcf33594dba,libsocket2-9b8986acbce450c0,libbytes-2b007915ed0b1482,libmio-8e71df96113237cb,libparking_lot-58c79cdadb47140f,libparking_lot_core-43152af17edc83b5,liblock_api-da024249d5dc8d92,libscopeguard-0e8c48bb1ba2cf91,liblattices-f41078bfc45e559f,libroaring-9fa2d42ae39ee936,libbytemuck-3f0f838b6d9be3a8,libbyteorder-ff4e6c407457c7df,libfst-c9f6f2b355a15f8b,libvariadics-3fd6003898084f9c,libhashbrown-4368b1b983dd82a0,libahash-b39c64210a3cde5a,libgetrandom-ebee78937d29acb3,liblibc-9ced839fcbd0fcfb,libonce_cell-77e177fb901921ed,libcfg_if-0c7421dafb4364c4,libzerocopy-60f999837c1c5af5,liballocator_api2-72dbf66dacf4ffaa,libcc_traits-70374ed1e45d8856,libitertools-5d91834ce6a2af48,libeither-e320355ef6bf6c52,libsmallvec-0af471b51a0fa62e,libfutures-cac5f5bca827dee8,libfutures_executor-d94f710742551b09,libfutures_util-7ded1b8a5cae1278,libmemchr-af67178f5eb92efc,libfutures_io-024f405e0d7b863f,libslab-1831b6865272a471,libfutures_channel-bbe45aceb711cc7d,libpin_project_lite-a3e346d3f3ed91ae,libfutures_sink-656d86ae2a39769f,libfutures_task-847df79aa338c0b1,libpin_utils-dab5e1ef15f264e4,libfutures_core-e1731737d3a710b6,libbincode-84dc450f0e8c3ea8,libserde-7bf776db14cff199,libserde_core-26a8b0c8487caa71,libcolored-92285c4a0d5d8488}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*}.rlib" "-lunwind" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-*.rlib" "-lc" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib/{librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-L" "/var/folders/j5/nnm2mj9n6qx_539z2l2lw8dm0000gq/T/rustcxQP2hn/raw-dylibs" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib" "-o" "/Users/mingwes/Projects/hydro/target/hydro_trybuild/x86_64-unknown-linux-musl/debug/examples/hy_p4_eg7pp3_oi98sg_4_BA57E4F6-c96fb5ad6f22aeaa" "-Wl,--gc-sections" "-static" "-Wl,-z,relro,-z,now" "-Wl,--strip-all" "-nodefaultlibs" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtend.o" "<sysroot>/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtn.o" = note: some arguments are omitted. use `--verbose` to show all linker arguments = note: ld: unknown options: --as-needed -Bstatic -Bdynamic --eh-frame-hdr -z --gc-sections -z -z --strip-all clang: error: linker command failed with exit code 1 (use -v to see invocation)
you need to install the musl cross-compiler. I think there's an easy way to do that via homebrew. on AL2 I had to compile the cross-compiler myself:
% which x86_64-linux-musl-ld
~/git/musl-cross-make/output/bin/x86_64-linux-musl-ld
I have the linker and docker working, seems TcpStream::connect is timing out:
as_bincode_source_connecting: to=172.19.0.3 to_port=1001
thread 'tests::hydro_deploy::docker' (28842513) panicked at hydro_lang/src/deploy/deploy_graph_containerized.rs:390:18:
called `Result::unwrap()` on an `Err` value: Os { code: 60, kind: TimedOut, message: "Operation timed out" }
fn as_bincode_source<T>(...)
let stream = TcpStream::connect(format!("{remote_ip_address}:{remote_port}"))
.await
.unwrap();