Re: [PR] Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]

2025-04-17 Thread via GitHub


alamb commented on PR #329:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/329#issuecomment-2812870336

   FYI @kylebarron  could you perhaps take a look at this?
   
   Also, FYI @XiangpengHao  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]

2025-04-17 Thread via GitHub


alamb commented on code in PR #329:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/329#discussion_r2048922084


##
tests/http.rs:
##
@@ -41,3 +44,23 @@ async fn test_http_store_gzip() {
 .await
 .unwrap();
 }
+
+#[cfg(all(feature = "http", target_arch = "wasm32", target_os = "unknown"))]
+#[wasm_bindgen_test]
+async fn basic_wasm_get() {

Review Comment:
   I verified this runs in CI: 
https://github.com/apache/arrow-rs-object-store/actions/runs/14505171194/job/40723998384?pr=329#step:11:138
   
   ```
   warning: `object_store` (lib) generated 1 warning
   warning: `object_store` (lib test) generated 4 warnings (run `cargo fix 
--lib -p object_store --tests` to apply 3 suggestions)
   Finished `test` profile [unoptimized + debuginfo] target(s) in 0.11s
Running unittests src/lib.rs 
(target/wasm32-unknown-unknown/debug/deps/object_store-4bf7d6aa80f96256.wasm)
   no tests to run!
Running tests/http.rs 
(target/wasm32-unknown-unknown/debug/deps/http-0715721c2cebdfb7.wasm)
 
   Executing bindgen...  
 
   running 1 test
   test basic_wasm_get ... ok
   
   test result: ok. 1 passed; 0 failed; 0 ignored; 0 filtered out; finished in 
0.36s
   
   ```
   
   So looks good to me



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]

2025-04-16 Thread via GitHub


alamb commented on PR #329:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/329#issuecomment-2810235262

   Looks like there are some CI failures: 
https://github.com/apache/arrow-rs-object-store/actions/runs/14495449031/job/40672770867?pr=329


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]

2025-04-16 Thread via GitHub


alamb commented on PR #329:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/329#issuecomment-2810225288

   kicked off the tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]

2025-04-16 Thread via GitHub


alamb commented on code in PR #329:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/329#discussion_r2047391347


##
.github/workflows/ci.yml:
##
@@ -192,6 +192,10 @@ jobs:
 run: rustup target add wasm32-wasip1
   - name: Build wasm32-wasip1
 run: cargo build --all-features --target wasm32-wasip1
+  - name: Install wasm-pack
+run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf 
| sh
+  - name: Run wasm32-unknown-unknown tests (via Node)

Review Comment:
   nice



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]

2025-04-16 Thread via GitHub


H-Plus-Time commented on PR #329:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/329#issuecomment-2809839782

   That should do it I think - that one test covers a sizable chunk of the 
wasm-specific code; put/post requests would be the only other aspect worth 
testing I think.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]

2025-04-16 Thread via GitHub


alamb commented on PR #329:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/329#issuecomment-2809158952

   Thanks @H-Plus-Time  🙏 
   
   (Note I will be out next week so I may be delated in responding)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]

2025-04-15 Thread via GitHub


H-Plus-Time commented on PR #329:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/329#issuecomment-2807878631

   I tested through object-store-wasm (which provided all the wasm-bindgen 
bindings to create object store instances and so on from JS), but a reasonable 
approach would be:
   1. A single wasm-bindgen'd method that sets up a simple `HttpStore` pointing 
to localhost, and does a selection of simple operations (head, full get, ranged 
get) on a pre-defined object.
   2. Spin up a http server on localhost (serving static files, specifically 
that pre-defined object).
   3. Import, instantiate and run that wasm-bindgen'd module in a NodeJS script.
   
   wasm-bindgen-test essentially does 1 and 3, a simple startup and teardown 
script for the server component would be all that's needed for 2.
   
   It shouldn't be too much trouble, I'll get something basic together in the 
next few days.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]

2025-04-09 Thread via GitHub


H-Plus-Time commented on code in PR #329:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/329#discussion_r2036436249


##
src/client/body.rs:
##
@@ -49,6 +49,14 @@ impl HttpRequestBody {
 }
 }
 
+#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
+pub(crate) fn into_reqwest(self) -> reqwest::Body {
+match self.0 {
+Inner::Bytes(b) => b.into(),
+Inner::PutPayload(_, payload) => 
Intointo(payload).into(),

Review Comment:
   :facepalm: ah, of course.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Default wasm32-unknown-unknown HttpConnector [arrow-rs-object-store]

2025-04-09 Thread via GitHub


kylebarron commented on code in PR #329:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/329#discussion_r2036422015


##
src/client/body.rs:
##
@@ -49,6 +49,14 @@ impl HttpRequestBody {
 }
 }
 
+#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
+pub(crate) fn into_reqwest(self) -> reqwest::Body {
+match self.0 {
+Inner::Bytes(b) => b.into(),
+Inner::PutPayload(_, payload) => 
Intointo(payload).into(),

Review Comment:
   nit: Is this the same as `Bytes::from(payload).into()`? IMO that might read 
slightly easier.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org