Hotfix: バス路線でGetStationsByLineIdが0件になる問題を種別なし駅一覧へのフォールバックで修正 - #1623
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LM9j6JJciEV1jmhLTt7Hod
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
#1622(dev にマージ済み)の本番向け Hotfix です。バス路線で
GetStationsByLineIdが常に0件を返し、アプリでバス停一覧が全く表示されなくなっていた問題を修正します。master は #1621 で dev(#1614 を含む)を取り込んでおり、本番でも同じ退行が発生しているため、dev の修正コミット(008c507)を master へ cherry-pick しました。#1614「列車種別なしの経路分岐を削除」で、種別を持たない駅向けのフォールバック(
get_by_line_id_without_train_types)が削除され、get_by_line_id_with_train_typeに一本化されました。しかし統合後のクエリのtarget_line_groupCTE はt.kind IN (0,1) OR t.priority > 0で種別グループを選択するため、BusRoute(kind=7・priority=0)しか種別を持たないバス路線ではグループが一切マッチせず、常に空の結果を返していました。変更の種類
変更内容
get_by_line_id_with_train_typeで種別グループベースのクエリが0件だった場合に、種別なしの駅一覧クエリへフォールバックするように変更(列車種別なしの経路分岐を削除 #1614 で削除されたget_by_line_id_without_train_typesを復元)station_id未指定 /direction_idによる並び順反転の4ケース)GetStationsByLineIdのフォールバック挙動を追記テスト
cargo fmt --all -- --checkが通ることcargo clippy -- -D warningsが通ること(SQLX_OFFLINE=true)cargo test(SQLX_OFFLINE=true)が通ること(427 + 41 件パス)hotfix ブランチ上でも上記3コマンドを再実行して確認済みです。追加の統合テストは #1622 の時点でローカル PostgreSQL 16 に対して実行し、パスを確認しています。
関連Issue
Refs #1622
スクリーンショット(任意)
🤖 Generated with Claude Code
https://claude.ai/code/session_01LM9j6JJciEV1jmhLTt7Hod
Generated by Claude Code