Uncomment the case-insensitive SQLite table spec once rails/rails#59671 is merged

Aperta Adatta ai principianti
#1,799 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, rails, ruby, sqlite
Ambito
ci-cd, testing

Direzione di ricerca

Leggi spec/ransack/active_record/context_spec.rb e verifica se rails/rails#59671 è stato integrato e se il job rails-main è verde su Ransack main. Poi rimuovi i commenti dalla spec «a table whose name differs only in case» e conferma che rails-main rimane verde; queste verifiche definiscono il completamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The spec "a table whose name differs only in case" in spec/ransack/active_record/context_spec.rb (#1770) is commented out, because it fails on Rails main and nothing in Ransack can fix it.

Why it fails

Rails commit rails/rails@2cb3daba96, on main only, made the SQLite adapter read table structures in one batched query. That query selects tables with m.name IN (...), which matches names exactly. The PRAGMA table_info reads it replaced matched them the way SQLite does, ignoring ASCII case. A model whose table_name is widgets can no longer read a table created as Widgets, so the spec fails at Widget.create!, before any Ransack code runs:

ActiveRecord::StatementInvalid:
  Could not find table 'widgets'

The spec passes on Rails 8.1. It is commented out so that the rails-main job (#1797) is green and shows only new breaks.

Upstream fix

rails/rails#59671 matches table names with COLLATE NOCASE again, and cites this spec. It is stacked on rails/rails#59668, which merges first.

To close this issue

  • rails/rails#59671 is merged
  • the rails-main job is green on Ransack main
  • uncomment the spec and confirm that rails-main stays green
Lingua principale
Ruby
Stelle
5.9k
Fork
821
Merge medio
23h 45m
PR unite (30g)
36

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.