Conversation
WalkthroughFlipperによるフィーチャートグル機能全体がアプリケーションから削除されました。関連するGem、初期化ファイル、コントローラ、ビュー、ルーティング、DBテーブル、テスト、設定ファイルが一括して削除・整理されています。 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant Flipper(DB)
User->>App: アクセス
App--xFlipper(DB): Flipperによるfeature判定呼び出しなし
App->>User: 通常のレスポンス
Possibly related PRs
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 RuboCop (1.76.1)db/schema.rbrubocop-minitest extension supports plugin, specify db/migrate/20250718134145_drop_flipper_tables.rbrubocop-minitest extension supports plugin, specify 📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
💤 Files with no reviewable changes (10)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
db/migrate/20250718134145_drop_flipper_tables.rb (1)
1-6: マイグレーションのロールバック動作について確認が必要
drop_tableをchangeメソッドで使用する場合、Rails はロールバック時にテーブルを再作成しようとしますが、元のテーブル構造(カラム、インデックス、制約など)の情報がないため、正しくロールバックできません。Flipperの完全削除が目的であれば問題ありませんが、より安全な実装を検討してください。
class DropFlipperTables < ActiveRecord::Migration[6.1] - def change + def up drop_table :flipper_gates, if_exists: true drop_table :flipper_features, if_exists: true end + + def down + # Flipper機能を完全に削除するため、ロールバックは意図的に無効化 + raise ActiveRecord::IrreversibleMigration, "Flipperテーブルの削除は不可逆的な操作です" + end
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Gemfile.lockis excluded by!**/*.lock
📒 Files selected for processing (12)
.traceroute.yml(0 hunks)Gemfile(0 hunks)app/controllers/application_controller.rb(0 hunks)app/controllers/concerns/feature_toggle.rb(0 hunks)app/controllers/test_feature_toggle_controller.rb(0 hunks)app/views/application/_global_nav.slim(0 hunks)app/views/test_feature_toggle/index.html.slim(0 hunks)config/initializers/flipper.rb(0 hunks)config/routes.rb(0 hunks)db/migrate/20250718134145_drop_flipper_tables.rb(1 hunks)db/schema.rb(1 hunks)test/controllers/concerns/feature_toggle_test.rb(0 hunks)
💤 Files with no reviewable changes (10)
- .traceroute.yml
- config/routes.rb
- app/controllers/application_controller.rb
- app/views/test_feature_toggle/index.html.slim
- Gemfile
- app/controllers/test_feature_toggle_controller.rb
- app/views/application/_global_nav.slim
- app/controllers/concerns/feature_toggle.rb
- test/controllers/concerns/feature_toggle_test.rb
- config/initializers/flipper.rb
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rb
Instructions used from:
Sources:
⚙️ CodeRabbit Configuration File
🧠 Learnings (2)
db/schema.rb (1)
Learnt from: thmz337
PR: fjordllc/bootcamp#8857
File: db/migrate/20250624141527_remove_experience_from_users.rb:6-8
Timestamp: 2025-06-27T14:06:44.472Z
Learning: Railsのマイグレーションのdownメソッドでは、元のスキーマの正確な定義を確認してから制約を追加する必要がある。元のカラムに制約がない場合、ロールバック時に制約を追加すると元の状態と異なってしまう。
db/migrate/20250718134145_drop_flipper_tables.rb (1)
Learnt from: thmz337
PR: fjordllc/bootcamp#8857
File: db/migrate/20250624141527_remove_experience_from_users.rb:6-8
Timestamp: 2025-06-27T14:06:44.472Z
Learning: Railsのマイグレーションのdownメソッドでは、元のスキーマの正確な定義を確認してから制約を追加する必要がある。元のカラムに制約がない場合、ロールバック時に制約を追加すると元の状態と異なってしまう。
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build_and_test
🔇 Additional comments (1)
db/schema.rb (1)
13-13: スキーマバージョンの更新が適切マイグレーションファイルと一致するスキーマバージョンに正しく更新されており、Flipperテーブルが完全に削除されています。
dccc9bc to
ac22e1c
Compare
以下の2つのPRがmainにマージされているが、不具合が見つかったため、応急処置でコードを削除する。
機能認可をControllerのbefore_actionで行うようにしていたため、実際にそのアクションを実行(URLに遷移)しないと、認可が行われないという現象。
上記が原因で、認可を受けているはずなのにViewに表示されないという不具合(URLを直接叩いてbefore_actionを実行させればViewにも表示されるようになる)
Summary by CodeRabbit
削除
データベース