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

Disable /search dry parameter in non-debug builds & harmonize endpoint results #8673

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

leovalais
Copy link
Contributor

@leovalais leovalais commented Aug 31, 2024

The dry parameter is useful for debugging the query being generated by the search expression. It's not necessary in production. Moreover we spotted during the axum migration that the /search endpoint sometimes returns json (search results) or text (dry). This PR harmonizes that.

@leovalais leovalais requested a review from a team as a code owner August 31, 2024 11:11
@leovalais leovalais force-pushed the lva/disable-dry-search-prod branch from f169293 to 6cf0afb Compare August 31, 2024 11:12
@codecov-commenter
Copy link

codecov-commenter commented Aug 31, 2024

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

Codecov Report

Attention: Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 36.87%. Comparing base (5038159) to head (84d3107).
Report is 2 commits behind head on dev.

Files with missing lines Patch % Lines
editoast/src/views/search.rs 0.00% 5 Missing ⚠️

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

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #8673      +/-   ##
============================================
- Coverage     36.88%   36.87%   -0.02%     
  Complexity     2213     2213              
============================================
  Files          1253     1253              
  Lines        113838   113832       -6     
  Branches       3185     3185              
============================================
- Hits          41991    41974      -17     
- Misses        69955    69966      +11     
  Partials       1892     1892              
Flag Coverage Δ
core 74.75% <ø> (ø)
editoast 71.89% <0.00%> (-0.05%) ⬇️
front 14.94% <100.00%> (+<0.01%) ⬆️
gateway 2.20% <ø> (ø)
osrdyne 2.71% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 86.45% <ø> (ø)

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 enabled auto-merge September 2, 2024 14:24
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.

Sounds good to me, but I'm not sure I understand the purpose of PR...
Can you add some context to the PR description?

@leovalais leovalais force-pushed the lva/disable-dry-search-prod branch from 6cf0afb to db1ce27 Compare September 4, 2024 10:16
@leovalais leovalais changed the title Disable /search dry parameter in non-debug builds Disable /search dry parameter in non-debug builds & harmonize endpoint results Sep 4, 2024
@leovalais
Copy link
Contributor Author

Sounds good to me, but I'm not sure I understand the purpose of PR... Can you add some context to the PR description?

Good point, sorry. Updated. While doing that I recalled we needed to change the response of the endpoint. This PR now also includes that.

@leovalais leovalais force-pushed the lva/disable-dry-search-prod branch from db1ce27 to 84d3107 Compare September 4, 2024 10:31
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.

LGTM

@leovalais leovalais added this pull request to the merge queue Sep 4, 2024
Merged via the queue into dev with commit 2fd5732 Sep 4, 2024
22 checks passed
@leovalais leovalais deleted the lva/disable-dry-search-prod branch September 4, 2024 13:56
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.

3 participants