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: remove InternalError usage in Delete and Create Model API #10196

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

leovalais
Copy link
Contributor

@leovalais leovalais commented Dec 24, 2024

  • Creates a custom error type wrapping diesel::result::Error in editoast_models
  • Adapt the API of deletion and creation traits (the rest will come in another PR(s))
  • Propagate the API change in views (mostly)
    • new error variants are created to accommodate some (valid) typing constraints, bringing us closer to our target error management structure
    • simplified a few map_diesel_error here and there
  • The traits will be moved into editoast_models::model later

Tip

Review commit by commit

@github-actions github-actions bot added area:front Work on Standard OSRD Interface modules area:editoast Work on Editoast Service labels Dec 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 24, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 85.32110% with 16 lines in your changes missing coverage. Please review.

Project coverage is 79.91%. Comparing base (41e05a4) to head (f4c7501).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
editoast/src/models/prelude/delete.rs 0.00% 5 Missing ⚠️
editoast/editoast_models/src/model/error.rs 87.09% 4 Missing ⚠️
editoast/src/models/prelude/create.rs 0.00% 2 Missing ⚠️
editoast/src/views/temporary_speed_limits.rs 86.66% 2 Missing ⚠️
editoast/src/views/work_schedules.rs 87.50% 2 Missing ⚠️
editoast/src/views/rolling_stock.rs 95.83% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10196      +/-   ##
==========================================
- Coverage   79.94%   79.91%   -0.03%     
==========================================
  Files        1057     1058       +1     
  Lines      106302   106294       -8     
  Branches      724      724              
==========================================
- Hits        84982    84950      -32     
- Misses      21278    21302      +24     
  Partials       42       42              
Flag Coverage Δ
editoast 73.84% <85.32%> (-0.09%) ⬇️
front 89.19% <ø> (ø)
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 87.00% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leovalais leovalais changed the title lva/model errors editoast: remove InternalError usage in Delete and Create Model API Dec 26, 2024
@leovalais leovalais marked this pull request as ready for review December 26, 2024 16:54
@leovalais leovalais requested review from a team as code owners December 26, 2024 16:54
@leovalais leovalais enabled auto-merge December 26, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants