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

front: transform some RTK mutations into queries to prevent useless requests #9831

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

Conversation

clarani
Copy link
Contributor

@clarani clarani commented Nov 22, 2024

closes #9830

See the commits

@clarani clarani marked this pull request as ready for review November 22, 2024 16:14
@clarani clarani requested a review from a team as a code owner November 22, 2024 16:14
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Nov 22, 2024
@emersion emersion self-requested a review November 22, 2024 16:15
@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2024

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

Codecov Report

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

Project coverage is 38.12%. Comparing base (1891f5b) to head (8124752).
Report is 2 commits behind head on dev.

Files with missing lines Patch % Lines
front/src/config/openapi-editoast-config.ts 0.00% 4 Missing ⚠️
...alStudies/hooks/useSetupItineraryForTrainUpdate.ts 0.00% 2 Missing ⚠️
...nt/src/modules/pathfinding/hooks/usePathfinding.ts 0.00% 2 Missing ⚠️
.../routeEdition/components/RouteEditionLeftPanel.tsx 0.00% 1 Missing ⚠️
...operationalStudies/hooks/useCachedTrackSections.ts 0.00% 1 Missing ⚠️
...c/applications/stdcm/hooks/useStaticPathfinding.ts 0.00% 1 Missing ⚠️
...nt/src/applications/stdcm/hooks/useStdcmResults.ts 0.00% 1 Missing ⚠️
...src/modules/pathfinding/hooks/usePathProperties.ts 0.00% 1 Missing ⚠️
...TimeChart/useGetProjectedTrainOperationalPoints.ts 0.00% 1 Missing ⚠️
...components/SpaceTimeChart/useProjectedConflicts.ts 0.00% 1 Missing ⚠️
... and 1 more

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

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #9831      +/-   ##
==========================================
- Coverage   38.14%   38.12%   -0.03%     
==========================================
  Files         998      998              
  Lines       92134    92138       +4     
  Branches     1192     1192              
==========================================
- Hits        35149    35131      -18     
- Misses      56529    56551      +22     
  Partials      456      456              
Flag Coverage Δ
editoast 73.27% <ø> (-0.06%) ⬇️
front 20.15% <33.33%> (-0.01%) ⬇️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
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.

@clarani clarani force-pushed the cni/9830-remove-useless-requests branch from 091927b to 885db5d Compare November 22, 2024 16:30
@clarani clarani force-pushed the cni/9830-remove-useless-requests branch 2 times, most recently from c6bf33a to a52b277 Compare November 25, 2024 13:53
@clarani clarani force-pushed the cni/9830-remove-useless-requests branch from a52b277 to d9ecd69 Compare November 28, 2024 12:50
@clarani clarani changed the title front: remove infra tags from several endpoints to prevent useless requests front: transform some RTK mutations into queries to prevent useless requests Nov 28, 2024
@clarani clarani force-pushed the cni/9830-remove-useless-requests branch from d9ecd69 to aa3b58c Compare November 28, 2024 13:01
@SharglutDev
Copy link
Contributor

Since your rebase and the merge of this PR, there is another spot where you need to update the useMutation in useCachedTrackSections :)

Signed-off-by: Clara Ni <clara.ni@outlook.fr>
Signed-off-by: Clara Ni <clara.ni@outlook.fr>
Signed-off-by: Clara Ni <clara.ni@outlook.fr>
Signed-off-by: Clara Ni <clara.ni@outlook.fr>
@clarani clarani force-pushed the cni/9830-remove-useless-requests branch from aa3b58c to 8124752 Compare November 28, 2024 14:18
Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

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

Lgtm and tested, nice changes !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

front: useless infra requests are sent
4 participants