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: update modified field of infra upon modification #10716

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

leovalais
Copy link
Contributor

@leovalais leovalais commented Feb 6, 2025

Part of editoast-statful scalability work.

The field used to default to NOW() on INSERT, but was never updated.

Naive datetimes are also replaced by DateTime<Utc>.

@leovalais leovalais requested a review from a team as a code owner February 6, 2025 17:38
@github-actions github-actions bot added the area:editoast Work on Editoast Service label Feb 6, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2025

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

Codecov Report

Attention: Patch coverage is 98.48485% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.92%. Comparing base (66a9cad) to head (23c96c1).
Report is 22 commits behind head on dev.

Files with missing lines Patch % Lines
editoast/src/infra_cache/operation/mod.rs 88.88% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10716      +/-   ##
==========================================
- Coverage   81.93%   81.92%   -0.01%     
==========================================
  Files        1079     1079              
  Lines      107376   107533     +157     
  Branches      737      734       -3     
==========================================
+ Hits        87978    88096     +118     
- Misses      19358    19397      +39     
  Partials       40       40              
Flag Coverage Δ
editoast 74.37% <98.48%> (+0.09%) ⬆️
front 89.41% <ø> (-0.07%) ⬇️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 88.14% <ø> (ø)

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 self-assigned this Feb 6, 2025
@leovalais leovalais force-pushed the lva/update-infra-modified branch from 7ea122b to 7a609ef Compare February 6, 2025 17:57
@leovalais leovalais added the kind:bug Something isn't working label Feb 6, 2025
Copy link
Contributor

@hamz2a hamz2a left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I left a small suggestion for a non-blocking change.

Copy link
Contributor

@woshilapin woshilapin left a comment

Choose a reason for hiding this comment

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

How about moving that logic to the DB so we don't forget to put it in every places in the code that needs it? I usually don't like putting logic in the DB, but in this case, it looks almost like a missing feature of Postgres (MySQL seems to have syntactic sugar for it).

@leovalais leovalais force-pushed the lva/update-infra-modified branch from 7a609ef to 67b2180 Compare February 7, 2025 11:08
The field used to default to `NOW()` on `INSERT`, but was never updated.

Naive datetimes are also replaced by `DateTime<Utc>`.

Signed-off-by: Leo Valais <[email protected]>
@leovalais leovalais force-pushed the lva/update-infra-modified branch from 67b2180 to 23c96c1 Compare February 7, 2025 12:52
@leovalais leovalais enabled auto-merge February 7, 2025 13:18
@leovalais leovalais added this pull request to the merge queue Feb 7, 2025
Merged via the queue into dev with commit 9210d41 Feb 7, 2025
27 checks passed
@leovalais leovalais deleted the lva/update-infra-modified branch February 7, 2025 13:57
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 kind:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants