maxcountryman / tower-sessions

🥠 Sessions as a `tower` and `axum` middleware.
MIT License
253 stars 42 forks source link

drop session-prefix from session types #62

Closed maxcountryman closed 1 year ago

maxcountryman commented 1 year ago

Here we remove the session-prefix from types that already reside in the session module.

codecov[bot] commented 1 year ago

Codecov Report

Merging #62 (f93048c) into main (73ebd97) will not change coverage. The diff coverage is 91.89%.

:exclamation: Current head f93048c differs from pull request most recent head 6490455. Consider uploading reports for the commit 6490455 to get more accurate results

@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   79.58%   79.58%           
=======================================
  Files          14       14           
  Lines         573      573           
=======================================
  Hits          456      456           
  Misses        117      117           
Files Coverage Δ
src/cookie_config.rs 83.33% <ø> (ø)
src/diesel_store.rs 77.77% <100.00%> (ø)
src/lib.rs 7.14% <ø> (ø)
src/memory_store.rs 100.00% <100.00%> (ø)
src/moka_store.rs 90.90% <100.00%> (ø)
src/mongodb_store.rs 82.85% <100.00%> (ø)
src/redis_store.rs 100.00% <100.00%> (ø)
src/session_store.rs 52.77% <100.00%> (ø)
src/sqlx_store/mysql_store.rs 89.47% <100.00%> (ø)
src/sqlx_store/postgres_store.rs 80.95% <100.00%> (ø)
... and 3 more
maxcountryman commented 1 year ago

@weiznich it seems like Diesel is not working as expected: unfortunately in #59 the Diesel tests were excluded by the feature flags being out of sync. I'm not sure what's not working here, but I'm guessing something about the migration to storing the whole session could be related.

weiznich commented 1 year ago

I've opened https://github.com/maxcountryman/tower-sessions/pull/64 to address the test failures. It was not the migration, just an interaction between transactions + how we insert/update sessions into the database. I've chosen a different approach that works on all backends.