Implement Viaduct backend
Categories
(Firefox :: Sync, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: eoger, Assigned: eoger)
References
Details
(Whiteboard: SACI)
Attachments
(2 files)
Viaduct is a way for Application Services Rust components (https://github.com/mozilla/application-services) to make network requests using gecko.
I suspect some other in-tree Rust users might want such a capability too.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
I suspect some other in-tree Rust users might want such a capability too.
For reference: https://github.com/mozilla/application-services/issues/2930. (That said we've been using it for a lot of stuff without issues, but we also know the kinds of things we're looking for from servers).
Comment 4•5 years ago
|
||
(In reply to Edouard Oger [:eoger] from comment #0)
I suspect some other in-tree Rust users might want such a capability too.
I feel seen. Lemme just add a quick See Also here...
Comment 7•5 years ago
|
||
Backed out 2 changesets (bug 1628068) for ViaductRequest.cpp related bustages
Backout link: https://hg.mozilla.org/integration/autoland/rev/059578fc663a4b18ada37c93f583df80dbbe6ce8
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=301776792&repo=autoland&lineNumber=19207
...
[task 2020-05-11T19:54:07.597Z] 19:54:07 INFO - [encoding_c 0.9.7] cargo:include-dir=/builds/worker/checkouts/gecko/third_party/rust/encoding_c/include
[task 2020-05-11T19:54:07.597Z] 19:54:07 INFO - Running `/builds/worker/workspace/obj-build/release/build/lucet-wasi-2b191ae17f8ed620/build-script-build`
[task 2020-05-11T19:54:07.597Z] 19:54:07 INFO - Running `/builds/worker/workspace/obj-build/release/build/cose-0fed5d53752e3b6d/build-script-build`
[task 2020-05-11T19:54:07.597Z] 19:54:07 INFO - Compiling http v0.2.0
[task 2020-05-11T19:54:07.598Z] 19:54:07 ERROR - [anyhow 1.0.28] error[E0554]: `#![feature]` may not be used on the stable release channel
[task 2020-05-11T19:54:07.598Z] 19:54:07 INFO - [anyhow 1.0.28] --> /builds/worker/workspace/obj-build/release/build/anyhow-2fb262225263c2f8/out/probe.rs:2:5
[task 2020-05-11T19:54:07.598Z] 19:54:07 INFO - [anyhow 1.0.28] |
[task 2020-05-11T19:54:07.598Z] 19:54:07 INFO - [anyhow 1.0.28] 2 | #![feature(backtrace)]
[task 2020-05-11T19:54:07.598Z] 19:54:07 INFO - [anyhow 1.0.28] | ^^^^^^^^^^^^^^^^^^^^^^
[task 2020-05-11T19:54:07.598Z] 19:54:07 INFO - [anyhow 1.0.28]
[task 2020-05-11T19:54:07.598Z] 19:54:07 INFO - Running `CARGO=/builds/worker/fetches/rustc/bin/cargo CARGO_MANIFEST_DIR=/builds/worker/checkouts/gecko/third_party/rust/http CARGO_PKG_AUTHORS='Alex Crichton <alex@alexcrichton.com>:Carl Lerche <me@carllerche.com>:Sean McArthur <sean@seanmonstar.com>' CARGO_PKG_DESCRIPTION='A set of types for representing HTTP requests and responses.
[task 2020-05-11T19:54:07.598Z] 19:54:07 INFO - ' CARGO_PKG_HOMEPAGE= CARGO_PKG_NAME=http CARGO_PKG_REPOSITORY='https://github.com/hyperium/http' CARGO_PKG_VERSION=0.2.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE= LD_LIBRARY_PATH='/builds/worker/workspace/obj-build/release/deps:/builds/worker/fetches/rustc/lib:/builds/worker/fetches/clang/lib:/builds/worker/fetches/clang/lib32' /builds/worker/fetches/sccache/sccache /builds/worker/fetches/rustc/bin/rustc --crate-name http --edition=2018 /builds/worker/checkouts/gecko/third_party/rust/http/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C metadata=2f37b6fc2c00bd20 -C extra-filename=-2f37b6fc2c00bd20 --out-dir /builds/worker/workspace/obj-build/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/builds/worker/checkouts/gecko/build/cargo-linker -L dependency=/builds/worker/workspace/obj-build/x86_64-unknown-linux-gnu/release/deps -L dependency=/builds/worker/workspace/obj-build/release/deps --extern bytes=/builds/worker/workspace/obj-build/x86_64-unknown-linux-gnu/release/deps/libbytes-89a11ceb29576901.rmeta --extern fnv=/builds/worker/workspace/obj-build/x86_64-unknown-linux-gnu/release/deps/libfnv-c1384af85553b793.rmeta --extern itoa=/builds/worker/workspace/obj-build/x86_64-unknown-linux-gnu/release/deps/libitoa-58d8159d1eff9ccd.rmeta --cap-lints warn -C opt-level=2 -C debuginfo=2 -C force-frame-pointers=yes -Dwarnings -C codegen-units=1`
[task 2020-05-11T19:54:07.598Z] 19:54:07 ERROR - [anyhow 1.0.28] error: aborting due to previous error
[task 2020-05-11T19:54:07.599Z] 19:54:07 INFO - [anyhow 1.0.28]
[task 2020-05-11T19:54:07.599Z] 19:54:07 INFO - [anyhow 1.0.28] For more information about this error, try `rustc --explain E0554`.
[task 2020-05-11T19:54:07.599Z] 19:54:07 INFO - Running `/builds/worker/workspace/obj-build/release/build/encoding_c_mem-a71970bebc9cc07f/build-script-build`
[task 2020-05-11T19:54:07.599Z] 19:54:07 INFO - [encoding_c_mem 0.2.5] cargo:rerun-if-changed=
[task 2020-05-11T19:54:07.599Z] 19:54:07 INFO - [encoding_c_mem 0.2.5] cargo:include-dir=/builds/worker/checkouts/gecko/third_party/rust/encoding_c_mem/include
[task 2020-05-11T19:54:07.599Z] 19:54:07 INFO - Running `/builds/worker/workspace/obj-build/release/build/authenticator-bf89e37cd1076531/build-script-build`
...
...
[task 2020-05-11T20:08:23.282Z] 20:08:23 INFO - make[4]: Entering directory '/builds/worker/workspace/obj-build/toolkit/components/viaduct'
[task 2020-05-11T20:08:23.286Z] 20:08:23 INFO - /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -std=gnu++17 -o Unified_cpp_components_viaduct0.o -c -I/builds/worker/workspace/obj-build/dist/stl_wrappers -I/builds/worker/workspace/obj-build/dist/system_wrappers -include /builds/worker/checkouts/gecko/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/toolkit/components/viaduct -I/builds/worker/workspace/obj-build/toolkit/components/viaduct -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/checkouts/gecko/ipc/glue -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fcrash-diagnostics-dir=/builds/worker/artifacts -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -fno-omit-frame-pointer -funwind-tables -Werror -fexperimental-new-pass-manager -MD -MP -MF .deps/Unified_cpp_components_viaduct0.o.pp Unified_cpp_components_viaduct0.cpp
[task 2020-05-11T20:08:23.287Z] 20:08:23 INFO - In file included from Unified_cpp_components_viaduct0.cpp:11:
[task 2020-05-11T20:08:23.287Z] 20:08:23 ERROR - /builds/worker/checkouts/gecko/toolkit/components/viaduct/ViaductRequest.cpp:39:3: error: bad implicit conversion constructor for 'HeaderVisitor'
[task 2020-05-11T20:08:23.287Z] 20:08:23 INFO - HeaderVisitor(google::protobuf::Map<std::string, std::string>* aHeaders)
[task 2020-05-11T20:08:23.287Z] 20:08:23 INFO - ^
[task 2020-05-11T20:08:23.287Z] 20:08:23 INFO - /builds/worker/checkouts/gecko/toolkit/components/viaduct/ViaductRequest.cpp:39:3: note: consider adding the explicit keyword to the constructor
[task 2020-05-11T20:08:23.287Z] 20:08:23 INFO - HeaderVisitor(google::protobuf::Map<std::string, std::string>* aHeaders)
[task 2020-05-11T20:08:23.287Z] 20:08:23 INFO - ^
[task 2020-05-11T20:08:23.287Z] 20:08:23 INFO - explicit
[task 2020-05-11T20:08:23.287Z] 20:08:23 INFO - 1 error generated.
[task 2020-05-11T20:08:23.287Z] 20:08:23 INFO - /builds/worker/checkouts/gecko/config/rules.mk:750: recipe for target 'Unified_cpp_components_viaduct0.o' failed
[task 2020-05-11T20:08:23.287Z] 20:08:23 ERROR - make[4]: *** [Unified_cpp_components_viaduct0.o] Error 1
[task 2020-05-11T20:08:23.287Z] 20:08:23 INFO - make[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/components/viaduct'
[task 2020-05-11T20:08:23.288Z] 20:08:23 INFO - /builds/worker/checkouts/gecko/config/recurse.mk:74: recipe for target 'toolkit/components/viaduct/target-objects' failed
[task 2020-05-11T20:08:23.288Z] 20:08:23 ERROR - make[3]: *** [toolkit/components/viaduct/target-objects] Error 2
[task 2020-05-11T20:08:23.288Z] 20:08:23 INFO - make[3]: *** Waiting for unfinished jobs....
Assignee | ||
Comment 8•5 years ago
|
||
Seems like the 1st issue is just a probe and would not prevent us from compiling anyhow
(https://github.com/dtolnay/anyhow/blob/b51c48ee918f23b6ca6d98c40f01c54fb2cbcfb8/build.rs#L9-L35).
I've pushed a patch for the 2nd issue.
Comment 10•5 years ago
|
||
Backed out 2 changesets (bug 1628068) for ViaductRequest.cpp related bustages
Backout link: https://hg.mozilla.org/integration/autoland/rev/d548cbc23a677054edc3043bed998a7e2c18a5cb
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=301786674&repo=autoland&lineNumber=32918
[task 2020-05-11T20:44:10.800Z] 20:44:10 INFO - /builds/worker/fetches/sccache/sccache /builds/worker/fetches/gcc/bin/g++ -std=gnu++17 -o Unified_cpp_components_viaduct0.o -c -I/builds/worker/workspace/obj-build/dist/stl_wrappers -I/builds/worker/workspace/obj-build/dist/system_wrappers -include /builds/worker/checkouts/gecko/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/toolkit/components/viaduct -I/builds/worker/workspace/obj-build/toolkit/components/viaduct -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/checkouts/gecko/ipc/glue -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wduplicated-cond -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wformat -Wformat-overflow=2 -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -freorder-blocks -O2 -fno-omit-frame-pointer -funwind-tables -Werror -MD -MP -MF .deps/Unified_cpp_components_viaduct0.o.pp Unified_cpp_components_viaduct0.cpp
[task 2020-05-11T20:44:10.800Z] 20:44:10 INFO - In file included from Unified_cpp_components_viaduct0.cpp:11:0:
[task 2020-05-11T20:44:10.800Z] 20:44:10 INFO - /builds/worker/checkouts/gecko/toolkit/components/viaduct/ViaductRequest.cpp: In function 'nsCString mozilla::ConvertMethod(mozilla::appservices::httpconfig::protobuf::Request_Method)':
[task 2020-05-11T20:44:10.800Z] 20:44:10 ERROR - /builds/worker/checkouts/gecko/toolkit/components/viaduct/ViaductRequest.cpp:181:1: error: control reaches end of non-void function [-Werror=return-type]
[task 2020-05-11T20:44:10.800Z] 20:44:10 INFO - }
[task 2020-05-11T20:44:10.801Z] 20:44:10 INFO - ^
[task 2020-05-11T20:44:10.801Z] 20:44:10 INFO - cc1plus: all warnings being treated as errors
[task 2020-05-11T20:44:10.801Z] 20:44:10 INFO - /builds/worker/checkouts/gecko/config/rules.mk:750: recipe for target 'Unified_cpp_components_viaduct0.o' failed
[task 2020-05-11T20:44:10.801Z] 20:44:10 ERROR - make[4]: *** [Unified_cpp_components_viaduct0.o] Error 1
[task 2020-05-11T20:44:10.801Z] 20:44:10 INFO - make[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/components/viaduct'
[task 2020-05-11T20:44:10.801Z] 20:44:10 INFO - /builds/worker/checkouts/gecko/config/recurse.mk:74: recipe for target 'toolkit/components/viaduct/target-objects' failed
[task 2020-05-11T20:44:10.801Z] 20:44:10 ERROR - make[3]: *** [toolkit/components/viaduct/target-objects] Error 2
[task 2020-05-11T20:44:10.801Z] 20:44:10 INFO - make[3]: *** Waiting for unfinished jobs....
Assignee | ||
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
Please consider pushing to try first.
Backed out 2 changesets (bug 1628068) for ViaductRequest.cpp related bustages.
Backout link: https://hg.mozilla.org/integration/autoland/rev/acd33e2a4fb390468d211d1778291ae6786183df
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=301790934&repo=autoland&lineNumber=33931
[task 2020-05-11T21:30:32.418Z] 21:30:32 INFO - z:/build/build/src/toolkit/components/viaduct/fetch_msg_types.pb.cc(686,33): note: consider adding the explicit keyword to the constructor
[task 2020-05-11T21:30:32.418Z] 21:30:32 INFO - Response_HeadersEntry_DoNotUse::Response_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
[task 2020-05-11T21:30:32.418Z] 21:30:32 INFO - ^
[task 2020-05-11T21:30:32.418Z] 21:30:32 INFO - explicit
[task 2020-05-11T21:30:32.418Z] 21:30:32 INFO - 4 errors generated.
[task 2020-05-11T21:30:32.418Z] 21:30:32 INFO - z:/build/build/src/config/rules.mk:750: recipe for target 'Unified_cpp_components_viaduct0.obj' failed
[task 2020-05-11T21:30:32.418Z] 21:30:32 INFO - mozmake.EXE[4]: *** [Unified_cpp_components_viaduct0.obj] Error 1
[task 2020-05-11T21:30:32.418Z] 21:30:32 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/workspace/obj-build/toolkit/components/viaduct'
[task 2020-05-11T21:30:32.419Z] 21:30:32 INFO - z:/build/build/src/config/recurse.mk:74: recipe for target 'toolkit/components/viaduct/target-objects' failed
[task 2020-05-11T21:30:32.419Z] 21:30:32 INFO - mozmake.EXE[3]: *** [toolkit/components/viaduct/target-objects] Error 2
[task 2020-05-11T21:30:32.419Z] 21:30:32 INFO - mozmake.EXE[3]: *** Waiting for unfinished jobs....
Assignee | ||
Comment 13•5 years ago
|
||
Apologies about the previous failures. I've pushed to try against autoland and it looks all green: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8f1a6f7158674498639b2fed65b6326ad8c3eb5a
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e1d5a153eaf7
https://hg.mozilla.org/mozilla-central/rev/c9ca86d98171
Description
•