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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop session-prefix from session types #62

Merged
merged 2 commits into from
Oct 28, 2023
Merged

Conversation

maxcountryman
Copy link
Owner

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

Here we remove the session-prefix from types that already reside in the
session module.
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

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

❗ 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
Copy link
Owner Author

@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.

Comment on lines +37 to 40
diesel-sqlite-store = ["diesel-store", "diesel/sqlite"]
diesel-postgres-store = ["diesel-store", "diesel/postgres"]
diesel-mysql-store = ["diesel-store", "diesel/mysql"]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary to expose this features for the users of tower-sessions as they will on it own enable the diesel features they require to construct the right pool type. That's the reason why I originally went with the __diesel_postgres feature. The other solution is to just unconditionally enable all backends as dev-dependency

@weiznich
Copy link
Contributor

I've opened #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.

@maxcountryman maxcountryman merged commit 558f0c3 into main Oct 28, 2023
6 of 16 checks passed
@maxcountryman maxcountryman deleted the session-prefix branch October 28, 2023 15:27
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.

2 participants