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

editoast: switch to diesel_async #4809

Merged
merged 4 commits into from
Aug 22, 2023
Merged

editoast: switch to diesel_async #4809

merged 4 commits into from
Aug 22, 2023

Conversation

Tristramg
Copy link
Contributor

@Tristramg Tristramg commented Aug 14, 2023

Closes #4829

@Tristramg Tristramg requested a review from a team as a code owner August 14, 2023 07:32
@Tristramg Tristramg marked this pull request as draft August 14, 2023 07:34
@Tristramg Tristramg force-pushed the async_pg branch 2 times, most recently from 6fbee33 to 0a49c5c Compare August 15, 2023 14:37
@Tristramg Tristramg marked this pull request as ready for review August 15, 2023 14:37
@Tristramg Tristramg changed the title [draft] editoast: switch to diesel_async editoast: switch to diesel_async Aug 15, 2023
@Tristramg Tristramg force-pushed the async_pg branch 3 times, most recently from 8e89c7b to 4aca00d Compare August 16, 2023 15:31
@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Merging #4809 (6c0e58c) into dev (21e3e16) will decrease coverage by 0.04%.
Report is 2 commits behind head on dev.
The diff coverage is 67.70%.

@@             Coverage Diff              @@
##                dev    #4809      +/-   ##
============================================
- Coverage     21.85%   21.82%   -0.04%     
  Complexity     2248     2248              
============================================
  Files           861      861              
  Lines         90167    90205      +38     
  Branches       2284     2284              
============================================
- Hits          19710    19690      -20     
- Misses        69196    69254      +58     
  Partials       1261     1261              
Flag Coverage Δ
editoast 71.07% <67.70%> (-0.73%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
editoast/editoast_derive/src/infra_model.rs 0.00% <ø> (ø)
editoast/editoast_derive/src/model.rs 0.00% <ø> (ø)
editoast/src/client/postgres_config.rs 100.00% <ø> (ø)
editoast/src/error.rs 25.00% <0.00%> (ø)
editoast/src/models/electrical_profile.rs 100.00% <ø> (ø)
editoast/src/models/pathfinding.rs 100.00% <ø> (ø)
editoast/src/schema/buffer_stop.rs 50.00% <ø> (ø)
editoast/src/schema/catenary.rs 75.00% <ø> (ø)
editoast/src/schema/detector.rs 71.42% <ø> (ø)
editoast/src/schema/neutral_section.rs 50.00% <ø> (ø)
... and 59 more

... and 1 file with indirect coverage changes

Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

That's a huge amount of work! It's nice to have everything decluttered by those blocks :) Thanks a lot!

I've just read the code for now and left a few cosmetic suggestions.
I wish the async move { ... }.scope_boxed() pattern could be avoided, too bad we can't use async closures. Maybe a macro to hide the boilerplate would work?

In any case, even of the CI says it's good, we'll have to thoroughly test the app to make sure there's no hidden panic or weird behaviors introduced. I'll do that next week (I'm not against some help with that @Tguisnet @flomonster 😛).

editoast/editoast_derive/src/infra_model.rs Outdated Show resolved Hide resolved
editoast/src/views/infra/mod.rs Outdated Show resolved Hide resolved
@Tristramg Tristramg force-pushed the async_pg branch 3 times, most recently from 65adc51 to 3bf2d67 Compare August 21, 2023 13:45
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

Thanks!
Reviewed and tested. All features seems to work.

@flomonster flomonster merged commit ea37389 into dev Aug 22, 2023
@flomonster flomonster deleted the async_pg branch August 22, 2023 13:08
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.

Editoast: switch to diesel_async
3 participants