Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SQL storage using new p2panda_rs storage provider traits #80

Merged
merged 39 commits into from
Apr 28, 2022

Conversation

sandreae
Copy link
Member

@sandreae sandreae commented Mar 15, 2022

Refactor the existing SQL implementation to use p2panda/p2panda#274

馃搵 Checklist

  • Add tests that cover your changes
  • Add this PR to the Unreleased section in CHANGELOG.md
  • Link this PR to any issues it closes
  • New files contain a SPDX license header

@sandreae
Copy link
Member Author

Just updating this PR to use the new StorageProvider API and merging aquadoggo main. I'm hittung a few errors I don't quite understand. One is:

error[E0277]: the trait bound `fn(GraphQLRequest, axum::extract::Extension<ApiState>) -> impl futures::Future<Output = GraphQLResponse> {handle_graphql_query}: Handler<_, _>` is not satisfied
   --> aquadoggo/src/server.rs:63:49
    |
63  |             get(handle_graphql_playground).post(handle_graphql_query),
    |                                            ---- ^^^^^^^^^^^^^^^^^^^^ the trait `Handler<_, _>` is not implemented for `fn(GraphQLRequest, axum::extract::Extension<ApiState>) -> impl futures::Future<Output = GraphQLResponse> {handle_graphql_query}`
    |                                            |
    |                                            required by a bound introduced by this call
    |
note: required by a bound in `MethodRouter::<B>::post`
   --> /home/sandreae/.cargo/registry/src/github.com-1ecc6299db9ec823/axum-0.4.8/src/routing/method_routing.rs:586:5
    |
586 |     chained_handler_fn!(post, POST);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `MethodRouter::<B>::post`
    = note: this error originates in the macro `chained_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)

Also some bamboo decoding errors popping up, which I will try to deal with separately.

@sandreae
Copy link
Member Author

Solved, just needed to bump axum so the version matched with graphql async axum.

@sandreae
Copy link
Member Author

Buuuut, i still get entry decoding errors from bamboo-core when publishing entries... the error varies on each test run 馃 between :

Failed to decode entry: Could not decode lipmaa link yamf hash DecodeError
Failed to decode entry: Could not decode author public key from bytes
Failed to decode entry: Could not decode backlink yamf hash: DecodeError

It's a bit weird.... i assumed it was a bamboo version mismatch, but i bumped to 0.1.1 and still get the same errors..

@sandreae
Copy link
Member Author

And anyway we don't actually need bamboo as a dependency in aquadoggo atm...

@sandreae sandreae marked this pull request as ready for review April 13, 2022 20:51
@sandreae sandreae changed the base branch from main to development April 28, 2022 07:32
@sandreae sandreae merged commit cbb3b50 into development Apr 28, 2022
@sandreae sandreae deleted the storage-provider branch April 28, 2022 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant